From 2f0e2680bd2bf10df66ec50cba4aef989e668ced Mon Sep 17 00:00:00 2001 From: rsandifo Date: Tue, 30 Jun 2009 18:37:57 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149113 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/testsuite/lib/libgomp.exp | 35 ++------------------------- libgomp/testsuite/libgomp.c++/c++.exp | 6 ++--- libgomp/testsuite/libgomp.c/c.exp | 1 - libgomp/testsuite/libgomp.fortran/fortran.exp | 6 ++--- 4 files changed, 6 insertions(+), 42 deletions(-) (limited to 'libgomp/testsuite') diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 972d4a1fdd3..5a7ec5f9ca5 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -86,39 +86,8 @@ 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_ld_library_path "${blddir}/.libs" + add_path always_ld_library_path [find_libgcc_s $GCC_UNDER_TEST] set ALWAYS_CFLAGS "" if { $blddir != "" } { diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp index decda3d1a12..92b8146e505 100644 --- a/libgomp/testsuite/libgomp.c++/c++.exp +++ b/libgomp/testsuite/libgomp.c++/c++.exp @@ -37,12 +37,10 @@ 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 != "" } { - set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" - } else { - set ld_library_path "$always_ld_library_path" + add_path ld_library_path "${blddir}/${lang_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 980bb526f3f..e304f560a5a 100644 --- a/libgomp/testsuite/libgomp.c/c.exp +++ b/libgomp/testsuite/libgomp.c/c.exp @@ -20,7 +20,6 @@ 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 3d6615ffee7..a1042d1f351 100644 --- a/libgomp/testsuite/libgomp.fortran/fortran.exp +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp @@ -26,12 +26,10 @@ 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 != "" } { - set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" - } else { - set ld_library_path "$always_ld_library_path" + add_path ld_library_path "${blddir}/${lang_library_path}" } - append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars # Main loop. -- cgit v1.2.1