configure.ac (HAVE_LD_LARGE_TOC): Add AIX test.
[gcc.git] / gcc / configure
index 55164b66c9205a8af04967d1ef85d49feaf19076..3f1ca7411c05207b47d10d0a4c344046b7941975 100755 (executable)
 
 ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
 PLUGIN_LD_SUFFIX=`basename $gcc_cv_ld | sed -e "s,$target_alias-,,"`
+# if the PLUGIN_LD is set ld-new, just have it as ld
+# as that is the installed named.
+if test x$PLUGIN_LD_SUFFIX == xld-new \
+   || test x$PLUGIN_LD_SUFFIX == xcollect-ld ; then
+  PLUGIN_LD_SUFFIX=ld
+fi
 
 # Check whether --with-plugin-ld was given.
 if test "${with_plugin_ld+set}" = set; then :
@@ -26407,6 +26413,42 @@ $as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
     ;;
 esac
 
+case "$target" in
+  *-*-aix*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker large toc support" >&5
+$as_echo_n "checking linker large toc support... " >&6; }
+if test "${gcc_cv_ld_large_toc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_ld_large_toc=no
+    if test x$gcc_cv_as != x ; then
+      cat > conftest.s <<EOF
+       .toc
+LC..1:
+       .tc a[TC],a[RW]
+       .extern a[RW]
+       .csect .text[PR]
+.largetoctest:
+       addis 9,LC..1@u(2)
+       ld 3,LC..1@l(9)
+EOF
+      if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1; then
+        gcc_cv_ld_large_toc=yes
+      fi
+      rm -f conftest conftest.o conftest.s
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_large_toc" >&5
+$as_echo "$gcc_cv_ld_large_toc" >&6; }
+    if test x"$gcc_cv_ld_large_toc" = xyes; then
+
+$as_echo "#define HAVE_LD_LARGE_TOC 1" >>confdefs.h
+
+    fi
+    ;;
+esac
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
 $as_echo_n "checking linker --build-id support... " >&6; }
 if test "${gcc_cv_ld_buildid+set}" = set; then :