This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Fix Java libgcj.a libtool link on Windows


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}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]