From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF5qq-0001hL-Pu for qemu-devel@nongnu.org; Sat, 24 Jan 2015 13:54:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YF5qn-0003QV-HN for qemu-devel@nongnu.org; Sat, 24 Jan 2015 13:54:32 -0500 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:53026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF5qn-0003QP-AO for qemu-devel@nongnu.org; Sat, 24 Jan 2015 13:54:29 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so3061962wiv.0 for ; Sat, 24 Jan 2015 10:54:28 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54C3EA60.5080801@redhat.com> Date: Sat, 24 Jan 2015 19:54:24 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <4CA1A9CB-10A5-4CC9-BC96-7402E4DD78CA@gmail.com> <54C2B00D.7030307@redhat.com> <54C2B547.5010801@redhat.com> <3B3F06B4-5633-4CC7-9A32-8D2B244D0ED6@gmail.com> <54C2BF2F.7040208@redhat.com> <54C2C199.3060607@redhat.com> <6EF0A76B-7542-4045-B983-19076069A7F0@gmail.com> In-Reply-To: <6EF0A76B-7542-4045-B983-19076069A7F0@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] qemu-coroutine.c: error: thread-local storage not supported for this target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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