From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbVZE-0000KA-Ge for qemu-devel@nongnu.org; Thu, 22 Nov 2012 07:07:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbVZ9-0006IJ-Uj for qemu-devel@nongnu.org; Thu, 22 Nov 2012 07:07:40 -0500 Received: from goliath.siemens.de ([192.35.17.28]:24028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbVZ9-0006I0-Kr for qemu-devel@nongnu.org; Thu, 22 Nov 2012 07:07:35 -0500 Message-ID: <50AE1581.9070405@siemens.com> Date: Thu, 22 Nov 2012 13:07:29 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <50ACDE8F.5010507@siemens.com> <50ACE050.8050001@redhat.com> <50ACE564.9030204@siemens.com> <50ACE764.1070608@redhat.com> <50AD277A.8000904@weilnetz.de> In-Reply-To: <50AD277A.8000904@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] coroutine: Fix win32 variant for older mingw32 compilers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Kevin Wolf , Paolo Bonzini , qemu-devel , Stefan Weil On 2012-11-21 20:11, Stefan Weil wrote: > Am 21.11.2012 15:38, schrieb Paolo Bonzini: >> Il 21/11/2012 15:33, malc ha scritto: >>>>>>> Leaking leader is a bit bad, but it looks ok for 1.3. >>>>> Hmm. A TLS destructor is apparently not available. Is there some "on >>>>> thread termination" callback mechanism on Windows? Didn't find one on >>>>> first glance. >>>>> >>> Dlls receive something like THREAD_DETTACH in it's startup routine or >>> something like that if my memory serves me. >> Only DLLs. >> >> But this sounds like deja-vu. I'm pretty sure in the past we just >> decided that this compiler is not supported (of course it's bad that >> it's silent). Stefan, do you remember the details? >> >> Paolo > > Debian cross works with -mthread.The issue was discussed here: Yep, works here as well. With this knowledge, why not convert the TLS usage in qemu-thread-win32.c as well? That's what motivated me to go this path. > > https://bugs.launchpad.net/qemu/+bug/932487 > > Jan, I don't think your patch should be applied. I agree, but we need a different solution for this subtle failure. > > Current MinGW / MinGW-w64 compilers work, so those users > which compile and use QEMU on Windows won't have a problem. > With MinGW-w64, it is even possible to compile QEMU with nearly > no warnings :-) > > Debian cross development is full of difficulties. Passing an extra > compiler option like -mthread is only one of these difficulties. > I updated http://wiki.qemu.org/Hosts/W32, so anybody who really > wants to run cross compilations on Debian can get more information > there. > > We could add a check to configure and add -mthread automatically. > Up to now, there was no consensus whether this is wanted because > -mthread adds a library to QEMU's dependencies. As the alternative to this is a crashing QEMU, I doubt there is much to discuss. Do we know which mingw version is fine without -mthreads? Or do we have to test this during configure? Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux