This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix Java libgcj.a libtool link on Windows
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Danny Smith <dannysmith at users dot sourceforge dot net>
- Date: 30 Mar 2005 19:59:22 -0300
- Subject: Re: PATCH: Fix Java libgcj.a libtool link on Windows
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <424B1582.9080609@aaronwl.com>
On Mar 30, 2005, "Aaron W. LaFramboise" <aaronavay62@aaronwl.com> wrote:
> PR libgcj/20654
> ltmain.sh: Make basename comparison case-insensitive.
The idea is good, but we need some further work.
First, this has to be in upstream libtool before we accept it in GCC.
Second, it would be very nice to hoist the calls of tr such that you
don't run them over the entire string all the time. What I have in
mind is something like this:
+ oldobjslower=
for obj in $save_oldobjs
do
- objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
+ objlower=`echo "X$obj" | $Xsed | tr ABC...Z abc...z.`
+ objbase=`$echo "X$objlower" | $Xsed -e 's%^.*/%%'`
+ case " $oldobjslower " in
+ " ") oldobjs=$obj oldobjslower=$objlower ;;
*[\ /]"$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
+ case " $oldobjslower " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
+ oldobjlower="$oldobjlower $gentop/$newobj"
See how this would make it much faster?
Please give this a try and post a revised patch.
Upstream libtool will probably take a somewhat different approach,
since the pathname duplicate handling is somewhat different there.
Thanks for looking into this.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}