This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
RE: [PATCH] Fix PR 32915 dllimport regression
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: 'FX Coudert' <fxcoudert at gmail dot com>
- Cc: 'GFORTRAN' <fortran at gcc dot gnu dot org>
- Date: Sat, 28 Jul 2007 22:19:09 +1200
- Subject: RE: [PATCH] Fix PR 32915 dllimport regression
> -----Original Message-----
> From: FX Coudert [mailto:fxcoudert@gmail.com]
> Sent: Saturday, 28 July 2007 8:52 p.m.
> To: Danny Smith
> Cc: GCC-patches; GFORTRAN
> Subject: Re: [PATCH] Fix PR 32915 dllimport regression
>
>
> >> 2007-07-28 Danny Smith <dannysmith@users.sourcforge.net>
> >>
> >> PR target/32915
> >> * config/i386/i386.c (get_dllimport_decl):
> >> SET_DECL_ASSEMBLER_NAME
> >> of the generated dllimport decl.
>
> Thanks a lot for providing a patch so quickly!
>
> >> (As an aside why are you using a pthread_once weakref on mingw32?)
>
> It appears on my build for mingw + pthreads-win32; libgfortran/io/
> io.h includes gthr.h, which in turns include gthr-posix.h. The only
> functions used are then __gthread_mutex_lock and
> __gthread_mutex_unlock, to make the I/O library (and the random
> number generator) thread-safe (courtesy of Jakub Jelinek).
>
I see. IMO is better to use the gthr-win32 thread layer within gcc
runtime libs for mingw32. The only reason to use the pthreads-win32
libarary is to enable libgomp, but we don't want to force users to
depend on pthread-win32 libs (which is LGPL, IIRC), if they don't need
openmp.
I also wonder about interoperability of fortan modules using pthreads
with C and C++ modules using gtr-win32 (particularly important now that
C recognizes __thread on mingw32, via gthread layer. Also, I don't know
if anyone has actually tested whether --enable-threads=posix will
actually work for libstdc++ builds.
In my experience, there are no problems with libgomp testsuite and
gfortan openmp tests using
configure --enable-libgomp --enable-threads=win32, as long as pthread
lib is found while building/using libgomp.
Danny
> FX
>