[Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC

2011-01-06 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38118

--- Comment #6 from Rainer Orth ro at gcc dot gnu.org 2011-01-06 19:00:14 UTC 
---
Author: ro
Date: Thu Jan  6 19:00:10 2011
New Revision: 168550

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=168550
Log:
PR target/38118
* config/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Also switch to .bss
if coming from .tdata.
* config/i386/sol2-10.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sol2-10.h
trunk/gcc/config/sol2.h


[Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC

2010-03-24 Thread ro at gcc dot gnu dot org


--- Comment #5 from ro at gcc dot gnu dot org  2010-03-24 18:50 ---
Subject: Bug 38118

Author: ro
Date: Wed Mar 24 18:49:49 2010
New Revision: 157705

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157705
Log:
* configure.ac (i[34567]86-*-*): Handle Solaris 2/x86 TLS support
and Sun as TLS syntax.
(TLS_SECTION_ASM_FLAG) [on_solaris  !gas_flag]: Define.
* configure: Regenerate.
* config.in: Regenerate.
* varasm.c (TLS_SECTION_ASM_FLAG): Define default.
(default_elf_asm_named_section): Use it.
* config/i386/i386.c (output_pic_addr_const): Lowercase @DTPOFF.
(i386_output_dwarf_dtprel): Likewise.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @GOTTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @GOTNTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @INDNTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @NTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @TPOFF.
(output_addr_const_extra): Likewise.
* config/i386/i386.md (*tls_global_dynamic_32_gnu): Lowercase
@TLSGD.
(*tls_global_dynamic_64): Likewise.
(*tls_local_dynamic_base_32_gnu): Lowercase @TLSLDM.
(*tls_local_dynamic_base_64): Lowercase @TLSLD.

* defaults.h (TLS_COMMON_ASM_OP): Provide default.
(ASM_OUTPUT_TLS_COMMON): Use it.
* config/i386/sol2-gas.h (TLS_COMMON_ASM_OP): Undef.

PR target/38118
* config.gcc (sparc*-*-solaris2*) [$gas=yes]: Add usegas.h to
tm_file.
* config/sparc/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Move ...
* config/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): ... here.
* config/i386/sol2-10.h (ASM_OUTPUT_ALIGNED_COMMON): Redefine.
* config/i386/sol2.h (TARGET_SUN_TLS): Redefine.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/config.in
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.md
trunk/gcc/config/i386/sol2-10.h
trunk/gcc/config/i386/sol2-gas.h
trunk/gcc/config/i386/sol2.h
trunk/gcc/config/sol2.h
trunk/gcc/config/sparc/sol2.h
trunk/gcc/configure
trunk/gcc/configure.ac
trunk/gcc/defaults.h
trunk/gcc/varasm.c


-- 


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



[Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC

2008-11-18 Thread ebotcazou at gcc dot gnu dot org


--- Comment #3 from ebotcazou at gcc dot gnu dot org  2008-11-18 08:24 
---
 I'm not completely sure this is a bug in Sun as.  If you consider the
 assembler code for my testcase produced by gcc:
 
 .global tsd
 .section.tbss,#alloc,#write,#tls
 .align 4
 .type   tsd, #tls_object
 .size   tsd, 4
 tsd:
 .skip 4
 .common non_tsd,4,4
 
 versus what Studio 12 cc produces:
 
 .section.bss,#alloc,#write
 .common non_tsd,4,4
 .section.tbss,#alloc,#write,#tls
 .common tsd,4,4
 
 you see that gcc lacks the section switching between non_tsd and tsd.

OK, this makes sense, but I'd suggest discussing that under PR 29987.


-- 


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



[Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC

2008-11-18 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2008-11-18 09:39 ---
If you don't want to call it a bug, call it at least a misfeature.
Given that Solaris as supports .tls_common directive, having .common directive
behave differently depending on whether current section is .tbss (apparently
comparison by name, flags don't matter and when in .tdata .common behaves
normally) or not is very surprising.


-- 


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



[Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC

2008-11-17 Thread ro at techfak dot uni-bielefeld dot de


--- Comment #2 from ro at techfak dot uni-bielefeld dot de  2008-11-17 
14:25 ---
Subject: Re:  gcc emits non-TLS data as TLS on Solaris 11/SPARC

I'm not completely sure this is a bug in Sun as.  If you consider the
assembler code for my testcase produced by gcc:

.global tsd
.section.tbss,#alloc,#write,#tls
.align 4
.type   tsd, #tls_object
.size   tsd, 4
tsd:
.skip 4
.common non_tsd,4,4

versus what Studio 12 cc produces:

.section.bss,#alloc,#write
.common non_tsd,4,4
.section.tbss,#alloc,#write,#tls
.common tsd,4,4

you see that gcc lacks the section switching between non_tsd and tsd.

Rainer


-- 


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



[Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC

2008-11-14 Thread ebotcazou at gcc dot gnu dot org


--- Comment #1 from ebotcazou at gcc dot gnu dot org  2008-11-14 19:08 
---


*** This bug has been marked as a duplicate of 29987 ***


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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