On Thu, May 09, 2013 at 01:33:59PM -0500, Edmar Wienskoski wrote: > On Thu, May 9, 2013 at 2:27 AM, Alan Modra <amo...@gmail.com> wrote: > > Another tweak for little-endian powerpc. Committed revision 198734. > > > > * configure.ac (HAVE_AS_TLS): Enable tests for powerpcle and > > powerpc64le. > > * configure: Regenerate.
> The first hunk will match powerpc64 as well. Thanks for pointing this out. My powerpc64 testing didn't catch this because the powerpc test also passes for powerpc64. In fact there really isn't any need for the powerpc64 variant test, except perhaps to support someone who has messed with gas to disable 32-bit support (which you can't do via configure options, at least nowadays). Powerpc 32-bit and 64-bit TLS support were added to gas at the same time. So even though the powerpc64 case could disappear, I think it simplest to just move the two cases around. I also have another tweak to run by David regarding HAVE_LD_LARGE_TOC. A linux build gets "Define if your AIX linker..." in the auto-host.h comment, from the AC_DEFINE David added recently for AIX -mcmodel support. That's a little confusing, so I propose changing the text to remove mention of the operating system. OK? * configure.ac (HAVE_AS_TLS): Swap powerpc64 and powerpc cases. (HAVE_LD_LARGE_TOC): Don't mention AIX in help text. * configure: Regenerate. Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 198662) +++ gcc/configure.ac (working copy) @@ -3045,35 +3045,9 @@ tls_first_major=0 tls_first_minor=0 ;; - powerpc-*-*) + powerpc64*-*-*) conftest_s=' .section ".tdata","awT",@progbits - .align 2 -ld0: .space 4 -ld1: .space 4 -x1: .space 4 -x2: .space 4 -x3: .space 4 - .text - addi 3,31,ld0@got@tlsgd - bl __tls_get_addr - addi 3,31,x1@got@tlsld - bl __tls_get_addr - addi 9,3,x1@dtprel - addis 9,3,x2@dtprel@ha - addi 9,9,x2@dtprel@l - lwz 9,x3@got@tprel(31) - add 9,9,x@tls - addi 9,2,x1@tprel - addis 9,2,x2@tprel@ha - addi 9,9,x2@tprel@l' - tls_first_major=2 - tls_first_minor=14 - tls_as_opt="-a32 --fatal-warnings" - ;; - powerpc64-*-*) - conftest_s=' - .section ".tdata","awT",@progbits .align 3 ld0: .space 8 ld1: .space 8 @@ -3105,6 +3079,32 @@ tls_first_minor=14 tls_as_opt="-a64 --fatal-warnings" ;; + powerpc*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + .align 2 +ld0: .space 4 +ld1: .space 4 +x1: .space 4 +x2: .space 4 +x3: .space 4 + .text + addi 3,31,ld0@got@tlsgd + bl __tls_get_addr + addi 3,31,x1@got@tlsld + bl __tls_get_addr + addi 9,3,x1@dtprel + addis 9,3,x2@dtprel@ha + addi 9,9,x2@dtprel@l + lwz 9,x3@got@tprel(31) + add 9,9,x@tls + addi 9,2,x1@tprel + addis 9,2,x2@tprel@ha + addi 9,9,x2@tprel@l' + tls_first_major=2 + tls_first_minor=14 + tls_as_opt="-a32 --fatal-warnings" + ;; s390-*-*) conftest_s=' .section ".tdata","awT",@progbits @@ -4680,7 +4680,7 @@ ]) if test x"$gcc_cv_ld_large_toc" = xyes; then AC_DEFINE(HAVE_LD_LARGE_TOC, 1, - [Define if your AIX linker supports a large TOC.]) + [Define if your PowerPC64 linker supports a large TOC.]) fi ;; esac -- Alan Modra Australia Development Lab, IBM