aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/lib
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2009-07-11 06:10:49 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2009-07-11 06:10:49 +0000
commitb57af7ad610c3d2eafd69aa49bbd8029371247c3 (patch)
tree3ae36f07c961c579d1e473b88f00c276ca8cf2e1 /libgomp/testsuite/lib
parenta210fac2dbd90cec8b33731dd7ecef7fe7990e06 (diff)
gcc/testsuite/
PR testsuite/40699 PR testsuite/40707 PR testsuite/40709 * lib/gcc-defs.exp, lib/target-libpath.exp, lib/objc.exp, lib/gfortran.exp, lib/g++.exp, lib/obj-c++.exp, lib/c-torture.exp, lib/gcc-dg.exp, lib/gnat.exp, g++.dg/compat/compat.exp, g++.dg/compat/struct-layout-1.exp: Revert 2009-06-30 commit. libstdc++-v3/ PR testsuite/40699 PR testsuite/40707 PR testsuite/40709 * testsuite/lib/libstdc++.exp: Revert 2009-06-30 commit. libjava/ PR testsuite/40699 PR testsuite/40707 PR testsuite/40709 * testsuite/lib/libjava.exp: Revert 2009-06-30 commit. libgomp/ PR testsuite/40699 PR testsuite/40707 PR testsuite/40709 * testsuite/lib/libgomp.exp: Revert 2009-07-02 and 2009-06-30 commits. * testsuite/libgomp.c/c.exp, testsuite/libgomp.c++/c++.exp, testsuite/libgomp.fortran/fortran.exp: Revert 2009-06-30 commits. libffi/ PR testsuite/40699 PR testsuite/40707 PR testsuite/40709 * testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and 2009-06-30 commits. libmudflap/ PR testsuite/40699 PR testsuite/40707 PR testsuite/40709 * testsuite/lib/libmudflap.exp: Revert 2009-06-30 commit. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@149508 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/lib')
-rw-r--r--libgomp/testsuite/lib/libgomp.exp44
1 files changed, 34 insertions, 10 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 4712de23e32..972d4a1fdd3 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -86,6 +86,40 @@ proc libgomp_init { args } {
set CFLAGS ""
}
+ # Locate libgcc.a so we don't need to account for different values of
+ # SHLIB_EXT on different platforms
+ set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
+ if {$gccdir != ""} {
+ set gccdir [file dirname $gccdir]
+ }
+
+ # Compute what needs to be put into LD_LIBRARY_PATH
+ set always_ld_library_path ".:${blddir}/.libs"
+
+ # Compute what needs to be added to the existing LD_LIBRARY_PATH.
+ if {$gccdir != ""} {
+ # Add AIX pthread directory first.
+ if { [llength [glob -nocomplain ${gccdir}/pthread/libgcc_s*.a]] >= 1 } {
+ append always_ld_library_path ":${gccdir}/pthread"
+ }
+ append always_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 always_ld_library_path ":${gccdir}/${mldir}"
+ }
+ }
+ }
+ }
+
set ALWAYS_CFLAGS ""
if { $blddir != "" } {
lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/"
@@ -119,16 +153,6 @@ proc libgomp_init { args } {
# And, gee, turn on OpenMP.
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
-
- set compiler $GCC_UNDER_TEST
- foreach flag $ALWAYS_CFLAGS {
- if { [regexp {^(additional_flags|ldflags)=(.*)} $flag d1 d2 option] } {
- lappend compiler $option
- }
- }
-
- set always_ld_library_path "${blddir}/.libs"
- add_path always_ld_library_path [find_libgcc_s $compiler]
}
#