This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49541] [4.6/4.7 regression] TLS support partially broken in 64-bit mode
- 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: Wed, 13 Jul 2011 17:57:11 +0000
- Subject: [Bug target/49541] [4.6/4.7 regression] TLS support partially broken in 64-bit mode
- Auto-submitted: auto-generated
- References: <bug-49541-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49541
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-13 17:56:26 UTC ---
> --- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-13 16:11:25 UTC ---
>> Since I could only run the bootstrap on a Solaris 8 branded zone where the
>> default libthread.so is a copy of the lwp one, could you try it on bare metal
>> to confirm that it works?
>
> Works essentially OK by me. The only remaining glitches are:
Fine, I'll commit the patch then.
> output is:
> Undefined first referenced
> symbol in file
> __tls_get_addr
> /nile.build/botcazou/gcc-head/sparc-sun-solaris2.8/sparc-sun-solaris2.8/sparcv9/libgomp/.libs/libgomp.so
> ld: fatal: Symbol referencing errors. No output written to ./condinc2.exe
> collect2: error: ld returned 1 exit status
>
> FAIL: libgomp.fortran/condinc2.f -O (test for excess errors
>
>
> but this is more of a test harness issue: the 4 tests are compiled with the
> combination -fno-openmp -lgomp so -pthread isn't added by the driver.
This is strange: in my case, libgomp.so is self-contained and linked
with the right libthread.so which provides __tls_get_addr:
> LD_LIBRARY_PATH=. ldd -r ./libgomp.so.1
librt.so.1 => /usr/lib/64/librt.so.1
libgcc_s.so.1 => ./libgcc_s.so.1
libpthread.so.1 => /usr/lib/64/libpthread.so.1
libthread.so.1 => /usr/lib/lwp/64/libthread.so.1
libc.so.1 => /usr/lib/64/libc.so.1
libaio.so.1 => /usr/lib/64/libaio.so.1
libdl.so.1 => /usr/lib/64/libdl.so.1
/usr/platform/SUNW,Sun-Fire-V440/lib/sparcv9/libc_psr.so.1
Rainer