[PATCH 1/2] test for --no-undefined linker flag



Currently the code assumes that all Windows like platforms have a linker
that supports --no-undefined, however llvm based compilers do not
support this on Linux and on Mac OS X so instead test for it and only
use if its available.
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f7a17b8..3a36960 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,7 +159,8 @@ case "$host" in
     ;;
 
   *)
-    NO_UNDEFINED_FLAGS="-Wl,--no-undefined"
+    `ld --help 2>&1 | grep -- --no-undefined >/dev/null` && \
+      NO_UNDEFINED_FLAGS="-Wl,--no-undefined"
     VERSION_SCRIPT_FLAGS=-Wl,--version-script=
     `ld --help 2>&1 | grep -- --version-script >/dev/null` || \
       VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
-- 
1.8.1.5



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]