While checking my TLS LD patch, I noticed that unlike on Solaris 10/x86, the @tlsldmplt configure test was failing on Solaris 11/x86 with Sun ld. This went unnoticed since the Solaris 11 ld also supports the TLS LD code sequence expected by GNU ld.
The failure happens because S11 ld is pickier than its S10 counterpart: ld: fatal: symbol 'tls_ld' in file tlsldmplt.o (STT_TLS), is defined in a non-SHF_TLS section I've quieted the error by adapting the testcase to work with both versions. It requires the infrastructure laid by my previous patch: http://gcc.gnu.org/ml/gcc-patches/2014-03/msg00225.html I didn't adapt it to gas/gld (enforcing 32-bit assembly/linking) since neither supports @tlsldmplt yet. Bootstrapped without regressions on i386-pc-solaris2.1[01] and x86_64-unknown-linux-gnu, will commit once the build part of the previous patch has been approved. Thanks. Rainer 2014-03-06 Rainer Orth <r...@cebitec.uni-bielefeld.de> * configure.ac (HAVE_AS_IX86_TLSLDMPLT): Improve test for Solaris 11/x86 ld. * configure: Regenerate.
# HG changeset patch # Parent bf7371f29fbafbce722a20c3de6dbe27c6180539 Improve @tlsldmplt test on Solaris 11/x86 diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3920,10 +3920,14 @@ foo: nop [AC_DEFINE(HAVE_AS_IX86_TLSGDPLT, 1, [Define if your assembler and linker support @tlsgdplt.])]) + conftest_s=' + .section .tdata,"aw'$tls_section_flag'",@progbits +tls_ld: + .section .text,"ax",@progbits + call tls_ld@tlsldmplt' gcc_GAS_CHECK_FEATURE([R_386_TLS_LDM_PLT reloc], gcc_cv_as_ix86_tlsldmplt,,, - [tls_ld: - call tls_ld@tlsldmplt], + [$conftest_s], [if test x$gcc_cv_ld != x \ && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then gcc_cv_as_ix86_tlsldmplt=yes
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University