* [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW
@ 2009-05-17 12:21 Sebastian Herbszt
2009-05-17 13:39 ` JonY
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Herbszt @ 2009-05-17 12:21 UTC (permalink / raw)
To: qemu-devel; +Cc: herbszt
MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
--- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW
2009-05-17 12:21 [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW Sebastian Herbszt
@ 2009-05-17 13:39 ` JonY
2009-05-17 18:06 ` Jamie Lokier
0 siblings, 1 reply; 4+ messages in thread
From: JonY @ 2009-05-17 13:39 UTC (permalink / raw)
To: Sebastian Herbszt; +Cc: qemu-devel
On 5/17/2009 20:21, Sebastian Herbszt wrote:
> MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
>
> Signed-off-by: Sebastian Herbszt<herbszt@gmx.de>
>
> --- 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW
2009-05-17 13:39 ` JonY
@ 2009-05-17 18:06 ` Jamie Lokier
2009-05-17 18:54 ` Sebastian Herbszt
0 siblings, 1 reply; 4+ messages in thread
From: Jamie Lokier @ 2009-05-17 18:06 UTC (permalink / raw)
To: JonY; +Cc: qemu-devel, 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<herbszt@gmx.de>
> >
> >--- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW
2009-05-17 18:06 ` Jamie Lokier
@ 2009-05-17 18:54 ` Sebastian Herbszt
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Herbszt @ 2009-05-17 18:54 UTC (permalink / raw)
To: Jamie Lokier, JonY; +Cc: qemu-devel
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<herbszt@gmx.de>
>> >
>> >--- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-17 18:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-17 12:21 [Qemu-devel] [PATCH][RESEND] Set PTHREADLIBS to "-lpthreadGC2" for MinGW Sebastian Herbszt
2009-05-17 13:39 ` JonY
2009-05-17 18:06 ` Jamie Lokier
2009-05-17 18:54 ` Sebastian Herbszt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.