This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] fix testsuite failures
Bryce McKinlay wrote:
2006-07-04 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/lib/libjava.exp (libjava_init): Call the
GCJ_UNDER_TEST with
the -B$specdir.
OK. I think you could re-use the value of "text"/"tmp" to avoid exec'ing
gcc multiple times, but it probably doesn't matter too much.
Thank you. I'll commit this one soon. And sorry for the breakage.
Andreas
Index: testsuite/lib/libjava.exp
===================================================================
--- testsuite/lib/libjava.exp (revision 115184)
+++ testsuite/lib/libjava.exp (working copy)
@@ -166,8 +166,13 @@
# Find the libgcj jar file.
- set tmp [eval exec "$GCJ_UNDER_TEST -v 2>@ stdout"]
- regexp " version \[^\n\r\]*" $tmp version
+ # FIXME: This finds libgcj.spec for the default multilib.
+ # If thread models differ between multilibs, this has to be moved
+ # to libjava_arguments
+ set specdir [libjava_find_spec]
+
+ set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
+ regexp " version \[^\n\r\]*" $text version
set libjava_version [lindex $version 1]
verbose "version: $libjava_version"
@@ -175,13 +180,7 @@
set libgcj_jar [glob $objdir/../libgcj-$libjava_version.jar]
verbose "jar file is $libgcj_jar"
- # FIXME: This finds libgcj.spec for the default multilib.
- # If thread models differ between multilibs, this has to be moved
- # to libjava_arguments
- set specdir [libjava_find_spec]
-
# The -B is so we find libgcj.spec.
- set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
regexp -- "Thread model: (\[^\n\]+)\n" $text ignore model
set libjava_uses_threads [expr {! ($model == "no"
|| $model == "none"