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]

Fix setting of LD_LIBRARY_PATH in G++, g77 and objc testsuites


This is a revised version of http://gcc.gnu.org/ml/gcc-patches/2000-11/msg01537.html  I have needed this to test multiple ABIs on irix for over a year.  

It solves http://gcc.gnu.org/ml/gcc-bugs/2000-11/msg00463.html, but should be tested on some other platforms that loop over multiple testsuite options.

Tested on mips-sgi-irix6.5 

2002-02-04  David Billinghurst  <David.Billinghurst@riotinto.com>

	* lib/g++.exp:  Fix handling of LD_LIBRARY_PATH et al
	* lib/g77.exp:  Likewise
	* lib/objc.exp: Likewise

Index: lib/g++.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.24
diff -u -r1.24 g++.exp
--- g++.exp     2001/07/27 12:21:56     1.24
+++ g++.exp     2002/02/04 05:33:54
@@ -159,6 +159,18 @@
           append flags "-L${librx} ";
       }
     }
+
+    # 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.  We really only need to do 
+    # this on IRIX, but it shouldn't hurt to do it anywhere else.
+    setenv  LD_LIBRARY_PATH     $ld_library_path
+    setenv  SHLIB_PATH          $ld_library_path
+    setenv  LD_LIBRARYN32_PATH  $ld_library_path
+    setenv  LD_LIBRARY64_PATH   $ld_library_path
+
     return "$flags"
 }
 
@@ -277,23 +289,6 @@
 
     return [target_compile $source $dest $type $options]
 }
-
-#
-# g++_set_ld_library_path --
-# 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
 
 #
 # ${tool}_option_help
Index: lib/g77.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/g77.exp,v
retrieving revision 1.12
diff -u -r1.12 g77.exp
--- g77.exp     2002/01/21 21:29:12     1.12
+++ g77.exp     2002/02/04 05:33:55
@@ -94,6 +94,18 @@
       }
       append ld_library_path ":${rootme}"
     }
+
+    # 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.  We really only need to do 
+    # this on IRIX, but it shouldn't hurt to do it anywhere else.
+    setenv  LD_LIBRARY_PATH     $ld_library_path
+    setenv  SHLIB_PATH          $ld_library_path
+    setenv  LD_LIBRARYN32_PATH  $ld_library_path
+    setenv  LD_LIBRARY64_PATH   $ld_library_path
+
     return "$flags"
 }
 
@@ -191,20 +203,3 @@
 
     return [target_compile $source $dest $type $options]
 }
-
-#
-# g77_set_ld_library_path --
-# 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
Index: lib/objc.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/objc.exp,v
retrieving revision 1.11
diff -u -r1.11 objc.exp
--- objc.exp    2001/12/28 23:33:57     1.11
+++ objc.exp    2002/02/04 05:33:55
@@ -157,6 +157,18 @@
        append ld_library_path ":${libobjc_dir}"
     }
     lappend options "compiler=$OBJC_UNDER_TEST"
+
+    # 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.  We really only need to do 
+    # this on IRIX, but it shouldn't hurt to do it anywhere else.
+    setenv  LD_LIBRARY_PATH     $ld_library_path
+    setenv  SHLIB_PATH          $ld_library_path
+    setenv  LD_LIBRARYN32_PATH  $ld_library_path
+    setenv  LD_LIBRARY64_PATH   $ld_library_path
+
     return [target_compile $source $dest $type $options]
 }
 
@@ -240,20 +252,6 @@
        return $text
     }
 }
-
-# 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
cru200:73%


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