summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2007-10-03 17:08:44 -0400
committerJohn (J5) Palmieri <johnp@redhat.com>2007-10-03 17:08:44 -0400
commita295b2e66c9db7e7687e22414f93e171c29e495d (patch)
tree8f3ce8e1e5610a526205182fa4115aeb566d3008 /configure.in
parentadb0270edf6ffae2f2d9d319aed7737f85fa6ec2 (diff)
fd.o bug #11872 improve linker test for --gc-sections
* patch by Tim Mooney <enchanter at users.sourceforge.net>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 34e653f8..4ed2e1c0 100644
--- a/configure.in
+++ b/configure.in
@@ -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