This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: GCC 3.2 suddenly fails every java test, CLASSPATH wrong
- From: Mark Wielaard <mark at klomp dot org>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gcc at gcc dot gnu dot org, java at gcc dot gnu dot org, mark at codesourcery dot com, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 16 Aug 2002 09:24:30 +0200
- Subject: Re: PATCH: GCC 3.2 suddenly fails every java test, CLASSPATH wrong
- References: <200208151501.LAA02954@caip.rutgers.edu><20020815080552.A16501@lucon.org> <1029437565.15747.13.camel@elsschot> <20020815121359.A20307@lucon.org>
Hi,
On Thu, 2002-08-15 at 21:13, H. J. Lu wrote:
> "make install" shouldn't be required. It is a bug. This one works for
> me.
It would be very nice if this was always true. That would save quite
some time and disk space on my test machines. I have CCed java-patches
to increase the chance that someone that can approve it sees it. I
tested it on the head (3.3) with a small change (see below inside the
patch) and it works nicely. Thanks.
Sorry that I immediately assumed that the real problem was probably an
old version of binutils. I had clearly not read the problem reports
carefully enough (and I should have recognized your name before
suggesting it to you... sorry again).
Cheers,
Mark
> 2002-08-15 H.J. Lu <hjl@gnu.org>
>
> * lib/libjava.exp (gcc_version): Removed.
> (libgcj_jar): New.
> (libjava_init): Set libgcj_jar with find.
> (libjava_arguments): Use libgcj_jar.
>
> --- libjava/testsuite/lib/libjava.exp.release Sun May 19 21:51:07 2002
> +++ libjava/testsuite/lib/libjava.exp Thu Aug 15 12:09:04 2002
> @@ -112,7 +112,7 @@ proc libjava_init { args } {
> global TOOL_EXECUTABLE
> global original_ld_library_path
> global env objdir
> - global env gcc_version
> + global env libgcj_jar
> global tool_root_dir
> global libjava_libgcc_s_path
>
> @@ -130,10 +130,9 @@ proc libjava_init { args } {
> }
> }
>
> - # 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"
> + # Find the libgcj jar file.
> + set libgcj_jar [eval exec "find $objdir/../ -name \"libgcj-*.jar\" 2>@ stdout"]
> + verbose "jar file is $libgcj_jar"
It might be a little bit more efficient/readable to use glob here:
set libgcj_jar [glob $objdir/../libgcj-*.jar]
> # FIXME: This finds libgcj.spec for the default multilib.
> # If thread models differ between multilibs, this has to be moved
> @@ -271,7 +270,7 @@ proc libjava_arguments {{mode compile}}
> global runtests
> global env
> global tool_root_dir
> - global gcc_version
> + global libgcj_jar
> global libjava_libgcc_s_path
>
> if [info exists LIBJAVA] {
> @@ -337,9 +336,9 @@ proc libjava_arguments {{mode compile}}
> verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
>
> # Set the CLASSPATH environment variable
> - verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$objdir/../libgcj-$gcc_version.jar"
> + verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$libgcj_jar"
> global env
> - set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$objdir/../libgcj-$gcc_version.jar"
> + set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$libgcj_jar"
>
> if {$mode == "link"} {
> global wrapper_file wrap_compile_flags;