summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-24 08:22:35 +0000
committerjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-24 08:22:35 +0000
commit156dba859d6d9c279f1c4cd10fe030e4fdf2e31d (patch)
tree86ffe52d7f1e5979abc347f106b741bad76784db
parent98e960a5157ecc5ef2d8b4e138a6657d4f458814 (diff)
downloadgcc-156dba859d6d9c279f1c4cd10fe030e4fdf2e31d.tar.gz
[PATCH][testsuite] Fix TORTURE_OPTIONS overriding
gcc/testsuite/ * lib/c-torture.exp: Don't call check_effective_target_lto before setting up environment correctly. * lib/gcc-dg.exp: Likewise, and protect gcc_force_conventional_output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224878 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/lib/c-torture.exp28
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp26
3 files changed, 34 insertions, 27 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8e28edc2aea..ee58cdc36a2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-06-24 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * lib/c-torture.exp: Don't call check_effective_target_lto
+ before setting up environment correctly.
+ * lib/gcc-dg.exp: Likewise, and protect
+ gcc_force_conventional_output.
+
2015-06-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR rtl-optimization/66306
diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp
index 607e7d0435f..c88c439a512 100644
--- a/gcc/testsuite/lib/c-torture.exp
+++ b/gcc/testsuite/lib/c-torture.exp
@@ -21,6 +21,20 @@ load_lib file-format.exp
load_lib target-libpath.exp
load_lib target-utils.exp
+global GCC_UNDER_TEST
+if ![info exists GCC_UNDER_TEST] {
+ set GCC_UNDER_TEST "[find_gcc]"
+}
+
+global orig_environment_saved
+
+# This file may be sourced, so don't override environment settings
+# that have been previously setup.
+if { $orig_environment_saved == 0 } {
+ append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+ set_ld_library_path_env_vars
+}
+
# The default option list can be overridden by
# TORTURE_OPTIONS="{ list1 } ... { listN }"
@@ -68,20 +82,6 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] {
[concat $C_TORTURE_OPTIONS $ADDITIONAL_TORTURE_OPTIONS]
}
-global GCC_UNDER_TEST
-if ![info exists GCC_UNDER_TEST] {
- set GCC_UNDER_TEST "[find_gcc]"
-}
-
-global orig_environment_saved
-
-# This file may be sourced, so don't override environment settings
-# that have been previously setup.
-if { $orig_environment_saved == 0 } {
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
- set_ld_library_path_env_vars
-}
-
#
# c-torture-compile -- runs the Tege C-torture test
#
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 00ca0c5d116..d463f81cebc 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -46,6 +46,19 @@ if ![info exists GCC_UNDER_TEST] {
set GCC_UNDER_TEST "[find_gcc]"
}
+# This file may be sourced, so don't override environment settings
+# that have been previously setup.
+if { $orig_environment_saved == 0 } {
+ append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+ set_ld_library_path_env_vars
+}
+
+# Some torture-options cause intermediate code output, unusable for
+# testing using e.g. scan-assembler. In this variable are the options
+# how to force it, when needed.
+global gcc_force_conventional_output
+set gcc_force_conventional_output ""
+
set LTO_TORTURE_OPTIONS ""
if [info exists TORTURE_OPTIONS] {
set DG_TORTURE_OPTIONS $TORTURE_OPTIONS
@@ -92,19 +105,6 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] {
global orig_environment_saved
-# This file may be sourced, so don't override environment settings
-# that have been previously setup.
-if { $orig_environment_saved == 0 } {
- append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
- set_ld_library_path_env_vars
-}
-
-# Some torture-options cause intermediate code output, unusable for
-# testing using e.g. scan-assembler. In this variable are the options
-# how to force it, when needed.
-global gcc_force_conventional_output
-set gcc_force_conventional_output ""
-
# Deduce generated files from tool flags, return finalcode string
proc schedule-cleanups { opts } {
global additional_sources