diff options
author | Richard Sandiford <r.sandiford@uk.ibm.com> | 2009-06-30 18:37:57 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2009-06-30 18:37:57 +0000 |
commit | b30bfd402f5109ae54ceb113a9492b8ec3737e0f (patch) | |
tree | c5037bf69698d3452e00a9f8d93d824f09752eb6 /libjava/testsuite/lib | |
parent | f82a627cf51e998b3d1c5c02f7e7c00b4aef1b0c (diff) | |
download | gcc-b30bfd402f5109ae54ceb113a9492b8ec3737e0f.zip gcc-b30bfd402f5109ae54ceb113a9492b8ec3737e0f.tar.gz gcc-b30bfd402f5109ae54ceb113a9492b8ec3737e0f.tar.bz2 |
gcc-defs.exp (gcc-set-multilib-library-path): Delete.
gcc/testsuite/
* lib/gcc-defs.exp (gcc-set-multilib-library-path): Delete.
* lib/target-libpath.exp (ld_library_path_vars): New variable.
(init_ld_library_path_env_vars): New function, replacing the
orig_*_saved assignments. Call it after defining it.
(set_ld_library_path_env_vars): Rewrite to use ld_library_path_vars.
(restore_ld_library_path_env_vars): Likewise.
(add_path, find_libgcc_s): New functions.
* lib/objc.exp (objc_init): Use find_libgcc_s instead of
gcc-set-multilib-library-path.
(objc_target_compile): Don't add "." to ld_library_path.
Use add_path.
* lib/gfortran.exp (gfortran_link_flags): Don't add "." to
ld_library_path. Use add_path. Use find_libgcc_s instead of
gcc-set-multilib-library-path.
* lib/g++.exp (g++_link_flags): Likewise.
* lib/obj-c++.exp (obj-c++_link_flags): Likewise.
* lib/c-torture.exp: Do not manipulate ld_library_path at the
top level; do it...
(c-torture-execute): ...here instead. Use $ld_library_path_multilib
to tell when this needs to happen. Use find_libgcc_s instead of
gcc-set-multilib-library-path.
* lib/gcc-dg.exp: Likewise.
* lib/gnat.exp (gnat_target_compile): Don't add "." to ld_library_path.
* g++.dg/compat/compat.exp (alt_ld_library_path): Don't add "."
unless it is in $ALT_LD_LIBRARY_PATH.
* g++.dg/compat/struct-layout-1.exp (alt_ld_library_path): Likewise.
libffi/
* testsuite/lib/libffi-dg.exp (libffi-init): Don't add "."
to ld_library_path. Use add_path. Add just find_libgcc_s
to ld_library_path, not every libgcc multilib directory.
libgomp/
* testsuite/lib/libgomp.exp (libgomp_init): Don't add "." to
ld_library_path. Use add_path. Add just find_libgcc_s to
ld_library_path, not every libgcc multilib directory.
* testsuite/libgomp.c/c.exp (ld_library_path): Don't call
gcc-set-multilib-library-path; rely on $always_ld_library_path instead.
* testsuite/libgomp.c++/c++.exp (ld_library_path): Likewise.
Use add_path.
* testsuite/libgomp.fortran/fortran.exp (ld_library_path): Likewise.
libjava/
* testsuite/lib/libjava.exp (libjava_init): Just add
find_libgcc_s to libjava_libgcc_s_path, rather than every
libgcc multilib directory.
(libjava_arguments): Explain why we add "." to ld_library_path.
(gcj_invoke, exec_gij, libjava_invoke): Use add_path.
libmudflap/
* testsuite/lib/libmudflap.exp (libmudflap-init): Don't add "."
to ld_library_path. Use add_path. Add just find_libgcc_s to
ld_library_path, not every libgcc multilib directory.
libstdc++-v3/
* testsuite/lib/libstdc++.exp (libstdc++_init): Don't add "."
to ld_library_path. Use add_path. Add just find_libgcc_s to
ld_library_path, not every libgcc multilib directory.
From-SVN: r149113
Diffstat (limited to 'libjava/testsuite/lib')
-rw-r--r-- | libjava/testsuite/lib/libjava.exp | 46 |
1 files changed, 10 insertions, 36 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 510e4ac..95a3138 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -197,36 +197,8 @@ proc libjava_init { args } { } # Finally, add the gcc build directory so that we can find the - # shared libgcc. This, like much of dejagnu, is hideous. - set libjava_libgcc_s_path {} - - if { [istarget "*-*-darwin*"] } { - set so_extension "dylib" - } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { - set so_extension "dll" - } else { - set so_extension "so" - } - set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.${so_extension}] - 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]" { - set mldir "" - regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir - set mldir [string trimright $mldir "\;@"] - if { "$mldir" == "." } { - continue - } - if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.${so_extension}.*]] >= 1 } { - lappend libjava_libgcc_s_path "${gccdir}/${mldir}" - } - } - } - } + # shared libgcc. + set libjava_libgcc_s_path [find_libgcc_s $GCJ_UNDER_TEST] set libjava_initialized 1 } @@ -337,6 +309,8 @@ proc libjava_arguments {{mode compile}} { # Basically we want to build up a colon separated path list from # the value of $libjava. + # Add "." to the list so that we pick up shared libraries created + # by the testsuite itself. set lpath "." foreach dir [list $libjava] { foreach item [split $dir " "] { @@ -470,8 +444,8 @@ proc gcj_invoke {program expectFile ld_library_additions} { global ld_library_path set ld_library_path "$libjava_ld_library_path" - if {[llength $ld_library_additions] > 0} { - append ld_library_path :[join $ld_library_additions :] + foreach path $ld_library_additions { + add_path ld_library_path $path } set_ld_library_path_env_vars @@ -512,8 +486,8 @@ proc exec_gij {jarfile expectFile {ld_library_additions {}} {addl_flags {}}} { global ld_library_path set ld_library_path "$libjava_ld_library_path" - if {[llength $ld_library_additions] > 0} { - append ld_library_path :[join $ld_library_additions :] + foreach path $ld_library_additions { + add_path ld_library_path $path } set_ld_library_path_env_vars @@ -562,8 +536,8 @@ proc libjava_invoke {errname testName optName executable inpfile resultfile global ld_library_path set ld_library_path "$libjava_ld_library_path" - if {[llength $ld_library_additions] > 0} { - append ld_library_path :[join $ld_library_additions :] + foreach path $ld_library_additions { + add_path ld_library_path $path } set_ld_library_path_env_vars |