This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: libgcj for win32
Jon Beniston wrote:
> > That's great news, Jon. Did you port to win32 threads or use the pthreads
> > compatibility library? Are you using the Cygwin or Mingw32
> > compiler environment?
>
> Win32 native. I use a cygwin environment to build, but use -mno-cygwin to
> target
> ming so there's no dependencies on cygwin.dll. (Oops, I forgot to mention
> that
> switch on the web page!). Also included in the binaries is a (hopefully)
> thread safe
> version of libgcc.a (/usr/local/libgccgcj.a).
Cool. Yours could be the first thread port in libgcj other than
pthreads, so we'll see how portable the thread interface can be.
I assume you built your gcj with --enable-threads=win32 to get
thread-safe exception handling... recent snapshots should have this
option.
> > The GC should work without much hassle... but note that it currently
> > requires the DLL configuration on win32. If you don't build libgcjgc as a
> > DLL, it won't get the DLL_THREAD_ATTACH messages and won't work in a
> > multithreaded VM.
>
> Er, how do you do that?
Libtool should be able to do it, but probably won't without some
tweaking. Check out boehm-gc/README.win32 for some pointers... there is
a Makefile.DLLs that was written for a fairly old version of Cygwin
(called GNU-Win32 back then) which may be helpful... failing that, get
dllwrap and try it yourself. Mumit's site
(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) has very good
information on GCC, Win32 and DLL's.
--
Jeff Sturm
jsturm@sigma6.com