diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-01-15 20:39:04 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-01-15 20:39:04 +0000 |
commit | 6c34c761d2f06a5be7c40c20088ff0d941fdb259 (patch) | |
tree | afdb541063f047aed653957b2cdd81795de30f17 | |
parent | d1457701461d5a49ca6b5d8a6d1c83a37a6dc771 (diff) | |
download | gcc-6c34c761d2f06a5be7c40c20088ff0d941fdb259.zip gcc-6c34c761d2f06a5be7c40c20088ff0d941fdb259.tar.gz gcc-6c34c761d2f06a5be7c40c20088ff0d941fdb259.tar.bz2 |
c-torture.exp: Compute LTO_TORTURE_OPTIONS after the environment is set up.
* lib/c-torture.exp: Compute LTO_TORTURE_OPTIONS after the environment
is set up.
* lib/gcc-dg.exp: Likewise.
From-SVN: r219684
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/c-torture.exp | 28 | ||||
-rw-r--r-- | gcc/testsuite/lib/gcc-dg.exp | 19 |
3 files changed, 29 insertions, 24 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b59a8f4..b47f751 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-01-15 Eric Botcazou <ebotcazou@adacore.com> + + * lib/c-torture.exp: Compute LTO_TORTURE_OPTIONS after the environment + is set up. + * lib/gcc-dg.exp: Likewise. + 2015-01-15 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/64110 diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp index 9d66a9d..ebac57a 100644 --- a/gcc/testsuite/lib/c-torture.exp +++ b/gcc/testsuite/lib/c-torture.exp @@ -51,6 +51,20 @@ 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 +} + set LTO_TORTURE_OPTIONS "" if [check_effective_target_lto] { # When having plugin test both slim and fat LTO and plugin/nonplugin @@ -68,20 +82,6 @@ if [check_effective_target_lto] { } } -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 35766b4..443e8ed 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -72,7 +72,14 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] { [concat $DG_TORTURE_OPTIONS $ADDITIONAL_TORTURE_OPTIONS] } -set LTO_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 @@ -80,6 +87,7 @@ set LTO_TORTURE_OPTIONS "" 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. @@ -97,15 +105,6 @@ if [check_effective_target_lto] { } } -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 -} - # Define gcc callbacks for dg.exp. proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { |