On Thu, Oct 13, 2011 at 1:23 AM, dsh <[email protected]> wrote:

> [1] <- That's what you are looking for in terms of CLang and pthread no?
>
> [1]
> http://stackoverflow.com/questions/2391194/what-is-gs-pthread-equiv-in-clang
>
> Cheers
> Daniel
>
>
Not sure. My understanding is that -pthread adds -lpthread to link with the
pthread lib, allowing you to use Posix pthreads in your code. I'm not 100%
sure though as I couldn't find a definitive reference on the CLang command
line options. Also, I was able to use Posix pthreads without passing that
option.

It sounded like Giorgio was looking for something else, an alternative to
pthreads, with the C++0x std::thread support. I asked on the Clang dev list
and got this response [1]. So we'd have to use the Apple LLVM compiler 3.0
to get support for std::thread. Also it looks like CLang has not yet
implemented support for thread local storage. See language feature N2659
there [2].

[1] http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-October/017912.html
[2] http://clang.llvm.org/cxx_status.html
--
Jean-Sebastien

Reply via email to