From: Christian Grothoff Date: Sat, 5 Nov 2011 09:06:32 +0000 (+0000) Subject: LRN: Add '-Wl,' prefix to -no-undefined X-Git-Tag: initial-import-from-subversion-38251~16032 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b8fb774718de49d5a96e6cfa5b38a42b9f3f0e6a;p=oweals%2Fgnunet.git LRN: Add '-Wl,' prefix to -no-undefined -no-undefined is not a valid compiler option as of GCC 4.6.x (it IS valid linker option). Note that this REQUIRES an extra -no-undefined to be passed to libtool (this is done by GN_LIB_LDLFAGS and GN_PLUGIN_LDFLAGS), because libtool does not understand -Wl,-no-undefined. --- diff --git a/configure.ac b/configure.ac index 148c827bc..7957cc2a0 100644 --- a/configure.ac +++ b/configure.ac @@ -141,7 +141,7 @@ netbsd*) AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system]) AC_CHECK_LIB(intl, gettext) - LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols" + LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,--export-all-symbols" LIBS="$LIBS -lws2_32 -lplibc" CFLAGS="-mms-bitfields $CFLAGS" CPPFLAGS="-D_WIN32_WINNT=0x0501 $CPPFLAGS" diff --git a/src/ats/Makefile.am b/src/ats/Makefile.am index 35cd75f59..adccc7e35 100644 --- a/src/ats/Makefile.am +++ b/src/ats/Makefile.am @@ -22,6 +22,9 @@ libgnunetats_la_SOURCES = \ libgnunetats_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la +libgnunetats_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) + bin_PROGRAMS = \ gnunet-service-ats diff --git a/src/block/Makefile.am b/src/block/Makefile.am index 5549104e0..cfbcb797f 100644 --- a/src/block/Makefile.am +++ b/src/block/Makefile.am @@ -73,6 +73,8 @@ libgnunetblock_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la libgnunetblock_la_DEPENDENCIES = \ $(top_builddir)/src/util/libgnunetutil.la +libgnunetblock_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) check_PROGRAMS = \ test_block diff --git a/src/fragmentation/Makefile.am b/src/fragmentation/Makefile.am index 0d6164a48..488ad2e51 100644 --- a/src/fragmentation/Makefile.am +++ b/src/fragmentation/Makefile.am @@ -16,6 +16,8 @@ libgnunetfragmentation_la_SOURCES = \ libgnunetfragmentation_la_LIBADD = -lm \ $(top_builddir)/src/statistics/libgnunetstatistics.la \ $(top_builddir)/src/util/libgnunetutil.la +libgnunetfragmentation_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) check_PROGRAMS = \ test_fragmentation diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am index c2bc5cd69..61c84e50e 100644 --- a/src/hello/Makefile.am +++ b/src/hello/Makefile.am @@ -15,6 +15,8 @@ libgnunethello_la_SOURCES = \ hello.c libgnunethello_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la $(XLIB) +libgnunethello_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) check_PROGRAMS = \ test_hello diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index 008692fbd..bc81d8d3a 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am @@ -46,6 +46,8 @@ libgnunettesting_la_LIBADD = $(XLIB) \ $(top_builddir)/src/hello/libgnunethello.la \ -lm \ $(top_builddir)/src/util/libgnunetutil.la +libgnunettesting_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) check_PROGRAMS = \ test_testing \ diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index e5230410c..7beaf584d 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -77,6 +77,8 @@ libgnunettransporttesting_la_LIBADD = \ $(GN_LIBINTL) libgnunettransporttesting_la_DEPENDENCIES = \ libgnunettransport.la +libgnunettransporttesting_la_LDFLAGS = \ + $(GN_LIB_LDFLAGS) libgnunettransport_la_SOURCES = \ transport_api.c transport.h \ diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 98af8383a..c62fc4246 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -14,7 +14,7 @@ libgnunetutilwin_la_SOURCES = \ win.cc \ winproc.c libgnunetutilwin_la_LDFLAGS = \ - -Wl,--no-undefined -Wl,--export-all-symbols + -no-undefined -Wl,--export-all-symbols libgnunetutilwin_la_LIBADD = \ -lshell32 -liconv -lstdc++ \ -lcomdlg32 -lgdi32