Commit 8a627e40 by Maxim Kuvyrkov Committed by Maxim Kuvyrkov

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
parent 1216ea72
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
......
......@@ -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]
}
......
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