The use of the TLS register in a TOC/GOT address computation was
probably a cut&pasto or a thinko.  It causes a linker warning and,
because the TLS access in the test is incomplete, may cause
significant confusion.  Adjust to use the TOC/GOT register as base.

Tested manually with cross binutils for ppc64-linux-gnu and
ppc64-vxworks7r2.  Unless there's any objection in the next few days, I
plan to put this in along with other changes.

for  gcc/ChangeLog

        * configure.ac: Adjust base register in linker test for large
        toc support.
        * configure: Rebuilt.
---
 gcc/configure    |    2 +-
 gcc/configure.ac |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/configure b/gcc/configure
index 5a779db0a29f5..d6cc7fc17ca04 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -33209,7 +33209,7 @@ ie0:    .space 8
        .global _start
        .text
 _start:
-       addis 9,13,ie0@got@tprel@ha
+       addis 9,2,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 \
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7e57d527ecdde..19975fa5be5b2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6789,7 +6789,7 @@ ie0:      .space 8
        .global _start
        .text
 _start:
-       addis 9,13,ie0@got@tprel@ha
+       addis 9,2,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 \

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to