On Tue, Aug 9, 2011 at 5:25 PM, dsh <daniel.hais...@googlemail.com> wrote:
> Looks like OS X does not support thread local storage. I.e. __thread
> causes an compile error and thus one would not need to use
> --enable-threads or would need to disable them explicitely using
> --disable-threads. Is this a known issue on OS X?
>

That's what I meant when I mentioned 'convert usages of __thread to
Posix thread TLS calls' in my previous post [1].

__thread works for me with GCC on Mac OS X (using the GCC build from
the HPC project [2]), but causes a compile error with Clang/LLVM. It's
listed as a limitation of Clang on Mac OS X in the Clang user manual
(look for __thread on this page [3]).

Are you getting a compile error with GCC too? or just with Clang?

For now you could just run configure without --enable-threads, then
later try to convert the few references to __thread to Posix thread
TLS calls (i.e. pthread_key_create, pthread_getspecific,
pthread_setspecific, pthread_key_delete).

[1] http://marc.info/?l=tuscany-dev&m=131265451321095&w=2
[2] http://hpc.sourceforge.net/
[3] http://clang.llvm.org/docs/UsersManual.html

--
Jean-Sebastien

Reply via email to