Re[2]: [Gc] MinGW pthreads support

Ivan Maidanski ivmai at mail.ru
Mon Jul 4 06:35:34 PDT 2011


Hi Andy,

Your previous patch was right. (I hadn't noticed that this code is inside pthreads case switch.)

> -     *-*-cygwin*)
> +     *-*-cygwin*|*-*-mingw*)
> AC_DEFINE(GC_THREADS)

This is wrong as GC_WIN32_PTHREADS should be defined for mingw (win32-pthreads).

I've commit the patch similar to your first one. Please check it works for you.

Regards.

02 jul 2011, 14:13 Andy Wingo <wingo at pobox.com>:
> 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
> *-*-irix*)
> AC_DEFINE(GC_IRIX_THREADS)
> ;;
> -     *-*-cygwin*)
> +     *-*-cygwin*|*-*-mingw*)
> AC_DEFINE(GC_THREADS)
> if test "${enable_parallel_mark}" = yes; then
> AC_DEFINE(PARALLEL_MARK)
> 
> 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
> works!)
> 
> Andy
> -- 
> http://wingolog.org/
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/



More information about the Gc mailing list