From: Max Ostapenko Date: Fri, 10 Oct 2014 13:41:13 +0000 (+0300) Subject: asan-dg.exp (asan_link_flags): Save ld_library_path. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06a04ce75ab48a0a1b539b2140cd22a746f4c030;p=gcc.git asan-dg.exp (asan_link_flags): Save ld_library_path. gcc/testsuite/ 2014-10-10 Max Ostapenko * lib/asan-dg.exp (asan_link_flags): Save ld_library_path. (asan_finish): Remove restore_ld_library_path_env_vars. Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH related env variables by calling set_ld_library_path_env_vars. * lib/tsan-dg.exp (tsan_link_flags): Save ld_library_path. (tsan_finish): Remove restore_ld_library_path_env_vars. Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH related env variables by calling set_ld_library_path_env_vars. * lib/ubsan-dg.exp (ubsan_link_flags): Save ld_library_path. (ubsan_finish): Remove restore_ld_library_path_env_vars. Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH related env variables by calling set_ld_library_path_env_vars. From-SVN: r216082 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 632aa84af6a..442338d89a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2014-10-10 Max Ostapenko + + * lib/asan-dg.exp (asan_link_flags): Save ld_library_path. + (asan_finish): Remove restore_ld_library_path_env_vars. + Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH + related env variables by calling set_ld_library_path_env_vars. + * lib/tsan-dg.exp (tsan_link_flags): Save ld_library_path. + (tsan_finish): Remove restore_ld_library_path_env_vars. + Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH + related env variables by calling set_ld_library_path_env_vars. + * lib/ubsan-dg.exp (ubsan_link_flags): Save ld_library_path. + (ubsan_finish): Remove restore_ld_library_path_env_vars. + Restore ld_library_path with saved value. Restore LD_LIBRARY_PATH + related env variables by calling set_ld_library_path_env_vars. + 2014-10-10 Richard Biener PR tree-optimization/63379 diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp index 9769138d77d..4e8b4d6b636 100644 --- a/gcc/testsuite/lib/asan-dg.exp +++ b/gcc/testsuite/lib/asan-dg.exp @@ -47,11 +47,13 @@ proc asan_link_flags { paths } { global srcdir global ld_library_path global shlib_ext + global asan_saved_library_path set gccpath ${paths} set flags "" set shlib_ext [get_shlib_extension] + set asan_saved_library_path $ld_library_path if { $gccpath != "" } { if { [file exists "${gccpath}/libsanitizer/asan/.libs/libasan.a"] @@ -122,6 +124,8 @@ proc asan_finish { args } { global TEST_ALWAYS_FLAGS global asan_saved_TEST_ALWAYS_FLAGS global asan_saved_ALWAYS_CXXFLAGS + global asan_saved_library_path + global ld_library_path if [info exists asan_saved_ALWAYS_CXXFLAGS ] { set ALWAYS_CXXFLAGS $asan_saved_ALWAYS_CXXFLAGS @@ -132,7 +136,8 @@ proc asan_finish { args } { unset TEST_ALWAYS_FLAGS } } - restore_ld_library_path_env_vars + set ld_library_path $asan_saved_library_path + set_ld_library_path_env_vars } # Symbolize lines like diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp index 54ec4047c6b..77c85ff24ca 100644 --- a/gcc/testsuite/lib/tsan-dg.exp +++ b/gcc/testsuite/lib/tsan-dg.exp @@ -32,11 +32,13 @@ proc tsan_link_flags { paths } { global srcdir global ld_library_path global shlib_ext + global tsan_saved_library_path set gccpath ${paths} set flags "" set shlib_ext [get_shlib_extension] + set tsan_saved_library_path $ld_library_path if { $gccpath != "" } { if { [file exists "${gccpath}/libsanitizer/tsan/.libs/libtsan.a"] @@ -127,6 +129,8 @@ proc tsan_finish { args } { global tsan_saved_ALWAYS_CXXFLAGS global dg-do-what-default global tsan_saved_dg-do-what-default + global tsan_saved_library_path + global ld_library_path if [info exists tsan_saved_ALWAYS_CXXFLAGS ] { set ALWAYS_CXXFLAGS $tsan_saved_ALWAYS_CXXFLAGS @@ -143,5 +147,6 @@ proc tsan_finish { args } { } else { unset dg-do-what-default } - restore_ld_library_path_env_vars + set ld_library_path $tsan_saved_library_path + set_ld_library_path_env_vars } diff --git a/gcc/testsuite/lib/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp index 5a7a6534cad..3bfdcc85bb0 100644 --- a/gcc/testsuite/lib/ubsan-dg.exp +++ b/gcc/testsuite/lib/ubsan-dg.exp @@ -32,11 +32,13 @@ proc ubsan_link_flags { paths } { global srcdir global ld_library_path global shlib_ext + global ubsan_saved_library_path set gccpath ${paths} set flags "" set shlib_ext [get_shlib_extension] + set ubsan_saved_library_path $ld_library_path if { $gccpath != "" } { if { [file exists "${gccpath}/libsanitizer/ubsan/.libs/libubsan.a"] @@ -104,6 +106,8 @@ proc ubsan_finish { args } { global TEST_ALWAYS_FLAGS global ubsan_saved_TEST_ALWAYS_FLAGS global ubsan_saved_ALWAYS_CXXFLAGS + global ubsan_saved_library_path + global ld_library_path if [info exists ubsan_saved_ALWAYS_CXXFLAGS ] { set ALWAYS_CXXFLAGS $ubsan_saved_ALWAYS_CXXFLAGS @@ -114,5 +118,6 @@ proc ubsan_finish { args } { unset TEST_ALWAYS_FLAGS } } - restore_ld_library_path_env_vars + set ld_library_path $ubsan_saved_library_path + set_ld_library_path_env_vars }