[PATCH] Fix TLS support on SPARC/Solaris with native tools
Eric Botcazou
ebotcazou@libertysurf.fr
Thu Jan 15 07:57:00 GMT 2004
Hi,
I recently got access to the Sun ONE Studio 8 Compiler (Sun cc v5.5), which
amongst its new features sports... PCH and TLS! [This was probably too hard
and too long an effort :-) because v5.4 and v5.5 miscompile 32-bit GCC, a
regression from 5.3 related to 'long long' arithmetics]. So I played a bit
with the TLS-enabled assembler, only to discover than the TLS support
doesn't work with it.
The problems are minor and fixed by the attached patch. It was bootstrapped
and regtested on sparc-sun-solaris2.8 (mainline, C only), with no failure in
the TLS testsuite, and I verified it produces TLS code that is compatible
with the one produced by Sun CC.
OK for mainline?
2004-01-15 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/elfos.h (ASM_DECLARE_OBJECT_NAME): Emit
"tls_object" for thread-local objects.
* config/sparc/sparc.c (sparc_elf_asm_named_section): Emit
"#tls" for thread-local sections.
* configure.ac (thread-local checks): Specify --fatal-warnings in
every binutils-specific checks. For sparc*-*-*, test whether the
OS is Solaris and the tools are native and act accordingly.
* configure: Rebuild.
2004-01-15 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/tls/alias-1.c: Add dg-warning for unsupported visibility
attribute on sparc*-sun-solaris2.*.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc_tls-2.diff
Type: text/x-diff
Size: 9037 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040115/71ab423f/attachment.bin>
More information about the Gcc-patches
mailing list