summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-14 21:16:29 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-14 21:16:29 +0000
commitec1bc4ab266b82cfd1a438b81b7608b77a6d4c76 (patch)
treedbc2ae44ecf32b3b1473e05c3879abfa76e57f85 /libffi
parent69a2049e1ae55b7cff3c01d44d02dc0e1cf72674 (diff)
downloadgcc-ec1bc4ab266b82cfd1a438b81b7608b77a6d4c76.tar.gz
2004-09-14 H.J. Lu <hongjiu.lu@intel.com>
PR libgcj/17465 * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path. Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH, LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and DYLD_LIBRARY_PATH. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87511 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog8
-rw-r--r--libffi/testsuite/lib/libffi-dg.exp25
2 files changed, 24 insertions, 9 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 82cbd8cdaf9..a172ea187e4 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR libgcj/17465
+ * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path.
+ Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
+ LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and
+ DYLD_LIBRARY_PATH.
+
2004-09-05 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/many_win32.c: Remove whitespaces.
diff --git a/libffi/testsuite/lib/libffi-dg.exp b/libffi/testsuite/lib/libffi-dg.exp
index f7dd5fd97a8..abeb47676b8 100644
--- a/libffi/testsuite/lib/libffi-dg.exp
+++ b/libffi/testsuite/lib/libffi-dg.exp
@@ -73,7 +73,7 @@ proc libffi-init { args } {
global blddirffi
global blddircxx
global TOOL_OPTIONS
- global ld_library_path
+ global tool
global libffi_include
global libffi_link_flags
global tool_root_dir
@@ -133,13 +133,21 @@ proc libffi-init { args } {
# The same applies to darwin (DYLD_LIBRARY_PATH), solaris 32 bit
# (LD_LIBRARY_PATH_32), solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX
# (SHLIB_PATH).
- 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
- setenv LD_LIBRARY_PATH_32 $ld_library_path
- setenv LD_LIBRARY_PATH_64 $ld_library_path
- setenv DYLD_LIBRARY_PATH $ld_library_path
+ if {![is_remote target]} {
+ set ld_path "LD_LIBRARY_PATH SHLIB_PATH LD_LIBRARYN32_PATH LD_LIBRARY64_PATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64 DYLD_LIBRARY_PATH"
+ foreach path $ld_path {
+ if [info exists env($path)] {
+ # If we've already added these directories once, keep
+ # the existing path.
+ if {$ld_library_path != $env($path)
+ && [string first $ld_library_path: $env($path)] != 0} {
+ setenv $path "$ld_library_path:$env($path)"
+ }
+ } else {
+ setenv $path "$ld_library_path"
+ }
+ }
+ }
}
proc libffi_target_compile { source dest type options } {
@@ -147,7 +155,6 @@ proc libffi_target_compile { source dest type options } {
global srcdir
global blddirffi
global TOOL_OPTIONS
- global ld_library_path
global libffi_link_flags
global libffi_include
global target_triplet