diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2015-02-19 08:25:30 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2015-02-19 08:25:30 +0000 |
commit | 8a627e40a8c2809d6e2a87e3b6cfabeb2f10c7a7 (patch) | |
tree | bdb9b5a0b650474e7eab8c5bcab64a582cb4f00b | |
parent | 1216ea72ef53ea28dfd0ec9a7cfacd8725476ec6 (diff) | |
download | gcc-8a627e40a8c2809d6e2a87e3b6cfabeb2f10c7a7.zip gcc-8a627e40a8c2809d6e2a87e3b6cfabeb2f10c7a7.tar.gz gcc-8a627e40a8c2809d6e2a87e3b6cfabeb2f10c7a7.tar.bz2 |
Fix testsuite race on additional_sources
* testsuite/lib/target-supports.exp (check_compile): Save/restore
additional_sources that may belong to an actual test.
From-SVN: r220807
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1ca711d..32544ea 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-19 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> + + * testsuite/lib/target-supports.exp (check_compile): Save/restore + additional_sources that may belong to an actual test. + 2015-02-18 Jakub Jelinek <jakub@redhat.com> PR gcov-profile/64634 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 93cb791..50a055d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -41,6 +41,12 @@ proc check_compile {basename type contents args} { global tool verbose "check_compile tool: $tool for $basename" + # Save additional_sources to avoid compiling testsuite's sources + # against check_compile's source. + global additional_sources + set tmp_additional_sources "$additional_sources" + set additional_sources "" + if { [llength $args] > 0 } { set options [list "additional_flags=[lindex $args 0]"] } else { @@ -86,6 +92,9 @@ proc check_compile {basename type contents args} { file delete $output } + # Restore additional_sources. + set additional_sources "$tmp_additional_sources" + return [list $lines $scan_output] } |