This is the mail archive of the gcc-bugs@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]

libgcj-$VERSION changes



Anthony, why did you hard code the value for the version
number in the 3.1 branch version of your libjava.exp change:

2002-04-11  Anthony Green  <green@redhat.com>

        * lib/libjava.exp: Use libgcj-3.1.jar, not libgcj.jar.

Whereas on the mainline you used gcc_version which is really
how the libgcj-$VER number is determined by the build process?

2002-04-12  Anthony Green  <green@redhat.com>

        * lib/libjava.exp: Use libgcj-VERSION.jar, not libgcj.jar.

This is causing problems on the 3.1 branch now because gcc_version
is 3.1.1 but the testsuite is looking for libgcj-3.1.jar

So the whole libjava testsuite fails now because the classpath
is being set incorrectly.

It seems to me that your mainline version of the change should be put
into the 3.1 branch libjava.exp like so:

--- libjava/testsuite/lib/libjava.exp.~1~	Wed May  8 19:04:05 2002
+++ libjava/testsuite/lib/libjava.exp	Fri May 17 00:05:28 2002
@@ -112,6 +112,7 @@
     global TOOL_EXECUTABLE
     global original_ld_library_path
     global env objdir
+    global env gcc_version
     global tool_root_dir
     global libjava_libgcc_s_path
 
@@ -129,6 +130,11 @@
 	}
     }
 
+    # Determine the version so we can find the libgcj jar file.
+    set text [eval exec "$GCJ_UNDER_TEST --version 2>@ stdout"]
+    regexp -- "gcj \[^ \]+ (\[^ \]+) .*" $text ignore gcc_version
+    verbose "jar file is libgcj-$gcc_version.jar"
+
     # FIXME: This finds libgcj.spec for the default multilib.
     # If thread models differ between multilibs, this has to be moved
     # to libjava_arguments
@@ -265,6 +271,7 @@
     global runtests
     global env
     global tool_root_dir
+    global gcc_version
     global libjava_libgcc_s_path
 
     if [info exists LIBJAVA] {
@@ -330,9 +337,9 @@
     verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
 
     # Set the CLASSPATH environment variable
-    verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$objdir/../libgcj-3.1.jar"
+    verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$objdir/../libgcj-$gcc_version.jar"
     global env
-    set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$objdir/../libgcj-3.1.jar"
+    set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$objdir/../libgcj-$gcc_version.jar"
 
     if {$mode == "link"} {
 	global wrapper_file wrap_compile_flags;


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