This is a new attempt at the PR libgcj/40868 [1]. This time around a compiler variable is introduced in configure.ac and Makefile.am is patched as well. This has been tested with build/host=linux-gnu target=i686-w64-mingw32. This has not been tested with a canadian-cross but "it should just work". [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40868