aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-08-12 16:01:16 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-08-12 16:01:16 +0000
commita98c7b2c667163dc077ddc3e8206d3a730d77212 (patch)
tree08ae126ef3d27f1e4d3dfd998b8557b8ac40f965 /libjava
parent479d960b1bf3db73f78eb7c0aa2ed82bd1ff0c9e (diff)
downloadgcc-a98c7b2c667163dc077ddc3e8206d3a730d77212.zip
gcc-a98c7b2c667163dc077ddc3e8206d3a730d77212.tar.gz
gcc-a98c7b2c667163dc077ddc3e8206d3a730d77212.tar.bz2
libjava.exp (libjava_find_lib): Search for .so file first.
* lib/libjava.exp (libjava_find_lib): Search for .so file first. (libjava_arguments): Don't add libraries to link line explictly. From-SVN: r70379
Diffstat (limited to 'libjava')
-rw-r--r--libjava/testsuite/ChangeLog5
-rw-r--r--libjava/testsuite/lib/libjava.exp47
2 files changed, 27 insertions, 25 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index cbd0d9e..05d1874 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-12 Tom Tromey <tromey@redhat.com>
+
+ * lib/libjava.exp (libjava_find_lib): Search for .so file first.
+ (libjava_arguments): Don't add libraries to link line explictly.
+
2003-08-05 Tom Tromey <tromey@redhat.com>
For PR java/11600:
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index 972b7be..0717256 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -200,6 +200,7 @@ proc libjava_init { args } {
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
lappend libjava_libgcc_s_path $gccdir
+ verbose "libjava_libgcc_s_path = $libjava_libgcc_s_path"
set compiler ${gccdir}/xgcc
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
@@ -234,21 +235,24 @@ proc libjava_init { args } {
proc libjava_find_lib {dir name} {
global base_dir
set gp [get_multilibs]
- foreach sub {.libs _libs} {
- if {$gp != ""} {
- if {[file exists $gp/$dir/$sub/lib${name}.a]} then {
- # Just return the `-L' option. The library itself
- # will be picked up via the spec file.
- return "-L$gp/$dir/$sub"
+ foreach extension {so dll a} {
+ foreach sub {.libs _libs} {
+ if {$gp != ""} {
+ if {[file exists $gp/$dir/$sub/lib${name}.${extension}]} then {
+ # Just return the `-L' option. The library itself
+ # will be picked up via the spec file.
+ return "-L$gp/$dir/$sub"
+ }
+ }
+ # Just return the `-L' option. The library itself will be
+ # picked up via the spec file.
+ set lib [findfile \
+ $base_dir/../../$dir/$sub/lib${name}.${extension} \
+ "-L$base_dir/../../$dir/$sub" \
+ ""]
+ if {$lib != ""} {
+ return $lib
}
- }
- # Just return the `-L' option. The library itself will be
- # picked up via the spec file.
- set lib [findfile $base_dir/../../$dir/$sub/lib${name}.a \
- "-L$base_dir/../../$dir/$sub" \
- ""]
- if {$lib != ""} {
- return $lib
}
}
return ""
@@ -340,10 +344,6 @@ proc libjava_arguments {{mode compile}} {
set libz [libjava_find_lib zlib zgcj]
}
- # FIXME: there's no way to determine whether -lpthread is
- # required. We should get this info from configure, or it should
- # just be in the compiler driver.
-
verbose "using LIBJAVA = $libjava" 2
verbose "using LIBGC = $libgc" 2
verbose "using LIBQTHREADS = $libqthreads" 2
@@ -365,6 +365,7 @@ proc libjava_arguments {{mode compile}} {
}
set lpath [concat $lpath $libjava_libgcc_s_path]
+ verbose "lpath = $lpath ; libgcc_s_path = $libjava_libgcc_s_path"
set ld_library_path [join $lpath :]
# That's enough to make things work for the normal case.
@@ -384,13 +385,9 @@ proc libjava_arguments {{mode compile}} {
set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$libgcj_jar"
if {$mode == "link"} {
- global wrapper_file wrap_compile_flags;
- lappend args "additional_flags=$wrap_compile_flags";
- lappend args "libs=$wrapper_file";
- lappend args "libs=$libjava";
- lappend args "libs=$libgc";
- lappend args "libs=$libqthreads"
- lappend args "libs=$libz"
+ global wrapper_file wrap_compile_flags
+ lappend args "additional_flags=$wrap_compile_flags"
+ lappend args "libs=$wrapper_file"
lappend args debug
}