[Dev] [SDK/Emulator] Re: Fwd: RE: yagl mac os

Thiago Macieira thiago.macieira at intel.com
Wed Oct 2 18:25:05 GMT 2013

On quarta-feira, 2 de outubro de 2013 12:20:18, 황석연 wrote:
> Dear Patrick,
> I want to use clang on Mac.
> Because it is default compiler and "__thread" keyword is usable with GCC
> only. (I know that a TLS is exist on ELF format, so GCC on mac is not
> support real TLS.) 
> I tested VIGS with pthread_getspecific / pthread_setspecific on clang.
> A compilation VIGS on Mac is not urgent, so I think I would be able to push
> modified code to GIT on next week. 

I've just tested XCode 5.0 (using Clang) and the following source code 

static __thread int x; 
void f(int y) { x = y; } 
int g() { return x; }

in another .c file:
int main(int argc, char **argv)
    return g();

It compiles fine also with -std=c89, -std=c99, -std=c11, -std=c++98, -std=c++11 
and -std=c++1y.

Why do you think it doesn't work?

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.tizen.org/pipermail/dev/attachments/20131002/864a5d6a/attachment.asc>

More information about the Dev mailing list