[Bug c/39783] New: -ftls-model can not be specified independently of -fpic/-fpie

2009-04-16 Thread tom dot aernoudt at coware dot com
It is not possible to use -ftls-model to set the tls-model to global-dynamic
for code compiled without -fpic. Code compiled without -fpic uses initial-exec
or local-exec.

This makes it impossible to link code that uses tls and is compiled without
-fpic in shared libraries.


-- 
   Summary: -ftls-model can not be specified independently of -
fpic/-fpie
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tom dot aernoudt at coware dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug target/39783] -ftls-model can not be specified independently of -fpic/-fpie

2009-04-16 Thread tom dot aernoudt at coware dot com


--- Comment #2 from tom dot aernoudt at coware dot com  2009-04-16 14:07 
---

Aren't shared libraries that are compiled without -fPIC supposed to work on
x86?

On other platforms this may not work, but I thought that on x86 this is not
required.


-- 


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



[Bug target/39783] -ftls-model can not be specified independently of -fpic/-fpie

2009-04-16 Thread tom dot aernoudt at coware dot com


--- Comment #4 from tom dot aernoudt at coware dot com  2009-04-16 14:52 
---

That may be true, but if it would be possible to tell gcc to use the
dynamic-global tls-model (or static-global) without specifying -fPIC it would
again 'happen' to work, even if tls is used.

I don't see a good reason why configuring these 2 settings independently of
each other should be prevented.


-- 


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