aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-06-22 10:45:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-06-22 10:45:47 +0000
commit1a7611575b2dade35a46f99c67c2a649de2c12ad (patch)
tree5f51fb11012bfd0350a3468b153e1430d36dd602
parent6d098c572aef870f6a068d7e6697fde5a4ed2ccc (diff)
downloadgcc-1a7611575b2dade35a46f99c67c2a649de2c12ad.zip
gcc-1a7611575b2dade35a46f99c67c2a649de2c12ad.tar.gz
gcc-1a7611575b2dade35a46f99c67c2a649de2c12ad.tar.bz2
c-torture.exp: Set LTO_TORTURE_OPTIONS conditional on not existing TORTURE_OPTIONS only.
2015-06-22 Richard Biener <rguenther@suse.de> * lib/c-torture.exp: Set LTO_TORTURE_OPTIONS conditional on not existing TORTURE_OPTIONS only. * lib/gcc-dg.exp: Likewise. From-SVN: r224724
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/lib/c-torture.exp36
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp36
3 files changed, 42 insertions, 36 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 666acc1..06ab497 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-22 Richard Biener <rguenther@suse.de>
+
+ * lib/c-torture.exp: Set LTO_TORTURE_OPTIONS conditional on
+ not existing TORTURE_OPTIONS only.
+ * lib/gcc-dg.exp: Likewise.
+
2015-06-22 Christian Bruel <christian.bruel@st.com>
PR target/52144
diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp
index ebac57a..607e7d0 100644
--- a/gcc/testsuite/lib/c-torture.exp
+++ b/gcc/testsuite/lib/c-torture.exp
@@ -22,8 +22,9 @@ load_lib target-libpath.exp
load_lib target-utils.exp
# The default option list can be overridden by
-# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
+# TORTURE_OPTIONS="{ list1 } ... { listN }"
+set LTO_TORTURE_OPTIONS ""
if [info exists TORTURE_OPTIONS] {
set C_TORTURE_OPTIONS $TORTURE_OPTIONS
} else {
@@ -44,6 +45,22 @@ if [info exists TORTURE_OPTIONS] {
{ -O3 -g } \
{ -Os } \
{ -Og -g } ]
+
+ if [check_effective_target_lto] {
+ # When having plugin test both slim and fat LTO and plugin/nonplugin
+ # path.
+ if [check_linker_plugin_available] {
+ set LTO_TORTURE_OPTIONS [list \
+ { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
+ { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
+ ]
+ } else {
+ set LTO_TORTURE_OPTIONS [list \
+ { -O2 -flto -flto-partition=none } \
+ { -O2 -flto }
+ ]
+ }
+ }
}
if [info exists ADDITIONAL_TORTURE_OPTIONS] {
@@ -65,23 +82,6 @@ if { $orig_environment_saved == 0 } {
set_ld_library_path_env_vars
}
-set LTO_TORTURE_OPTIONS ""
-if [check_effective_target_lto] {
- # When having plugin test both slim and fat LTO and plugin/nonplugin
- # path.
- if [check_linker_plugin_available] {
- set LTO_TORTURE_OPTIONS [list \
- { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
- { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
- ]
- } else {
- set LTO_TORTURE_OPTIONS [list \
- { -O2 -flto -flto-partition=none } \
- { -O2 -flto }
- ]
- }
-}
-
#
# 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 9e4ecce..00ca0c5 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -46,6 +46,7 @@ if ![info exists GCC_UNDER_TEST] {
set GCC_UNDER_TEST "[find_gcc]"
}
+set LTO_TORTURE_OPTIONS ""
if [info exists TORTURE_OPTIONS] {
set DG_TORTURE_OPTIONS $TORTURE_OPTIONS
} else {
@@ -65,6 +66,23 @@ if [info exists TORTURE_OPTIONS] {
{ -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } \
{ -O3 -g } \
{ -Os } ]
+
+ if [check_effective_target_lto] {
+ # When having plugin test both slim and fat LTO and plugin/nonplugin
+ # path.
+ if [check_linker_plugin_available] {
+ set LTO_TORTURE_OPTIONS [list \
+ { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
+ { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
+ ]
+ set gcc_force_conventional_output "-ffat-lto-objects"
+ } else {
+ set LTO_TORTURE_OPTIONS [list \
+ { -O2 -flto -flto-partition=none } \
+ { -O2 -flto }
+ ]
+ }
+ }
}
if [info exists ADDITIONAL_TORTURE_OPTIONS] {
@@ -87,24 +105,6 @@ if { $orig_environment_saved == 0 } {
global gcc_force_conventional_output
set gcc_force_conventional_output ""
-set LTO_TORTURE_OPTIONS ""
-if [check_effective_target_lto] {
- # When having plugin test both slim and fat LTO and plugin/nonplugin
- # path.
- if [check_linker_plugin_available] {
- set LTO_TORTURE_OPTIONS [list \
- { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
- { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
- ]
- set gcc_force_conventional_output "-ffat-lto-objects"
- } else {
- set LTO_TORTURE_OPTIONS [list \
- { -O2 -flto -flto-partition=none } \
- { -O2 -flto }
- ]
- }
-}
-
# Deduce generated files from tool flags, return finalcode string
proc schedule-cleanups { opts } {
global additional_sources