This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] do not disregard LD_LIBRARY_PATH for native c++ tests


Is there a reason why we blatantly nuke LD_LIBRARY_PATH on C++ tests?
The current code tries to be all smart and determine L_L_P from the
build directory.  In my case, I'm running tests from outside the build
area, which is causing all sorts of havoc.

Unless there's some magic unknown reason for the current behavior, is
this OK?

2004-02-27  Aldy Hernandez  <aldyh@redhat.com>

	* lib/g++.exp (g++_link_flags): Append LD_LIBRARY_PATH to
	ld_library_path.

Index: lib/g++.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.36
diff -u -p -r1.36 g++.exp
--- lib/g++.exp	23 Jan 2004 04:42:39 -0000	1.36
+++ lib/g++.exp	27 Feb 2004 21:00:45 -0000
@@ -176,6 +176,10 @@ proc g++_link_flags { paths } {
     # (SHLIB_PATH).
     # Doing this does cause trouble when testing cross-compilers.
     if {![is_remote target]} {
+	global env;
+	if { $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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]