binutils ar was recently changed to exclude path when comparing object filenames, to agree with POSIX. This combines with Windows' case-insensitive filesystem to cause java/lang/Exception.o to replace exception.o in the following command while creating libgcj.a. ar rc .libs/libgcj0_convenience.a prims.o jni.o exception.o ... java/lang/Exception.o ... This causes bootstrap to fail when linking jv-convert. make[4]: Entering directory `/aaronwl/cs/env/mingw- head/20050325/build/gcc/i686-pc-mingw32/libjava' /bin/sh ./libtool --tag=GCJ --mode=link /aaronwl/cs/env/mingw- head/20050325/build/gcc/./gcc/gcj -B/aaronwl/cs/env/mingw- head/20050325/build/gcc/./gcc/ -B/aaronwl/cs/env/mingw-head/20050325/i686-pc- mingw32/bin/ -B/aaronwl/cs/env/mingw-head/20050325/i686-pc-mingw32/lib/ - isystem /aaronwl/cs/env/mingw-head/20050325/i686-pc-mingw32/include - isystem /aaronwl/cs/env/mingw-head/20050325/i686-pc-mingw32/sys-include - L/aaronwl/cs/env/mingw-head/20050325/build/gcc/i686-pc-mingw32/libjava -ffloat- store -fno-omit-frame-pointer -g -O2 -o jv-convert.exe -- main=gnu.gcj.convert.Convert -rpath /aaronwl/cs/env/mingw-head/20050325/lib - shared-libgcc -L/aaronwl/cs/env/mingw-head/20050325/build/gcc/i686-pc- mingw32/libjava/.libs libgcj.la /aaronwl/cs/env/mingw-head/20050325/build/gcc/./gcc/gcj - B/aaronwl/cs/env/mingw-head/20050325/build/gcc/./gcc/ -B/aaronwl/cs/env/mingw- head/20050325/i686-pc-mingw32/bin/ -B/aaronwl/cs/env/mingw-head/20050325/i686- pc-mingw32/lib/ -isystem /aaronwl/cs/env/mingw-head/20050325/i686-pc- mingw32/include -isystem /aaronwl/cs/env/mingw-head/20050325/i686-pc- mingw32/sys-include -ffloat-store -fno-omit-frame-pointer -g -O2 -o jv- convert.exe --main=gnu.gcj.convert.Convert -shared-libgcc - L/aaronwl/cs/env/mingw-head/20050325/build/gcc/i686-pc-mingw32/libjava - L/aaronwl/cs/env/mingw-head/20050325/build/gcc/i686-pc- mingw32/libjava/.libs ./.libs/libgcj.a -L/aaronwl/cs/env/mingw- head/20050325/build/gcc/i686-pc-mingw32/libstdc++-v3/src - L/aaronwl/cs/env/mingw-head/20050325/build/gcc/i686-pc-mingw32/libstdc++- v3/src/.libs -L/aaronwl/cs/env/mingw-head/20050325/build/gcc/./gcc - L/aaronwl/cs/env/mingw-head/20050325/i686-pc-mingw32/bin - L/aaronwl/cs/env/mingw-head/20050325/i686-pc-mingw32/lib - L/aaronwl/cs/env/mingw-head/20050325/lib/../i686-pc-mingw32/lib - L/aaronwl/cs/env/mingw-head/20050325/lib -L/mingw/lib -lmingw32 -lgcc - lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 - lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -Wl,--rpath - Wl,/aaronwl/cs/env/mingw-head/20050325/lib ./.libs/libgcj.a(prims.o): In function `Z17_Jv_ThrowNoMemoryv': /aaronwl/cs/compilers/gcc/src/cvs/head/gcc/libjava/prims.cc:369: undefined reference to `_Jv_Throw' ./.libs/libgcj.a(prims.o): In function `Jv_Malloc': /aaronwl/cs/compilers/gcc/src/cvs/head/gcc/libjava/prims.cc:1276: undefined reference to `_Jv_Throw' ... Since, depending on how you look at it, 'ar' is doing the right thing, I think the easiest way to fix this to rename exception.cc to exceptions.cc.
This is why POSIX ar is bad. Oh well.
This also happens with gnu/java/security/OID.o and org/ietf/jgss/Oid.o, again causing build to break in jv-collect. These files are less easily renamed, though. I don't know how to fix this.
I just checked against "Microsoft (R) Library Manager Version 7.10.3052" and binutils's case-insensitivity replacement semantics are consistant with Microsoft's implementation. LIB also has the same path-preserving semantics of the previous non-POSIX ar. I think a better way to fix this would be to check if the P to ar is availible, and use it, if it is.
See also PR20160 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20160
Thanks Danny. So there is already machinery to fix this; it just needs to be adapted to be case-insensitive. I'm working on a patch.
Created attachment 8489 [details] Make basename comparisons case-insensitive This fixes the the Oid.o/OID.o problem, but for some reason still fails with HTTPURLConnection.o/HttpURLConnection.o.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02804.html>.
*** Bug 22338 has been marked as a duplicate of this bug. ***
I didn't fix it, but this apparently has been resolved some sort of way in 4.3.0.