[Bug libstdc++/52104] go1 fails to link on Solaris 8/9 x86 with native TLS

ro at CeBiTec dot Uni-Bielefeld.DE gcc-bugzilla@gcc.gnu.org
Fri Feb 3 10:56:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52104

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-02-03 10:55:07 UTC ---
> --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-03 10:48:16 UTC ---
> Are you sure this is using native TLS?

Not anymore ;-(  While Solaris 8 and 9 with gas support native TLS, the
test fails.  config.log shows

configure:26332: checking whether the target supports thread-local storage
configure:26396: /var/gcc/regression/trunk/8-gcc-gas/build/./gcc/xgcc
-B/var/gcc
/regression/trunk/8-gcc-gas/build/./gcc/ -B/vol/gcc/i386-pc-solaris2.8/bin/
-B/v
ol/gcc/i386-pc-solaris2.8/lib/ -isystem /vol/gcc/i386-pc-solaris2.8/include
-isy
stem /vol/gcc/i386-pc-solaris2.8/sys-include    -o conftest -g -O2   conftest.c
 >&5
configure:26396: $? = 0
configure:26396: ./conftest
ld.so.1: conftest: fatal: conftest: object requires TLS, but TLS failed to
initi
alize
/vol/gcc/src/hg/trunk/local/libstdc++-v3/configure[20]: 5945 Killed
configure:26396: $? = 137
configure: program exited with status 137

The problem is with the test, though: before Solaris 10, programs using
native TLS need to be linked with -lthread (which happens implicitly
with -pthread) to get the definition of ___tls_get_addr.

    Rainer



More information about the Gcc-bugs mailing list