public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* I cannot disable GCC TLS support thoroughly.
@ 2011-09-22 10:05 Terry Guo
  2011-09-22 17:34 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Terry Guo @ 2011-09-22 10:05 UTC (permalink / raw)
  To: gcc

Hello,

I configured my gcc with "--disable-tls" for arm-none-eabi. But it can
still successfully compile the below case:

  __thread int i;
        int f (void) { return i; }
        void main (int j) { i = j; }

The "dg-require-effective-target tls" use this case to check whether
target supports tls. So how to configure GCC to let it fail to compile
this case, and then let the dg test framework thinks the tls is
unsupported? Thanks in advance.

BR,
Terry

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: I cannot disable GCC TLS support thoroughly.
  2011-09-22 10:05 I cannot disable GCC TLS support thoroughly Terry Guo
@ 2011-09-22 17:34 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-09-22 17:34 UTC (permalink / raw)
  To: Terry Guo; +Cc: gcc

Terry Guo <flameroc@gmail.com> writes:

> I configured my gcc with "--disable-tls" for arm-none-eabi. But it can
> still successfully compile the below case:
>
>   __thread int i;
>         int f (void) { return i; }
>         void main (int j) { i = j; }
>
> The "dg-require-effective-target tls" use this case to check whether
> target supports tls. So how to configure GCC to let it fail to compile
> this case, and then let the dg test framework thinks the tls is
> unsupported? Thanks in advance.

When the assembler and/or linker do not support TLS, gcc will emulate it
using pthread_key_create.  So as far as I know there is no way to
thoroughly disable it.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-22 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22 10:05 I cannot disable GCC TLS support thoroughly Terry Guo
2011-09-22 17:34 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).