Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M5lVU-00062x-4r for qemu-devel@nongnu.org; Sun, 17 May 2009 14:54:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M5lVP-00062e-O8 for qemu-devel@nongnu.org; Sun, 17 May 2009 14:54:43 -0400 Received: from [199.232.76.173] (port=45017 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M5lVP-00062a-GP for qemu-devel@nongnu.org; Sun, 17 May 2009 14:54:39 -0400 Received: from mail.gmx.net ([213.165.64.20]:46395) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M5lVO-0001pv-P2 for qemu-devel@nongnu.org; Sun, 17 May 2009 14:54:39 -0400 Message-ID: <9FFB1DE1A2C54DB9A5E48B471CA0468C@FSCPC> From: "Sebastian Herbszt" References: <1242562870$1643@local> <4A1013A1.20003@gmail.com> <20090517180602.GB13426@shareable.org> In-Reply-To: <20090517180602.GB13426@shareable.org> Subject: Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW Date: Sun, 17 May 2009 20:54:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier , JonY <10walls@gmail.com> Cc: qemu-devel@nongnu.org Jamie Lokier wrote: > JonY wrote: >> On 5/17/2009 20:21, Sebastian Herbszt wrote: >> >MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread". >> > >> >Signed-off-by: Sebastian Herbszt >> > >> >--- qemu-20090426/configure.orig 2009-04-26 13:28:03.000000000 +0200 >> >+++ qemu-20090426/configure 2009-04-26 13:36:09.000000000 +0200 >> >@@ -1143,6 +1143,9 @@ >> > if $cc $ARCH_CFLAGS -o $TMPE $PTHREADLIBS $TMPC 2> /dev/null ; then >> > pthread=yes >> > PTHREADLIBS="-lpthread" >> >+ if test "$mingw32" = "yes" ; then >> >+ PTHREADLIBS="-lpthreadGC2" >> >+ fi >> > fi >> > fi >> >> Hi, >> I think its better to check which library exists. >> >> I have mine renamed to "libpthread.a" in MinGW because many packages >> expect it to be called libpthread. >> >> I'm fine with this change if the majority agrees to it. > > I agree, check for library is most appropriate. > > pthreads-w32 isn't a standard part of MinGW, and pthreads-w32 isn't > the only pthreads implementation that you can use with MinGW. > > (Quick look). No, my MinGW doesn't have it - after all the point of > MinGW is to provide a native Windows API GCC, not POSIX emulation. > > If this were Autoconf, I'd write: > > AC_SEARCH_LIBS([pthread_create], [pthread pthreadGC2]) > > Not that "-lpthread" isn't always correct on other platforms - even if > it compiles. Will write a test for -pthread and -pthreadGC2 then. - Sebastian