All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
@ 2015-01-23 19:27 Programmingkid
  2015-01-23 20:33 ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Programmingkid @ 2015-01-23 19:27 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Kevin Wolf, stefanha

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 19:27 [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target Programmingkid
@ 2015-01-23 20:33 ` Paolo Bonzini
  2015-01-23 20:39   ` Programmingkid
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2015-01-23 20:33 UTC (permalink / raw)
  To: Programmingkid, qemu-devel qemu-devel; +Cc: Kevin Wolf, stefanha



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 20:33 ` Paolo Bonzini
@ 2015-01-23 20:39   ` Programmingkid
  2015-01-23 20:55     ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Programmingkid @ 2015-01-23 20:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Kevin Wolf, qemu-devel qemu-devel


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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 20:39   ` Programmingkid
@ 2015-01-23 20:55     ` Paolo Bonzini
  2015-01-23 21:33       ` Programmingkid
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2015-01-23 20:55 UTC (permalink / raw)
  To: Programmingkid; +Cc: Kevin Wolf, qemu-devel qemu-devel



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 20:55     ` Paolo Bonzini
@ 2015-01-23 21:33       ` Programmingkid
  2015-01-23 21:37         ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Programmingkid @ 2015-01-23 21:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Kevin Wolf, qemu-devel qemu-devel


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=OBJCC            use Objective-C compiler OBJCC [clang]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 21:33       ` Programmingkid
@ 2015-01-23 21:37         ` Paolo Bonzini
  2015-01-23 21:48           ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2015-01-23 21:37 UTC (permalink / raw)
  To: Programmingkid; +Cc: Kevin Wolf, qemu-devel qemu-devel



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=OBJCC            use 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 21:37         ` Paolo Bonzini
@ 2015-01-23 21:48           ` Paolo Bonzini
  2015-01-23 22:54             ` Programmingkid
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2015-01-23 21:48 UTC (permalink / raw)
  To: Programmingkid; +Cc: Kevin Wolf, qemu-devel qemu-devel



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=OBJCC            use 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 21:48           ` Paolo Bonzini
@ 2015-01-23 22:54             ` Programmingkid
  2015-01-24 18:54               ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Programmingkid @ 2015-01-23 22:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Kevin Wolf, qemu-devel qemu-devel


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=OBJCC            use 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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-23 22:54             ` Programmingkid
@ 2015-01-24 18:54               ` Paolo Bonzini
  2015-01-24 19:33                 ` Peter Maydell
  0 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2015-01-24 18:54 UTC (permalink / raw)
  To: Programmingkid; +Cc: Kevin Wolf, qemu-devel qemu-devel



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-24 18:54               ` Paolo Bonzini
@ 2015-01-24 19:33                 ` Peter Maydell
  2015-01-24 19:59                   ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2015-01-24 19:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Kevin Wolf, Programmingkid, qemu-devel qemu-devel

On 24 January 2015 at 18:54, Paolo Bonzini <pbonzini@redhat.com> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target
  2015-01-24 19:33                 ` Peter Maydell
@ 2015-01-24 19:59                   ` Paolo Bonzini
  0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2015-01-24 19:59 UTC (permalink / raw)
  To: peter.maydell; +Cc: kwolf, programmingkidx, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

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.maydell@linaro.org]
Received: sabato, 24 gen 2015, 20:33
To: Paolo Bonzini [pbonzini@redhat.com]
CC: Programmingkid [programmingkidx@gmail.com]; Kevin Wolf [kwolf@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 <pbonzini@redhat.com> 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

[-- Attachment #2: Type: text/html, Size: 1454 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-24 19:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 19:27 [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target Programmingkid
2015-01-23 20:33 ` Paolo Bonzini
2015-01-23 20:39   ` Programmingkid
2015-01-23 20:55     ` Paolo Bonzini
2015-01-23 21:33       ` Programmingkid
2015-01-23 21:37         ` Paolo Bonzini
2015-01-23 21:48           ` Paolo Bonzini
2015-01-23 22:54             ` Programmingkid
2015-01-24 18:54               ` Paolo Bonzini
2015-01-24 19:33                 ` Peter Maydell
2015-01-24 19:59                   ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.