Notes about compiling gcj 3.4.4 for Windows

Andi Vajda andi@osafoundation.org
Tue Oct 4 23:23:00 GMT 2005


Today I cross-compiled gcc/gcj 3.4.4 for Windows following Ranjit Mathew's 
directions at http://ranjitmathew.hostingzero.com/phartz/gcj/bldgcj.html
First of all, thank you Ranjit, doing this on Linux this is *sooo* much nicer 
than on cygwin + mingw + msys + windows.
I used the 3.4.4 gcc sources from the mingw.org download site.
There were a few issues along the way that I worked around as follows:
 - The directions refer to $TARGET for creating directories.
 TARGET better be set to 'mingw32'.
 - In both cfgxgcc.sh and cfgwingcc.sh I added --enable-sjlj-exceptions to
 the configure script invocation. Without this, I get an error in
 crtstuff.c, line 607, something with SI being an invalid mode for type.
 - In mkwingcc.sh I added 'export JAR=$XGCC_DIR/bin/$TARGET-jar' and I edited
 $WINGCC_BUILD_DIR/mingw32/libjava/Makefile to have ZIP = $(JAR). Without
 this, the build process invokes whatever jar command is on your path on
 Linux and that may or may not understand all the flags passed to it.
 - After all is built and installed I had to move $PREFIX/lib/libgcj.spec to
 $PREFIX/lib/gcc/mingw32/3.4.4/ otherwise gcj would complain about not
 finding libgcj.spec when run on Windows.
 - On Windows, I also had to add a -L flag to my g++ invocation for the
 linker to find -lgcj
Other than that, Ranjit's scripts and directions are correct and invaluable.
Many thanks !
Andi..


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /