Terry Guo <flame...@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

Reply via email to