This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix Java libgcj.a libtool link on Windows
- From: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Danny Smith <dannysmith at users dot sourceforge dot net>, aoliva at redhat dot com
- Date: Wed, 30 Mar 2005 15:09:22 -0600
- Subject: PATCH: Fix Java libgcj.a libtool link on Windows
Earlier this month, Alexandre Oliva fixed ltmain.sh so that libtool
would not discard duplicate basenames in archives
(http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00057.html). The attached
patch alters this slightly by making the basename comparison
case-insensitive. With this change, libjava is able to successfully
bootstrap on Windows.
The case-insensitive comparison is used for all targets, as non-Windows
targets may well be using a case-insensitive filesystem as well, and
selectively enabling case-insensitivity seems more complicated than its
worth.
This fixes PR libgcj/20654.
Tested on i686-pc-mingw32.
OK?
2005-03-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
PR libgcj/20654
ltmain.sh: Make basename comparison case-insensitive.
Index: ltmain.sh
===================================================================
RCS file: /cvs/gcc/gcc/ltmain.sh,v
retrieving revision 1.25
diff -c -3 -p -r1.25 ltmain.sh
*** ltmain.sh 1 Mar 2005 22:27:43 -0000 1.25
--- ltmain.sh 30 Mar 2005 03:05:12 -0000
*************** fi\
*** 4316,4322 ****
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
! done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
--- 4316,4322 ----
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
! done | sort -f | sort -ucf >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
*************** fi\
*** 4341,4356 ****
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
! case " $oldobjs " in
" ") oldobjs=$obj ;;
! *[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
! case " $oldobjs " in
! *[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
--- 4341,4360 ----
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
! case " `echo $oldobjs | tr abcdefghijklmnopqrstuvwxyz \
! ABCDEFGHIJKLMNOPQRSTUVWXYZ` " in
" ") oldobjs=$obj ;;
! *[\ /]"`echo $objbase | tr abcdefghijklmnopqrstuvwxyz \
! ABCDEFGHIJKLMNOPQRSTUVWXYZ` "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
! case " `echo $oldobjs | tr abcdefghijklmnopqrstuvwxyz \
! ABCDEFGHIJKLMNOPQRSTUVWXYZ` " in
! *[\ /]"`echo $newobj | tr abcdefghijklmnopqrstuvwxyz \
! ABCDEFGHIJKLMNOPQRSTUVWXYZ` "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done