LRN: Add '-Wl,' prefix to -no-undefined
authorChristian Grothoff <christian@grothoff.org>
Sat, 5 Nov 2011 09:06:32 +0000 (09:06 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 5 Nov 2011 09:06:32 +0000 (09:06 +0000)
-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.

configure.ac
src/ats/Makefile.am
src/block/Makefile.am
src/fragmentation/Makefile.am
src/hello/Makefile.am
src/testing/Makefile.am
src/transport/Makefile.am
src/util/Makefile.am

index 148c827bc93596f0520accde0dd9e6cb3fa975f3..7957cc2a09cba51ec202b71843c58d7798490b75 100644 (file)
@@ -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"
index 35cd75f59c8c48d1ac101815c8687350998a6663..adccc7e354dd879d8cc6e0863134cfbc8d8ca60b 100644 (file)
@@ -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
index 5549104e0dee56c10853426f5560194b7d35aa3d..cfbcb797fd7fde57e0c7c036385857d197606de4 100644 (file)
@@ -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
index 0d6164a48990e2c3d4feef438c584922adf6634f..488ad2e51c3ceab4a7c73327f3edfb16ebefaf16 100644 (file)
@@ -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
index c2bc5cd6924aae73091e71638d489d61e1be380f..61c84e50e1b38ca93163e3079db4735fe1ca4417 100644 (file)
@@ -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
index 008692fbd1c6e73b6f472210b8566c381c1a4d8d..bc81d8d3a1d3427bf4e884191355052aa9bef1b3 100644 (file)
@@ -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 \
index e5230410c2a1d0d5bc9afc8894fd81aee76939e6..7beaf584d53a1d16ee573211a8270e9c3ebd831f 100644 (file)
@@ -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 \
index 98af8383a89298b033b1ff4e43e511111187fe9f..c62fc4246fa0e8b36dc92b8ccf3ee33e7563234a 100644 (file)
@@ -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