OSDN Git Service

* lib/g++.exp (g++_link_flags): Don't crash if LD_LIBRARY_PATH is
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Feb 2004 09:40:24 +0000 (09:40 +0000)
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Feb 2004 09:40:24 +0000 (09:40 +0000)
not defined.

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

gcc/testsuite/ChangeLog
gcc/testsuite/lib/g++.exp

index 980fc9f..a5dd16b 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-28  Richard Earnshaw  <rearnsha@arm.com>
+
+       * lib/g++.exp (g++_link_flags): Don't crash if LD_LIBRARY_PATH is
+       not defined.
+
 2004-02-27  Eric Christopher  <echristo@redhat.com>
 
        * g++.dg/charset/charset.exp: Change CFLAGS to CHARSETCFLAGS.
index c3410db..518e836 100644 (file)
@@ -177,7 +177,8 @@ proc g++_link_flags { paths } {
     # Doing this does cause trouble when testing cross-compilers.
     if {![is_remote target]} {
        global env;
-       if { $env(LD_LIBRARY_PATH) != "" } {
+       if { [info exists env(LD_LIBRARY_PATH)] 
+            && $env(LD_LIBRARY_PATH) != "" } {
                append ld_library_path ":$env(LD_LIBRARY_PATH)";
        }
        setenv  LD_LIBRARY_PATH     $ld_library_path