From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M5kkV-00012e-Ah for qemu-devel@nongnu.org; Sun, 17 May 2009 14:06:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M5kkQ-000103-Mx for qemu-devel@nongnu.org; Sun, 17 May 2009 14:06:10 -0400 Received: from [199.232.76.173] (port=33594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M5kkQ-0000zy-IG for qemu-devel@nongnu.org; Sun, 17 May 2009 14:06:06 -0400 Received: from mail2.shareable.org ([80.68.89.115]:40388) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M5kkO-0004Wm-ST for qemu-devel@nongnu.org; Sun, 17 May 2009 14:06:05 -0400 Date: Sun, 17 May 2009 19:06:02 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW Message-ID: <20090517180602.GB13426@shareable.org> References: <1242562870$1643@local> <4A1013A1.20003@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A1013A1.20003@gmail.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: JonY <10walls@gmail.com> Cc: qemu-devel@nongnu.org, Sebastian Herbszt 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. -- Jamie