aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2013-05-14 09:28:17 +0000
committerRainer Orth <ro@gcc.gnu.org>2013-05-14 09:28:17 +0000
commit56cf785912d39bf6f529e6eaace998788fd250b2 (patch)
treef3b5c166bfd33e19d7236f5f52a370bdc2286a9e /gcc/configure
parent75776c6d256cf2db9cd470484445bff01c7e30fa (diff)
downloadgcc-56cf785912d39bf6f529e6eaace998788fd250b2.zip
gcc-56cf785912d39bf6f529e6eaace998788fd250b2.tar.gz
gcc-56cf785912d39bf6f529e6eaace998788fd250b2.tar.bz2
Fix Solaris --as-needed/-z ignore detection (PR target/57261)
PR target/57261 * configure.ac (gcc_cv_ld_as_needed): Disable before Solaris 11 and Solaris 11+/x86 with gld. * configure: Regenerate. From-SVN: r198867
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure
index def377f..39e911c 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -26579,6 +26579,23 @@ elif test x$gcc_cv_ld != x; then
esac
fi
fi
+# --as-needed/-z ignore can only be used if libgcc_s.so.1 uses
+# dl_iterate_phdr, i.e. since Solaris 11.
+case "$target" in
+ *-*-solaris2.1[1-9]*)
+ case "$target" in
+ i?86-*-* | x86_64-*-*)
+ if echo "$ld_ver" | grep GNU > /dev/null; then
+ # Doesn't work with gld on Solaris/x86 due to PR ld/12320.
+ gcc_cv_ld_as_needed=no
+ fi
+ ;;
+ esac
+ ;;
+ *-*-solaris2*)
+ gcc_cv_ld_as_needed=no
+ ;;
+esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_as_needed" >&5