diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-15 11:24:46 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-15 11:24:46 +0000 |
commit | 56fcd3fede0e1c4489a3c108d95fd1ff38dfa1a5 (patch) | |
tree | f21ec6dd55e434aff16e698b0286153465775d62 /libgomp/testsuite | |
parent | c2ce85c4e04bda844aa35dfdf41e69e585d97b2e (diff) | |
download | gcc-56fcd3fede0e1c4489a3c108d95fd1ff38dfa1a5.tar.gz |
2009-07-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 149655
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@149682 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 44 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c++/c++.exp | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/c.exp | 1 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/fortran.exp | 6 |
4 files changed, 43 insertions, 14 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] } # diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp index 92b8146e505..decda3d1a12 100644 --- a/libgomp/testsuite/libgomp.c++/c++.exp +++ b/libgomp/testsuite/libgomp.c++/c++.exp @@ -37,10 +37,12 @@ if { $lang_test_file_found } { # Gather a list of all tests. set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]] - set ld_library_path $always_ld_library_path if { $blddir != "" } { - add_path ld_library_path "${blddir}/${lang_library_path}" + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + } else { + set ld_library_path "$always_ld_library_path" } + append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags" diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp index e304f560a5a..980bb526f3f 100644 --- a/libgomp/testsuite/libgomp.c/c.exp +++ b/libgomp/testsuite/libgomp.c/c.exp @@ -20,6 +20,7 @@ dg-init set tests [lsort [find $srcdir/$subdir *.c]] set ld_library_path $always_ld_library_path +append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars # Main loop. diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp index a1042d1f351..3d6615ffee7 100644 --- a/libgomp/testsuite/libgomp.fortran/fortran.exp +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp @@ -26,10 +26,12 @@ if { $lang_test_file_found } { # Gather a list of all tests. set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]] - set ld_library_path $always_ld_library_path if { $blddir != "" } { - add_path ld_library_path "${blddir}/${lang_library_path}" + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + } else { + set ld_library_path "$always_ld_library_path" } + append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars # Main loop. |