[Gc] MinGW pthreads support

Andy Wingo wingo at pobox.com
Sat Jul 2 03:03:33 PDT 2011

Hi Ivan,

Thanks for the response.

On Fri 01 Jul 2011 22:15, Ivan Maidanski <ivmai at mail.ru> writes:

> AICS, the patch does not force BDWGC to use pthreads-win32 (instead it
> uses native Win32 threads).

Ah yes I missed this one:

--- libgc-7.2.4/configure.ac~	2009-12-01 21:34:24.000000000 +0100
+++ libgc-7.2.4/configure.ac	2011-01-31 23:18:59.763071888 +0100
@@ -186,7 +186,7 @@ case "$THREADS" in
-     *-*-cygwin*)
+     *-*-cygwin*|*-*-mingw*)
         if test "${enable_parallel_mark}" = yes; then

So that --enable-threads=pthreads can work on mingw.

> You should define GC_PTHREADS (not GC_THREADS) to force it to (if you
> really need pthreads on Win32). Otherwise THREADDLLIBS="-lpthread"
> should be removed.
> I think we could just use (choosing Win32 threads for mingw):
>      *-*-cygwin* | *-*-mingw*)

That's probably possible, but we would like to be able to compile
pthread-using programs on mingw32, if possible.  (It's clearly an
attempt at self-delusion, to use pthreads on windows, but hey, I hear it


More information about the Gc mailing list