3.0.1 PATCH: Set LD_LIBRARY{N32,64}_PATH for objc and libjava testsuites

Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Thu Jul 26 12:55:00 GMT 2001


When LD_LIBRARYN32_PATH happens to be set on IRIX 6, it is used instead of
LD_LIBRARY_PATH to locate N32 ABI shared libraries.  While the g++ and
libstdc++ testsuites contain code to set LD_LIBRARYN32_PATH (and
LD_LIBRARY64_PATH for the N64 ABI) to LD_LIBRARY_PATH to avoid this
problem, the objc and libjava testsuites did not, leading to many execution
failures (always for libjava, for objc only when libobjc was built shared
due to the use of --enable-shared).

The following patch fixes this.  Tested on mips-sgi-irix6.5 (where the N32
execution tests failed before) by running make check-objc (in gcc) and make
check (in libjava).

If Stan Cox' patch to consolidate such redundant stuff into gcc-deps.exp
goes in, this function should be included there, too.

Ok for branch and mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE


Thu Jul 26 18:25:18 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	gcc/testsuite:
	* lib/g++.exp (g++_set_ld_library_path): Renamed to
	${tool}_set_ld_library_path.
	Changed caller.
	* lib/objc.exp (${tool}_set_ld_library_path): New, copied from
	g++.exp.

	libjava:
	* testsuite/lib/libjava.exp (${tool}_set_ld_library_path): Likewise.

Index: gcc/testsuite/lib/g++.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.17.2.3
diff -u -p -r1.17.2.3 g++.exp
--- g++.exp	2001/06/04 15:24:39	1.17.2.3
+++ g++.exp	2001/07/26 19:48:48
@@ -303,12 +303,12 @@ if { [info procs prune_warnings] == "" }
 # proper, so we do it here, by trickery.  We really only need to do 
 # this on IRIX, but it shouldn't hurt to do it anywhere else.
 
-proc g++_set_ld_library_path { name element op } {
+proc ${tool}_set_ld_library_path { name element op } {
   setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH]
   setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH]
 }
 
-trace variable env(LD_LIBRARY_PATH) w g++_set_ld_library_path
+trace variable env(LD_LIBRARY_PATH) w ${tool}_set_ld_library_path
 
 # Utility used by mike-g++.exp and old-dejagnu.exp.
 # Check the compiler(/assembler/linker) output for text indicating that
Index: gcc/testsuite/lib/objc.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/objc.exp,v
retrieving revision 1.5.6.5
diff -u -p -r1.5.6.5 objc.exp
--- objc.exp	2001/06/29 19:20:44	1.5.6.5
+++ objc.exp	2001/07/26 19:48:48
@@ -236,6 +236,20 @@ if { [info procs prune_warnings] == "" }
     }
 }
 
+# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
+# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
+# (for the 64-bit ABI).  The right way to do this would be to modify
+# unix.exp -- but that's not an option since it's part of DejaGNU
+# proper, so we do it here, by trickery.  We really only need to do 
+# this on IRIX, but it shouldn't hurt to do it anywhere else.
+
+proc ${tool}_set_ld_library_path { name element op } {
+  setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH]
+  setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH]
+}
+
+trace variable env(LD_LIBRARY_PATH) w ${tool}_set_ld_library_path
+
 # Utility used by mike-gcc.exp and c-torture.exp.
 # Check the compiler(/assembler/linker) output for text indicating that
 # the testcase should be marked as "unsupported".
Index: libjava/testsuite/lib/libjava.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/lib/libjava.exp,v
retrieving revision 1.22.4.4
diff -u -p -r1.22.4.4 libjava.exp
--- libjava.exp	2001/05/04 19:32:15	1.22.4.4
+++ libjava.exp	2001/07/26 19:48:54
@@ -737,6 +737,20 @@ proc default_libjava_version {} {
 proc default_libjava_start { } {
 }
 
+# On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
+# called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
+# (for the 64-bit ABI).  The right way to do this would be to modify
+# unix.exp -- but that's not an option since it's part of DejaGNU
+# proper, so we do it here, by trickery.  We really only need to do 
+# this on IRIX, but it shouldn't hurt to do it anywhere else.
+
+proc ${tool}_set_ld_library_path { name element op } {
+  setenv LD_LIBRARYN32_PATH [getenv LD_LIBRARY_PATH]
+  setenv LD_LIBRARY64_PATH [getenv LD_LIBRARY_PATH]
+}
+
+trace variable env(LD_LIBRARY_PATH) w ${tool}_set_ld_library_path
+
 # Local Variables:
 # tcl-indent-level:4
 # End:



More information about the Gcc-patches mailing list