Commit 1a761157 by Richard Biener Committed by Richard Biener

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
parent 6d098c57
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> 2015-06-22 Christian Bruel <christian.bruel@st.com>
PR target/52144 PR target/52144
......
...@@ -22,8 +22,9 @@ load_lib target-libpath.exp ...@@ -22,8 +22,9 @@ load_lib target-libpath.exp
load_lib target-utils.exp load_lib target-utils.exp
# The default option list can be overridden by # 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] { if [info exists TORTURE_OPTIONS] {
set C_TORTURE_OPTIONS $TORTURE_OPTIONS set C_TORTURE_OPTIONS $TORTURE_OPTIONS
} else { } else {
...@@ -44,6 +45,22 @@ if [info exists TORTURE_OPTIONS] { ...@@ -44,6 +45,22 @@ if [info exists TORTURE_OPTIONS] {
{ -O3 -g } \ { -O3 -g } \
{ -Os } \ { -Os } \
{ -Og -g } ] { -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] { if [info exists ADDITIONAL_TORTURE_OPTIONS] {
...@@ -65,23 +82,6 @@ if { $orig_environment_saved == 0 } { ...@@ -65,23 +82,6 @@ if { $orig_environment_saved == 0 } {
set_ld_library_path_env_vars 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 # c-torture-compile -- runs the Tege C-torture test
# #
......
...@@ -46,6 +46,7 @@ if ![info exists GCC_UNDER_TEST] { ...@@ -46,6 +46,7 @@ if ![info exists GCC_UNDER_TEST] {
set GCC_UNDER_TEST "[find_gcc]" set GCC_UNDER_TEST "[find_gcc]"
} }
set LTO_TORTURE_OPTIONS ""
if [info exists TORTURE_OPTIONS] { if [info exists TORTURE_OPTIONS] {
set DG_TORTURE_OPTIONS $TORTURE_OPTIONS set DG_TORTURE_OPTIONS $TORTURE_OPTIONS
} else { } else {
...@@ -65,6 +66,23 @@ if [info exists TORTURE_OPTIONS] { ...@@ -65,6 +66,23 @@ if [info exists TORTURE_OPTIONS] {
{ -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } \ { -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } \
{ -O3 -g } \ { -O3 -g } \
{ -Os } ] { -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] { if [info exists ADDITIONAL_TORTURE_OPTIONS] {
...@@ -87,24 +105,6 @@ if { $orig_environment_saved == 0 } { ...@@ -87,24 +105,6 @@ if { $orig_environment_saved == 0 } {
global gcc_force_conventional_output global gcc_force_conventional_output
set 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 # Deduce generated files from tool flags, return finalcode string
proc schedule-cleanups { opts } { proc schedule-cleanups { opts } {
global additional_sources global additional_sources
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment