For native and cross builds to MinGW (mingw32 or i386-pc-mingw32), Java and libgcj are unnecessarily disabled by the top-level configure - they have been building just fine for quite some time now in mainline. To get libgcj to build, one has to explicitly specify --enable-libgcj to the configure command. The following simple change fixes this (configure needs to be regenerated): Index: configure.in =================================================================== --- configure.in 2005-02-15 10:36:30.000000000 +0530 +++ configure.in 2005-02-15 10:37:01.000000000 +0530 @@ -588,5 +588,5 @@ case "${target}" in i[[3456789]]86-*-mingw32*) target_configdirs="$target_configdirs target-mingw" - noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs expect target-libgloss" # Can't build gdb for mingw32 if not native.
Confirmed.
Q: As a (new/cautious) target co-maintainer, is this within my domain to fix without seeking approval? This is not a regression, so I assume it would wait until after branching. Correct? Danny
Subject: Re: Java Unnecessarily Disabled for MinGW [I'm far from a GCC demigod, but...] > Q: As a (new/cautious) target co-maintainer, is this within my domain to fix > without seeking approval? I would think so. > This is not a regression, so I assume it would wait until after branching. > Correct? Mainline seems to be in a "bug fixes only" mode right now, not "regressions only". This is confirmed by the GCC home page. All said, this is a rather trivial, target-specific, fix, that should help GCC newbies build GCC (including Java) for MinGW. My 2p. Ranjit.
Via this change: http://gcc.gnu.org/viewcvs/trunk/configure.in?r1=114048&r2=114435 we now have Boehm-GC also added to the things that are unnecessarily disabled for MinGW.
Subject: Bug 19970 Author: ayers Date: Mon Jun 12 06:58:27 2006 New Revision: 114563 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114563 Log: 2006-06-12 David Ayers <d.ayers@inode.at> PR bootstrap/27963 PR target/19970 * configure.in: Remove target-boehm-gc from noconfigdirs where ${libgcj} is specified. * configure: Regenerate. Modified: trunk/ChangeLog trunk/configure trunk/configure.in
Any news on enabling libgcj by default?
As libgcj (and java in total) gets less to no maintenance in general and the build-time of libjava is for general purpose very high on Windows, I would like to drop this enhancement PR. In general it is possible to build java + libgcj for mingw targets by manually enable it.
Won't fix for GCC 7 as java has been removed.