diff options
author | Daniel Santos <daniel.santos@pobox.com> | 2017-04-10 17:45:35 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2017-04-10 17:45:35 +0000 |
commit | 71b838d03533d1dbd94553f21ad4e8e439365d04 (patch) | |
tree | fac67ccf1d4a59952e687e353f77d5264c3bff9c /gcc | |
parent | 98a7a34e26ec1e809712dbbebb0193f2ac545018 (diff) | |
download | gcc-71b838d03533d1dbd94553f21ad4e8e439365d04.zip gcc-71b838d03533d1dbd94553f21ad4e8e439365d04.tar.gz gcc-71b838d03533d1dbd94553f21ad4e8e439365d04.tar.bz2 |
re PR testsuite/79867 ([cygwin] LD_LIBRARY_PATH ignored, contaminating (nearly?) all test results)
2017-04-10 Daniel Santos <daniel.santos@pobox.com>
PR testsuite/79867
* lib/target-libpath.exp: Merge in cygwin fix from libffi.
From-SVN: r246813
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-libpath.exp | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8df659e..b87d0ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-04-10 Daniel Santos <daniel.santos@pobox.com> + + PR testsuite/79867 + * lib/target-libpath.exp: Merge in cygwin fix from libffi. + 2017-04-10 Marek Polacek <polacek@redhat.com> PR sanitizer/80348 diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp index 9b3e201..b6d01b3 100644 --- a/gcc/testsuite/lib/target-libpath.exp +++ b/gcc/testsuite/lib/target-libpath.exp @@ -23,6 +23,7 @@ set orig_shlib_path_saved 0 set orig_ld_library_path_32_saved 0 set orig_ld_library_path_64_saved 0 set orig_dyld_library_path_saved 0 +set orig_path_saved 0 set orig_gcc_exec_prefix_saved 0 set orig_gcc_exec_prefix_checked 0 @@ -55,6 +56,7 @@ proc set_ld_library_path_env_vars { } { global orig_ld_library_path_32_saved global orig_ld_library_path_64_saved global orig_dyld_library_path_saved + global orig_path_saved global orig_gcc_exec_prefix_saved global orig_gcc_exec_prefix_checked global orig_ld_library_path @@ -63,6 +65,7 @@ proc set_ld_library_path_env_vars { } { global orig_ld_library_path_32 global orig_ld_library_path_64 global orig_dyld_library_path + global orig_path global orig_gcc_exec_prefix global env @@ -110,6 +113,10 @@ proc set_ld_library_path_env_vars { } { set orig_dyld_library_path "$env(DYLD_LIBRARY_PATH)" set orig_dyld_library_path_saved 1 } + if [info exists env(PATH)] { + set orig_path "$env(PATH)" + set orig_path_saved 1 + } } # We need to set ld library path in the environment. Currently, @@ -164,6 +171,13 @@ proc set_ld_library_path_env_vars { } { } else { setenv DYLD_LIBRARY_PATH "$ld_library_path" } + if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } { + if { $orig_path_saved } { + setenv PATH "$ld_library_path:$orig_path" + } else { + setenv PATH "$ld_library_path" + } + } verbose -log "LD_LIBRARY_PATH=[getenv LD_LIBRARY_PATH]" verbose -log "LD_RUN_PATH=[getenv LD_RUN_PATH]" @@ -201,12 +215,14 @@ proc restore_ld_library_path_env_vars { } { global orig_ld_library_path_32_saved global orig_ld_library_path_64_saved global orig_dyld_library_path_saved + global orig_path_saved global orig_ld_library_path global orig_ld_run_path global orig_shlib_path global orig_ld_library_path_32 global orig_ld_library_path_64 global orig_dyld_library_path + global orig_path global env restore_gcc_exec_prefix_env_var @@ -245,6 +261,11 @@ proc restore_ld_library_path_env_vars { } { } elseif [info exists env(DYLD_LIBRARY_PATH)] { unsetenv DYLD_LIBRARY_PATH } + if { $orig_path_saved } { + setenv PATH "$orig_path" + } elseif [info exists env(PATH)] { + unsetenv PATH + } } ####################################### |