OSDN Git Service

* gcc.dg/vect/pr18425.c: Use effective target vect_long.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / g++.exp
index 161371b..d591238 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -138,7 +138,7 @@ proc g++_link_flags { paths } {
          if { "$mldir" == "." } {
            continue
          }
-         if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } {
+         if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
            append ld_library_path ":${rootme}/${mldir}"
          }
        }
@@ -177,9 +177,16 @@ proc g++_link_flags { paths } {
     # Doing this does cause trouble when testing cross-compilers.
     if {![is_remote target]} {
        global env;
-       if { [info exists env(LD_LIBRARY_PATH)] 
-            && $env(LD_LIBRARY_PATH) != "" } {
-               append ld_library_path ":$env(LD_LIBRARY_PATH)";
+       if [info exists env(LD_LIBRARY_PATH)] {
+           # If we've already added these directories once, keep the
+           # existing path.
+           if {$ld_library_path == $env(LD_LIBRARY_PATH)
+               || [string first $ld_library_path: \
+                                $env(LD_LIBRARY_PATH)] == 0} {
+               set ld_library_path $env(LD_LIBRARY_PATH)
+           } elseif { $env(LD_LIBRARY_PATH) != "" } {
+               append ld_library_path ":$env(LD_LIBRARY_PATH)"
+           }
        }
        setenv  LD_LIBRARY_PATH     $ld_library_path
        setenv  SHLIB_PATH          $ld_library_path
@@ -211,6 +218,10 @@ proc g++_init { args } {
     global TESTING_IN_BUILD_TREE
     global target_triplet
 
+    # We set LC_ALL and LANG to C so that we get the same error messages as expected.
+    setenv LC_ALL C
+    setenv LANG C
+
     if ![info exists GXX_UNDER_TEST] then {
        if [info exists TOOL_EXECUTABLE] {
            set GXX_UNDER_TEST $TOOL_EXECUTABLE;
@@ -242,16 +253,7 @@ proc g++_init { args } {
        unset gluefile
     }
 
-    if { [target_info needs_status_wrapper] != "" } {
-       set gluefile ${tmpdir}/g++-testglue.o;
-       set result [build_wrapper $gluefile];
-       if { $result != "" } {
-           set gluefile [lindex $result 0];
-           set wrap_flags [lindex $result 1];
-       } else {
-           unset gluefile
-       }
-    }
+    g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o"
 
     set ALWAYS_CXXFLAGS ""