aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/lib/libjava.exp
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/testsuite/lib/libjava.exp')
-rw-r--r--libjava/testsuite/lib/libjava.exp78
1 files changed, 24 insertions, 54 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index 972b7be64cc..42732f59e6c 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 ""
@@ -303,9 +307,6 @@ proc gcj_cleanup {args} {
proc libjava_arguments {{mode compile}} {
global base_dir
global LIBJAVA
- global LIBGC
- global LIBQTHREADS
- global LIBZ
global srcdir subdir objdir
global TOOL_OPTIONS
global GCJ_UNDER_TEST
@@ -322,39 +323,14 @@ proc libjava_arguments {{mode compile}} {
set libjava [libjava_find_lib libjava gcj]
}
- if [info exists LIBGC] {
- set libgc $LIBGC;
- } else {
- set libgc [libjava_find_lib boehm-gc gcjgc]
- }
-
- if [info exists LIBQTHREADS] {
- set libqthreads $LIBQTHREADS
- } else {
- set libqthreads [libjava_find_lib qthreads gcjcoop]
- }
-
- if [info exists LIBZ] {
- set libz $LIBZ
- } else {
- 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
- verbose "using LIBZ = $libz" 2
set args ""
# Basically we want to build up a colon separated path list from
# the value of $libjava.
set lpath {}
- foreach dir [list $libjava $libgc $libz] {
+ foreach dir [list $libjava] {
foreach item [split $dir " "] {
switch -glob -- $item {
"-L*" {
@@ -365,6 +341,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 +361,10 @@ 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 "libs=$libjava"
lappend args debug
}
@@ -574,8 +548,6 @@ proc libjava_invoke {errname testName optName executable inpfile resultfile args
#
proc test_libjava_from_source { options srcfile compile_args inpfile resultfile exec_args } {
global base_dir
- global LIBJAVA
- global LIBGC
global srcdir subdir objdir
global TOOL_OPTIONS
global GCJ_UNDER_TEST
@@ -681,8 +653,6 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
#
proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile exec_args } {
global base_dir
- global LIBJAVA
- global LIBGC
global srcdir subdir objdir
global TOOL_OPTIONS
global GCJ_UNDER_TEST