On Tue, May 30, 2006 at 04:37:35PM +0200, Fran?ois-Xavier Coudert wrote:
> >you just port libgomp to mingw32 + pthreads-win32
> >and assuming pthreads-win32 is sufficiently rich and not too buggy, it will
> >just work.
> 
> With the attached patch, I can compile libgomp with
> 
> ../gcc/configure --prefix=/mingw --disable-nls --with-ld=/mingw/bin/ld
> --with-as=/mingw/bin/as --disable-werror --enable-bootstrap
> --enable-threads=posix --with-win32-nlsapi=unicode
> --host=i386-pc-mingw32 --enable-languages=c,fortran --enable-libgomp
> 
> and the resulting compiler and generated executables seem to work (I
> tried a few C and Fortran toy codes). The main changes are to
> libgomp/config/posix/time.c, which used functions not available on
> mingw32. Would they be acceptable in this form (protected with #ifdef
> _WIN32)? If so, I'll do some more testing, and officially submit the
> patch.

_WIN32 #ifdefs are just too ugly, additionally including a system
header inside of a routine is a big no no.
I think it would be much cleaner if you added config/mingw32/time.c
instead and tweaked config.tgt, after all, the file only contains the
2 routines and you use completely different bodies for those routines
on mingw32 than on any other target.

        Jakub

Reply via email to