diff options
Diffstat (limited to 'gcc/testsuite/lib/g++.exp')
-rw-r--r-- | gcc/testsuite/lib/g++.exp | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp index eafe1b8317e..8a6e3a0b55b 100644 --- a/gcc/testsuite/lib/g++.exp +++ b/gcc/testsuite/lib/g++.exp @@ -24,6 +24,7 @@ # load_lib prune.exp load_lib gcc-defs.exp +load_lib target-libpath.exp # # GXX_UNDER_TEST is the compiler under test. @@ -49,7 +50,7 @@ proc g++_version { } { set tmp [remote_exec host "$compiler -v"] set status [lindex $tmp 0]; set output [lindex $tmp 1]; - regexp "version\[^\n\r\]*" $output version + regexp " version \[^\n\r\]*" $output version if { $status == 0 && [info exists version] } then { if [is_remote host] { clone_output "$compiler $version\n" @@ -96,7 +97,6 @@ proc g++_include_flags { paths } { # proc g++_link_flags { paths } { - global rootme global srcdir global ld_library_path global GXX_UNDER_TEST @@ -128,23 +128,7 @@ proc g++_link_flags { paths } { if [file exists "${gccpath}/librx/librx.a"] { append flags "-L${gccpath}/librx " } - if {[info exists rootme]} { - append ld_library_path ":${rootme}" - set compiler [lindex $GXX_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 ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } { - append ld_library_path ":${rootme}/${mldir}" - } - } - } - } + append ld_library_path [gcc-set-multilib-library-path $GXX_UNDER_TEST] } else { global tool_root_dir; @@ -168,20 +152,7 @@ proc g++_link_flags { paths } { } } - # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but - # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH - # (for the 64-bit ABI). The right way to do this would be to modify - # unix.exp -- but that's not an option since it's part of DejaGNU - # proper, so we do it here. We really only need to do - # this on IRIX, but it shouldn't hurt to do it anywhere else. - # Doing this does cause trouble when testing cross-compilers. - if {![is_remote target]} { - setenv LD_LIBRARY_PATH $ld_library_path - setenv SHLIB_PATH $ld_library_path - setenv LD_LIBRARYN32_PATH $ld_library_path - setenv LD_LIBRARY64_PATH $ld_library_path - setenv DYLD_LIBRARY_PATH $ld_library_path - } + set_ld_library_path_env_vars return "$flags" } |