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: libgcj/17465: Testsuite in libffi overrides LD_LIBRARY_PATH


Using global ld_library_path means to override LD_LIBRART_PATH. Don't
do it. When LD_LIBRART_PATH is needed, override it will cause failure.


H.J.
---
2004-09-13  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 and DYLD_LIBRARY_PATH.

--- libffi/testsuite/lib/libffi-dg.exp.shlib	2004-01-13 09:11:25.000000000 -0800
+++ libffi/testsuite/lib/libffi-dg.exp	2004-09-13 10:54:00.803617324 -0700
@@ -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,33 @@ 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]} {
+	if [info exists env(LD_LIBRARY_PATH)] {
+	    setenv LD_LIBRARY_PATH "$ld_library_path:$env(LD_LIBRARY_PATH)"
+	} else {
+	    setenv LD_LIBRARY_PATH $ld_library_path
+	}
+	if [info exists env(SHLIB_PATH)] {
+	    setenv SHLIB_PATH "$ld_library_path:$env(SHLIB_PATH)"
+	} else {
+	    setenv SHLIB_PATH $ld_library_path
+	}
+	if [info exists env(LD_LIBRARYN32_PATH)] {
+	    setenv LD_LIBRARYN32_PATH "$ld_library_path:$env(LD_LIBRARYN32_PATH)"
+	} else {
+	    setenv LD_LIBRARYN32_PATH $ld_library_path
+	}
+	if [info exists env(LD_LIBRARY64_PATH)] {
+	    setenv LD_LIBRARY64_PATH "$ld_library_path:$env(LD_LIBRARY64_PATH)"
+	} else {
+	    setenv LD_LIBRARY64_PATH $ld_library_path
+	}
+	if [info exists env(DYLD_LIBRARY_PATH)] {
+	    setenv DYLD_LIBRARY_PATH "$ld_library_path:$env(DYLD_LIBRARY_PATH)"
+	} else {
+	    setenv DYLD_LIBRARY_PATH $ld_library_path
+	}
+    }
 }
 
 proc libffi_target_compile { source dest type options } {
@@ -147,7 +167,6 @@ proc libffi_target_compile { source dest
     global srcdir
     global blddirffi
     global TOOL_OPTIONS
-    global ld_library_path
     global libffi_link_flags
     global libffi_include
     global target_triplet


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