Setting g++ environment variables for Irix
Billinghurst, David (CRTS)
David.Billinghurst@riotinto.com
Sun Nov 26 22:00:00 GMT 2000
Current cvs doesn't correctly set the environment variables
LD_LIBRARYN32_LIB and LD_LIBRARY64_LIB so that g++ can find the shared
libraries. The code to do this in gcc/testsuite/lib/g++.exp seems ok, but
doesn't work when testing multiple ABIs. See
http://gcc.gnu.org/ml/gcc-bugs/2000-11/msg00463.html
I am ashamed to offer the following patch. It's only merit is that it works
on irix. Perhaps, with suitable modification, it will work everywhere.
2000-11-26 David Billinghurst <David.Billinghurst@riotinto.com>
lib/g++.exp: Revise handling of irix environment variables
Index: g++.exp
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.14
diff -u -r1.14 g++.exp
--- g++.exp 2000/11/26 12:20:50 1.14
+++ g++.exp 2000/11/27 05:40:45
@@ -149,6 +149,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"
}
@@ -292,20 +304,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 g++_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
# Utility used by mike-g++.exp and old-dejagnu.exp.
# Check the compiler(/assembler/linker) output for text indicating that
More information about the Gcc-patches
mailing list