diff options
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure index 50baf170e19..d1dcf891b8d 100755 --- a/gcc/configure +++ b/gcc/configure @@ -24844,6 +24844,43 @@ $as_echo "$gcc_cv_ld_no_dot_syms" >&6; } $as_echo "#define HAVE_LD_NO_DOT_SYMS 1" >>confdefs.h fi + + { $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 $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then + gcc_cv_ld_large_toc=yes + fi + elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + cat > conftest.s <<EOF + .section ".tbss","awT",@nobits + .align 3 +ie0: .space 8 + .global _start + .text +_start: + addis 9,13,ie0@got@tprel@ha + ld 9,ie0@got@tprel@l(9) +EOF + if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ + && $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /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 |