On 23/01/2015 23:54, Programmingkid wrote:
>> Sorry, I was wrong.  I missed that you are using 10.6.x.
>> 
>> Thread-local storage was introduced on Mac OS X in 10.7.  For
>> 10.6.x you'll have to compile GCC 4.3 or newer yourself (or take it
>> from fink/homebrew/whatever the Mac folks use these days).
> 
> The code that causes this problem needs to be #ifdef'ed. I'm just not
> sure what the problem code is.

Thread-local storage will become more and more fundamental as QEMU makes
more use of threads.  Another use of __thread will be committed in a
matter of weeks; __thread is simpler and potentially faster than pthread
TLS.

A possible alternative would be to enable QEMU to compile with a C++
compiler and use Boost's thread-local storage module.  Using #ifdef
makes code ugly for no reason, and is not an acceptable alternative.

Note that GCC 4.3 was released almost seven years ago; we've been
requiring it on Windows for three years (commit 00dccaf, coroutine:
introduce coroutines, 2011-01-17), and no one has ever complained.

Apple is not providing it for Mac OS X 10.6.x only because of political
reasons.  Complain to them, not to the QEMU project.

Paolo

Reply via email to