OSDN Git Service

* lib/target-libpath.exp (restore_ld_library_path_env_vars):
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 27 Nov 2004 05:19:33 +0000 (05:19 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 27 Nov 2004 05:19:33 +0000 (05:19 +0000)
Check existence of ld library path variables before unsetting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91367 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-libpath.exp

index 9973d15..912c9b3 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-27  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * lib/target-libpath.exp (restore_ld_library_path_env_vars):
+       Check existence of ld library path variables before unsetting.
+
 2004-11-26  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.old-deja/g++.eh/badalloc1.C: Robustify.
index 58905aa..8635e7e 100644 (file)
@@ -196,42 +196,42 @@ proc restore_ld_library_path_env_vars { } {
 
   if { $orig_ld_library_path_saved } {
     setenv LD_LIBRARY_PATH "$orig_ld_library_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH)] {
     unsetenv LD_LIBRARY_PATH
   }
   if { $orig_ld_run_path_saved } {
     setenv LD_RUN_PATH "$orig_ld_run_path"
-  } else {
+  } elseif [info exists env(LD_RUN_PATH)] {
     unsetenv LD_RUN_PATH
   }
   if { $orig_shlib_path_saved } {
     setenv SHLIB_PATH "$orig_shlib_path"
-  } else {
+  } elseif [info exists env(SHLIB_PATH)] {
     unsetenv SHLIB_PATH
   }
   if { $orig_ld_libraryn32_path_saved } {
     setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARYN32_PATH)] {
     unsetenv LD_LIBRARYN32_PATH
   }
   if { $orig_ld_library64_path_saved } {
     setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
-  } else {
+  } elseif [info exists env(LD_LIBRARY64_PATH)] {
     unsetenv LD_LIBRARY64_PATH
   }
   if { $orig_ld_library_path_32_saved } {
     setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH_32)] {
     unsetenv LD_LIBRARY_PATH_32
   }
   if { $orig_ld_library_path_64_saved } {
     setenv LD_LIBRARY_PATH_64 "$orig_ld_library_path_64"
-  } else {
+  } elseif [info exists env(LD_LIBRARY_PATH_64)] {
     unsetenv LD_LIBRARY_PATH_64
   }
   if { $orig_dyld_library_path_saved } {
     setenv DYLD_LIBRARY_PATH "$orig_dyld_library_path"
-  } else {
+  } elseif [info exists env(DYLD_LIBRARY_PATH)] {
     unsetenv DYLD_LIBRARY_PATH
   }
 }