Set PTHREADLIBS to "-lpthreadGC2" for MinGW
PATCH RESEND 1/1 Set PTHREADLIBS to "-lpthreadGC2" for MinGW
MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
configure renamed from configure.orig +3 -0
@@ -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
Quoted 11 lines · Sebastian Herbszt
MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
Signed-off-by Sebastian Herbszt<[email protected]>
configure line 1151
Quoted 9 lines
configure renamed from configure.orig +3
-0@@ -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.
Quoted 20 lines · JonY
Quoted 7 lines · Sebastian Herbszt
MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
Signed-off-by Sebastian Herbszt<[email protected]>configure line 1150
Quoted 8 lines
configure renamed from configure.orig +3
-0@@ -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 fiHi,
I think its better to check which library exists.
Quoted 4 lines
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
Quoted 33 lines · Jamie Lokier
Quoted 20 lines · JonY
Quoted 7 lines · Sebastian Herbszt
MinGW with pthreads-w32 requires "-lpthreadGC2" instead of "-lpthread".
Signed-off-by Sebastian Herbszt<[email protected]>configure 2009-04-26 13:36:09.000000000 +0200 line 1150
Quoted 8 lines
configure 2009-04-26 13:36:09.000000000 +0200 renamed from configure.orig 2009-04-26 13:28:03.000000000 +0200 +3
-0@@ -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 fiHi,
I think its better to check which library exists.Quoted 3 lines
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.
Quoted 6 lines
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