Skip to content

Commit

Permalink
Makefile.am: fix placement of MBTOOLS_LIBS
Browse files Browse the repository at this point in the history
LIBS need to be at the end of the linker line; placing them in LDFLAGS
puts them in the wrong order, resulting in diagnostics as documented in
issue webstack#4.

Signed-off-by: Peter A. Bigot <[email protected]>
  • Loading branch information
pabigot committed Oct 7, 2017
1 parent 149e9c6 commit ff328dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AM_CFLAGS = ${my_CFLAGS} \
-ffunction-sections \
-fdata-sections

AM_LDFLAGS = ${MBTOOLS_LIBS} \
AM_LDFLAGS = \
-Wl,--gc-sections \
-Wl,--as-needed

Expand All @@ -28,5 +28,9 @@ mbcollect_SOURCES = \
output.c \
collect.c

mbcollect_LDADD = ${MBTOOLS_LIBS}

mbrecorder_SOURCES = \
recorder.c

mbrecorder_LDADD = ${MBTOOLS_LIBS}
4 changes: 3 additions & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AM_CFLAGS = ${my_CFLAGS} \
-ffunction-sections \
-fdata-sections

AM_LDFLAGS = ${MBTOOLS_LIBS} \
AM_LDFLAGS = \
-Wl,--gc-sections \
-Wl,--as-needed

Expand All @@ -20,3 +20,5 @@ noinst_PROGRAMS = \
unit_test_server_SOURCES = unit-test-server.c
unit_test_client_SOURCES = unit-test-client.c

unit_test_server_LDADD = ${MBTOOLS_LIBS}
unit_test_client_LDADD = ${MBTOOLS_LIBS}

0 comments on commit ff328dc

Please sign in to comment.