This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Patch: FYI: Fix PR 21058


I'm checking this in.

This fixes PR 21058 by arranging to put all the .class file names into
a temporary 'list' file.  This avoids having the funny file names be
processed by libtool.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	PR libgj/21058:
	* sources.am, Makefile.in: Rebuilt.
	* scripts/makemake.tcl (emit_bc_rule): Create a temporary list
	file.
	(emit_source_var): Don't emit patsubst with './'.

Index: scripts/makemake.tcl
===================================================================
RCS file: /cvs/gcc/gcc/libjava/scripts/makemake.tcl,v
retrieving revision 1.2
diff -u -r1.2 makemake.tcl
--- scripts/makemake.tcl 16 Jul 2005 17:40:00 -0000 1.2
+++ scripts/makemake.tcl 18 Jul 2005 20:48:04 -0000
@@ -204,16 +204,19 @@
   }
   set varname [join [split $pkgname /] _]_source_files
   set loname [join [split $pkgname /] -].lo
+  set tname [join [split $pkgname /] -].list
 
   puts "$loname: \$($varname)"
-  puts "\t\$(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o $loname \\"
+  # Create a temporary list file and then compile it.  This works
+  # around the libtool problem mentioned in PR 21058.  classpath was
+  # built first, so the class files are to be found there.
   set omit ""
   if {[info exists exclusion_map($package)]} {
     set omit "| grep -v $exclusion_map($package)"
   }
-  # classpath was built first, so the class files are to be found
-  # there.
-  puts  "\t\t`find classpath/lib/$package -name '*.class' | sort -r$omit`"
+  puts  "\t@find classpath/lib/$package -name '*.class'${omit} > $tname"
+  puts "\t\$(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o $loname @$tname"
+  puts "\t@rm -f $tname"
   puts ""
 
   # We skip this one because it is built into its own library and is
@@ -287,7 +290,9 @@
     # Ugly code to build up the appropriate patsubst.
     set result "\$(patsubst %.java,%.h,\$($varname))"
     foreach dir [lsort [array names dirs]] {
-      set result "\$(patsubst $dir/%,%,$result)"
+      if {$dir != "."} {
+	set result "\$(patsubst $dir/%,%,$result)"
+      }
     }
 
     if {$package == "." || $package == "java/lang"} {


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