summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/lib
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-07 21:57:38 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-07 21:57:38 +0000
commit9992cb6af5449f18efbf9a402a5cd085d4e34e8e (patch)
tree41f9669cb954bd27ce14801617ee284d8a90cac5 /libgomp/testsuite/lib
parente672e40a443a61387b0d3c01be6c1ce4aec502ec (diff)
downloadgcc-9992cb6af5449f18efbf9a402a5cd085d4e34e8e.tar.gz
* testsuite/lib/libgomp-dg.exp (libgomp_init): Compute multilib-related
part of LD_LIBRARY_PATH manually. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110720 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/lib')
-rw-r--r--libgomp/testsuite/lib/libgomp-dg.exp25
1 files changed, 20 insertions, 5 deletions
diff --git a/libgomp/testsuite/lib/libgomp-dg.exp b/libgomp/testsuite/lib/libgomp-dg.exp
index f6fed67b209..d064a8012c8 100644
--- a/libgomp/testsuite/lib/libgomp-dg.exp
+++ b/libgomp/testsuite/lib/libgomp-dg.exp
@@ -94,14 +94,29 @@ proc libgomp_init { args } {
# Compute what needs to be put into LD_LIBRARY_PATH
set ld_library_path ".:${blddir}/.libs"
- if {$gccdir != ""} {
- append ld_library_path ":${gccdir}"
- }
-
if { [info exists lang_test_file] && [file exists "${blddir}/"] } {
append ld_library_path ":${blddir}/${lang_library_path}"
}
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+
+ # Compute what needs to be added to the existing LD_LIBRARY_PATH.
+ if {$gccdir != ""} {
+ append ld_library_path ":${gccdir}"
+ set compiler [lindex $GCC_UNDER_TEST 0]
+
+ 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.*]] >= 1 } {
+ append ld_library_path ":${gccdir}/${mldir}"
+ }
+ }
+ }
+ }
set_ld_library_path_env_vars
set ALWAYS_CFLAGS ""