Fix pr12009: g++.dg, compat.exp fail to crosscompile testcases

Dan Kegel dank@kegel.com
Thu Aug 21 14:14:00 GMT 2003


See http://gcc.gnu.org/PR12009

2003-08-20  Dan Kegel  <dank@kegel.com>

	* gcc/testsuite/g++.dg/compat/compat.exp, gcc/testsuite/lib/g++.exp:
           don't set LD_LIBRARY_PATH when running remote tests, as that
           causes cross-compiler to fail when building testcases

--- gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp.old	Thu Oct 17 17:22:57 2002
+++ gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp	Mon Jul 14 10:59:19 2003
@@ -42,11 +42,13 @@
  proc compat-fix-library-path { } {
      global ld_library_path

-    # See comments in lib/g++.exp for why this is needed.
-    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
+    if {![is_remote target]} {
+	# See comments in lib/g++.exp for why this is needed.
+	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
+    }
  }

  #
--- gcc-3.4-20030813/gcc/testsuite/lib/g++.exp.orig	Tue Jun 17 18:56:45 2003
+++ gcc-3.4-20030813/gcc/testsuite/lib/g++.exp	Sun Aug 17 18:35:38 2003
@@ -166,16 +182,20 @@
        }
      }

-    # 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
+    if {![is_remote target]} {
+      # 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.
+
+      # Doing this causes us to be unable to run cross-compilers.
+      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"
  }

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045



More information about the Gcc-patches mailing list