aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/compat.exp2
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp5
-rw-r--r--gcc/testsuite/lib/target-libpath.exp37
-rw-r--r--gcc/testsuite/lib/target-supports.exp3
4 files changed, 39 insertions, 8 deletions
diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp
index 049e5a23270..a4ec3601e56 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -170,6 +170,7 @@ proc compat-get-options-main { src } {
foreach op $tmp {
set cmd [lindex $op 0]
if { ![string compare "dg-options" $cmd] \
+ || [string match "dg-prune-output" $cmd] \
|| [string match "dg-skip-if" $cmd] \
|| [string match "dg-require-*" $cmd] } {
set status [catch "$op" errmsg]
@@ -215,6 +216,7 @@ proc compat-get-options { src } {
foreach op $tmp {
set cmd [lindex $op 0]
if { ![string compare "dg-options" $cmd] \
+ || ![string compare "dg-prune-output" $cmd] \
|| ![string compare "dg-xfail-if" $cmd] } {
set status [catch "$op" errmsg]
if { $status != 0 } {
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 0570f41e6d7..7bcbcabc087 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -49,6 +49,11 @@ proc ${tool}_check_compile {testcase option objname gcc_output} {
set gcc_output [prune_warnings $gcc_output]
+ if { [info proc ${tool}-dg-prune] != "" } {
+ global target_triplet
+ set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
+ }
+
set unsupported_message [${tool}_check_unsupported_p $gcc_output]
if { $unsupported_message != "" } {
unsupported "$testcase: $unsupported_message"
diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp
index 8999aa47980..c95cba6d784 100644
--- a/gcc/testsuite/lib/target-libpath.exp
+++ b/gcc/testsuite/lib/target-libpath.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@ set orig_ld_library64_path_saved 0
set orig_ld_library_path_32_saved 0
set orig_ld_library_path_64_saved 0
set orig_dyld_library_path_saved 0
+set orig_gcc_exec_prefix_saved 0
+set orig_gcc_exec_prefix_checked 0
#######################################
@@ -42,6 +44,8 @@ proc set_ld_library_path_env_vars { } {
global orig_ld_library_path_32_saved
global orig_ld_library_path_64_saved
global orig_dyld_library_path_saved
+ global orig_gcc_exec_prefix_saved
+ global orig_gcc_exec_prefix_checked
global orig_ld_library_path
global orig_ld_run_path
global orig_shlib_path
@@ -50,11 +54,23 @@ proc set_ld_library_path_env_vars { } {
global orig_ld_library_path_32
global orig_ld_library_path_64
global orig_dyld_library_path
- global GCC_EXEC_PREFIX
+ global orig_gcc_exec_prefix
+ global TEST_GCC_EXEC_PREFIX
+ global env
- # Set the relocated compiler prefix, but only if the user hasn't specified one.
- if { [info exists GCC_EXEC_PREFIX] && ![info exists env(GCC_EXEC_PREFIX)] } {
- setenv GCC_EXEC_PREFIX "$GCC_EXEC_PREFIX"
+ # Save the original GCC_EXEC_PREFIX.
+ if { $orig_gcc_exec_prefix_checked == 0 } {
+ if [info exists env(GCC_EXEC_PREFIX)] {
+ set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
+ set orig_gcc_exec_prefix_saved 1
+ }
+ set orig_gcc_exec_prefix_checked 1
+ }
+
+ # Set GCC_EXEC_PREFIX for the compiler under test to pick up files not in
+ # the build tree from a specified location (normally the install tree).
+ if [info exists TEST_GCC_EXEC_PREFIX] {
+ setenv GCC_EXEC_PREFIX "$TEST_GCC_EXEC_PREFIX"
}
# Setting the ld library path causes trouble when testing cross-compilers.
@@ -63,8 +79,6 @@ proc set_ld_library_path_env_vars { } {
}
if { $orig_environment_saved == 0 } {
- global env
-
set orig_environment_saved 1
# Save the original environment.
@@ -187,6 +201,7 @@ proc restore_ld_library_path_env_vars { } {
global orig_ld_library_path_32_saved
global orig_ld_library_path_64_saved
global orig_dyld_library_path_saved
+ global orig_gcc_exec_prefix_saved
global orig_ld_library_path
global orig_ld_run_path
global orig_shlib_path
@@ -195,11 +210,19 @@ proc restore_ld_library_path_env_vars { } {
global orig_ld_library_path_32
global orig_ld_library_path_64
global orig_dyld_library_path
+ global orig_gcc_exec_prefix
+ global env
if { $orig_environment_saved == 0 } {
return
}
+ if { $orig_gcc_exec_prefix_saved } {
+ setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
+ } elseif [info exists env(GCC_EXEC_PREFIX)] {
+ unsetenv GCC_EXEC_PREFIX
+ }
+
if { $orig_ld_library_path_saved } {
setenv LD_LIBRARY_PATH "$orig_ld_library_path"
} elseif [info exists env(LD_LIBRARY_PATH)] {
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 27ca50deceb..884e743d405 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2288,7 +2288,8 @@ proc check_effective_target_vect_short_mult { } {
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
- || [istarget powerpc*-*-*] } {
+ || [istarget powerpc*-*-*]
+ || [check_effective_target_arm32] } {
set et_vect_short_mult_saved 1
}
}