[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for M
Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW
Sun, 17 May 2009 20:54:29 +0200
Jamie Lokier wrote:
On 5/17/2009 20:21, Sebastian Herbszt wrote:
>MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
>Signed-off-by: Sebastian Herbszt<address@hidden>
>--- 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
>+ if test "$mingw32" = "yes" ; then
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
Will write a test for -pthread and -pthreadGC2 then.