g++.exp (g++_link_flags): Don't crash if LD_LIBRARY_PATH is not defined.

* lib/g++.exp (g++_link_flags): Don't crash if LD_LIBRARY_PATH is
not defined.

From-SVN: r78604
This commit is contained in:
Richard Earnshaw 2004-02-28 09:40:24 +00:00 committed by Richard Earnshaw
parent 68a1a5da2b
commit b922546d07
2 changed files with 7 additions and 1 deletions

View 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.

View 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