Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
The lack of emulated TLS on 10.6 is the consequence of a political choice, though. GCC 4.3 was released long before Snow Leopard, but users are stuck with 4.2.1 because of the license. Paolo -Original Message- From: Peter Maydell [peter.mayd...@linaro.org] Received: sabato, 24 gen 2015, 20:33 To: Paolo Bonzini [pbonz...@redhat.com] CC: Programmingkid [programmingk...@gmail.com]; Kevin Wolf [kw...@redhat.com]; qemu-devel qemu-devel [qemu-devel@nongnu.org] Subject: Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target On 24 January 2015 at 18:54, Paolo Bonzini wrote: > 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. Apple's not providing it on 10.6.x because 10.6.x is obsolete as far as Apple is concerned. Supported versions of OSX use clang, which has support for __thread. Missing __thread support is an "old platform" thing, not a political GPL thing. -- PMM
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On 24 January 2015 at 18:54, Paolo Bonzini wrote: > 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. Apple's not providing it on 10.6.x because 10.6.x is obsolete as far as Apple is concerned. Supported versions of OSX use clang, which has support for __thread. Missing __thread support is an "old platform" thing, not a political GPL thing. -- PMM
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
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
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On Jan 23, 2015, at 4:48 PM, Paolo Bonzini wrote: > > > On 23/01/2015 22:37, Paolo Bonzini wrote: >> >> >> On 23/01/2015 22:33, Programmingkid wrote: Use clang then. >>> >>> Could you provide directions on how you want me to do this? In the >>> configure options, this was all I found: >>> --objcc=OBJCCuse Objective-C compiler OBJCC [clang] >> >> ./configure --cc=clang --cxx=clang++ >> >> But QEMU uses "cc" and "c++" by default, not "gcc" and "g++", and on Mac >> OS X "cc" and "c++" should be clang. So "./configure" should just work. > > 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.
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On 23/01/2015 22:37, Paolo Bonzini wrote: > > > On 23/01/2015 22:33, Programmingkid wrote: >>> Use clang then. >> >> Could you provide directions on how you want me to do this? In the configure >> options, this was all I found: >> --objcc=OBJCCuse Objective-C compiler OBJCC [clang] > > ./configure --cc=clang --cxx=clang++ > > But QEMU uses "cc" and "c++" by default, not "gcc" and "g++", and on Mac > OS X "cc" and "c++" should be clang. So "./configure" should just work. 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). Paolo
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On 23/01/2015 22:33, Programmingkid wrote: > > Use clang then. > > Could you provide directions on how you want me to do this? In the configure > options, this was all I found: > --objcc=OBJCCuse Objective-C compiler OBJCC [clang] ./configure --cc=clang --cxx=clang++ But QEMU uses "cc" and "c++" by default, not "gcc" and "g++", and on Mac OS X "cc" and "c++" should be clang. So "./configure" should just work. Paolo
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On Jan 23, 2015, at 3:55 PM, Paolo Bonzini wrote: > > > On 23/01/2015 21:39, Programmingkid wrote: >> On 23/01/2015 20:27, Programmingkid wrote: >>> I used the newest version from QEMU's git with this id: >>> a46b3aaf6bb038d4f6f192a84df204f10929e75c. When I tried to compile >>> QEMU on Mac OS 10.6.8, I saw this error: qemu-coroutine.c:29: error: >>> thread-local storage not supported for this target. >> >> GCC 4.2.1. > > Use clang then. > > Paolo Could you provide directions on how you want me to do this? In the configure options, this was all I found: --objcc=OBJCCuse Objective-C compiler OBJCC [clang]
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On 23/01/2015 21:39, Programmingkid wrote: > On 23/01/2015 20:27, Programmingkid wrote: >> I used the newest version from QEMU's git with this id: >> a46b3aaf6bb038d4f6f192a84df204f10929e75c. When I tried to compile >> QEMU on Mac OS 10.6.8, I saw this error: qemu-coroutine.c:29: error: >> thread-local storage not supported for this target. > > GCC 4.2.1. Use clang then. Paolo
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On Jan 23, 2015, at 3:33 PM, Paolo Bonzini wrote: > > > On 23/01/2015 20:27, Programmingkid wrote: >> I used the newest version from QEMU's git with this id: >> a46b3aaf6bb038d4f6f192a84df204f10929e75c. When I tried to compile >> QEMU on Mac OS 10.6.8, I saw this error: qemu-coroutine.c:29: error: >> thread-local storage not supported for this target. > > GCC or clang? > > Paolo GCC 4.2.1.
Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
On 23/01/2015 20:27, Programmingkid wrote: > I used the newest version from QEMU's git with this id: > a46b3aaf6bb038d4f6f192a84df204f10929e75c. When I tried to compile > QEMU on Mac OS 10.6.8, I saw this error: qemu-coroutine.c:29: error: > thread-local storage not supported for this target. GCC or clang? Paolo