]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
fd.o bug #11872 improve linker test for --gc-sections
authorJohn (J5) Palmieri <johnp@redhat.com>
Wed, 3 Oct 2007 21:08:44 +0000 (17:08 -0400)
committerJohn (J5) Palmieri <johnp@redhat.com>
Wed, 3 Oct 2007 21:08:44 +0000 (17:08 -0400)
* patch by Tim Mooney <enchanter at users.sourceforge.net>

configure.in

index 34e653f8c04fd3fc6fa0539e2343ee9426aa8d9f..4ed2e1c070ed86d574486b7060cc5b3550f91ba6 100644 (file)
@@ -283,8 +283,11 @@ if test "$ac_gcsections" = "yes"; then
   rm -f conftest.c
   touch conftest.c
   if $CC -c conftest.c; then
-    if $LD --gc-sections -o conftest conftest.o 2>&1 | \
-      grep "Warning: gc-sections option ignored" > /dev/null; then
+    ld_out=`$LD --gc-sections -o conftest conftest.o 2>&1`
+    ld_ret=$?
+    if test $ld_ret -ne 0 ; then
+      ac_gcsections=no
+    elif echo "$ld_out" | egrep 'option ignored|^usage:|illegal option' >/dev/null ; then
       ac_gcsections=no
     fi
   fi