Commit 3a15f566 by Richard Sandiford Committed by Richard Sandiford

g++.exp (g++_link_flags): Check whether LD_LIBRARY_PATH already contains $ld_library_path.

	* lib/g++.exp (g++_link_flags): Check whether LD_LIBRARY_PATH already
	contains $ld_library_path.
	* lib/gfortran.exp (gfortran_link_flags): Likewise.

From-SVN: r85329
parent e109f49a
2004-07-30 Richard Sandiford <rsandifo@redhat.com>
* lib/g++.exp (g++_link_flags): Check whether LD_LIBRARY_PATH already
contains $ld_library_path.
* lib/gfortran.exp (gfortran_link_flags): Likewise.
2004-07-29 Richard Henderson <rth@redhat.com>
* g++.dg/template/sizeof8.C: Don't assume 32bit pointers.
......
......@@ -177,9 +177,16 @@ proc g++_link_flags { paths } {
# Doing this does cause trouble when testing cross-compilers.
if {![is_remote target]} {
global env;
if { [info exists env(LD_LIBRARY_PATH)]
&& $env(LD_LIBRARY_PATH) != "" } {
append ld_library_path ":$env(LD_LIBRARY_PATH)";
if [info exists env(LD_LIBRARY_PATH)] {
# If we've already added these directories once, keep the
# existing path.
if {$ld_library_path == $env(LD_LIBRARY_PATH)
|| [string first $ld_library_path: \
$env(LD_LIBRARY_PATH)] == 0} {
set ld_library_path $env(LD_LIBRARY_PATH)
} elseif { $env(LD_LIBRARY_PATH) != "" } {
append ld_library_path ":$env(LD_LIBRARY_PATH)"
}
}
setenv LD_LIBRARY_PATH $ld_library_path
setenv SHLIB_PATH $ld_library_path
......
......@@ -121,10 +121,17 @@ proc gfortran_link_flags { paths } {
# Doing this does cause trouble when testing cross-compilers.
if {![is_remote target]} {
global env;
if { [info exists env(LD_LIBRARY_PATH)]
&& $env(LD_LIBRARY_PATH) != "" } {
append ld_library_path ":$env(LD_LIBRARY_PATH)";
}
if [info exists env(LD_LIBRARY_PATH)] {
# If we've already added these directories once, keep the
# existing path.
if {$ld_library_path == $env(LD_LIBRARY_PATH)
|| [string first $ld_library_path: \
$env(LD_LIBRARY_PATH)] == 0} {
set ld_library_path $env(LD_LIBRARY_PATH)
} elseif { $env(LD_LIBRARY_PATH) != "" } {
append ld_library_path ":$env(LD_LIBRARY_PATH)"
}
}
setenv LD_LIBRARY_PATH $ld_library_path
setenv SHLIB_PATH $ld_library_path
setenv LD_LIBRARYN32_PATH $ld_library_path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment