Bug 20654 - exception.o is not included in libgcj.a due to case-insensitivity
Summary: exception.o is not included in libgcj.a due to case-insensitivity
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.3.0
Assignee: Aaron W. LaFramboise
URL:
Keywords: build, patch
: 22338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-27 12:52 UTC by Aaron W. LaFramboise
Modified: 2008-05-11 23:21 UTC (History)
3 users (show)

See Also:
Host:
Target: i?86-pc-mingw32
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-24 15:59:23


Attachments
Make basename comparisons case-insensitive (736 bytes, patch)
2005-03-29 14:10 UTC, Aaron W. LaFramboise
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron W. LaFramboise 2005-03-27 12:52:52 UTC
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.
Comment 1 Andrew Pinski 2005-03-27 16:21:50 UTC
This is why POSIX ar is bad.  Oh well.
Comment 2 Aaron W. LaFramboise 2005-03-28 06:09:33 UTC
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.
Comment 3 Aaron W. LaFramboise 2005-03-28 07:40:48 UTC
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.
Comment 4 Danny Smith 2005-03-28 08:38:31 UTC
See also PR20160 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20160
Comment 5 Aaron W. LaFramboise 2005-03-28 12:42:10 UTC
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.
Comment 6 Aaron W. LaFramboise 2005-03-29 14:10:24 UTC
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.
Comment 7 Aaron W. LaFramboise 2005-03-30 21:10:28 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02804.html>.
Comment 8 Andrew Pinski 2005-07-07 13:25:47 UTC
*** Bug 22338 has been marked as a duplicate of this bug. ***
Comment 9 Aaron W. LaFramboise 2008-05-11 23:21:16 UTC
I didn't fix it, but this apparently has been resolved some sort of way in 4.3.0.