This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/52104] go1 fails to link on Solaris 8/9 x86 with native TLS
- From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2012 10:55:07 +0000
- Subject: [Bug libstdc++/52104] go1 fails to link on Solaris 8/9 x86 with native TLS
- Auto-submitted: auto-generated
- References: <bug-52104-4@http.gcc.gnu.org/bugzilla/>
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