]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix Solaris --as-needed/-z ignore detection (PR target/57261)
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 14 May 2013 09:28:17 +0000 (09:28 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 14 May 2013 09:28:17 +0000 (09:28 +0000)
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

gcc/ChangeLog
gcc/configure
gcc/configure.ac

index a751b29d99fa42e43b47b90d9bc3c349a51f7c0b..533f21aed31d656a5bf012402bb262bef9b1cac2 100644 (file)
@@ -1,3 +1,10 @@
+2013-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR target/57261
+       * configure.ac (gcc_cv_ld_as_needed): Disable before Solaris 11
+       and Solaris 11+/x86 with gld.
+       * configure: Regenerate.
+
 2013-05-14  Jakub Jelinek  <jakub@redhat.com>
 
        * expmed.c (expand_shift_1): Canonicalize rotates by
index def377fea0d3106d3f174b70ada518878df4b005..39e911c9830f2911ecd6d6e494b6dbe8b3b135b5 100755 (executable)
@@ -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
index effae814fa2012a45f9ed3f4f03fb09b03c8696b..a6cdf245ea522aff0c51ff90a945922e40604ee6 100644 (file)
@@ -4560,6 +4560,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
 ])
 if test x"$gcc_cv_ld_as_needed" = xyes; then
        AC_DEFINE(HAVE_LD_AS_NEEDED, 1,