asan-dg.exp (asan_link_flags): Save ld_library_path.
authorMax Ostapenko <m.ostapenko@partner.samsung.com>
Fri, 10 Oct 2014 13:41:13 +0000 (16:41 +0300)
committerMaxim Ostapenko <chefmax@gcc.gnu.org>
Fri, 10 Oct 2014 13:41:13 +0000 (16:41 +0300)
gcc/testsuite/

2014-10-10  Max Ostapenko  <m.ostapenko@partner.samsung.com>

* 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

gcc/testsuite/ChangeLog
gcc/testsuite/lib/asan-dg.exp
gcc/testsuite/lib/tsan-dg.exp
gcc/testsuite/lib/ubsan-dg.exp

index 632aa84af6a00feb15b7399c70c2d1e8cdeb17fe..442338d89a8ac17ffe6c08440fee98babdfd9ab3 100644 (file)
@@ -1,3 +1,18 @@
+2014-10-10  Max Ostapenko  <m.ostapenko@partner.samsung.com>
+
+       * 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  <rguenther@suse.de>
 
        PR tree-optimization/63379
index 9769138d77de27f1bf0cbb39b32a4c7e0c93a984..4e8b4d6b636f1259f368d6dac59ae44dfaca3466 100644 (file)
@@ -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
index 54ec4047c6b26064289166dcab79b4840c92abcd..77c85ff24cac78ffc96bfaaed2f4fca2eb299548 100644 (file)
@@ -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
 }
index 5a7a6534cad88b6ec36fead5f0dc0b94ff3cdd22..3bfdcc85bb0a6ac944aab51963033b7b68568b64 100644 (file)
@@ -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
 }