]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
g++.exp (g++_link_flags): Don't crash if LD_LIBRARY_PATH is not defined.
authorRichard Earnshaw <rearnsha@arm.com>
Sat, 28 Feb 2004 09:40:24 +0000 (09:40 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Sat, 28 Feb 2004 09:40:24 +0000 (09:40 +0000)
* lib/g++.exp (g++_link_flags): Don't crash if LD_LIBRARY_PATH is
not defined.

From-SVN: r78604

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

index 980fc9fc06f57f22879e65d478f2e88c26ea566d..a5dd16bfbef7773b426fb378f2dbd01d0cffdd36 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 c3410db5fce2d64bb0b1b76f48271a57136f15ec..518e836020c6ccea7d62b5deb0b3abd3b1dd68bc 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