Commit 1c10e0ce by Maxim Kuvyrkov Committed by Maxim Kuvyrkov

re PR testsuite/65116 (ERROR: can't read additional_sources: no such variable)

Fix PR testsuite/65116

	PR testsuite/65116
	* lib/target-supports.exp (check_compile): Check whether
	additional_sources is defined before using it.

From-SVN: r220822
parent 53b2288f
2015-02-19 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
PR testsuite/65116
* lib/target-supports.exp (check_compile): Check whether
additional_sources is defined before using it.
2015-02-19 Jakub Jelinek <jakub@redhat.com> 2015-02-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/65074 PR middle-end/65074
......
...@@ -44,8 +44,10 @@ proc check_compile {basename type contents args} { ...@@ -44,8 +44,10 @@ proc check_compile {basename type contents args} {
# Save additional_sources to avoid compiling testsuite's sources # Save additional_sources to avoid compiling testsuite's sources
# against check_compile's source. # against check_compile's source.
global additional_sources global additional_sources
set tmp_additional_sources "$additional_sources" if [info exists additional_sources] {
set additional_sources "" set tmp_additional_sources "$additional_sources"
set additional_sources ""
}
if { [llength $args] > 0 } { if { [llength $args] > 0 } {
set options [list "additional_flags=[lindex $args 0]"] set options [list "additional_flags=[lindex $args 0]"]
...@@ -93,7 +95,9 @@ proc check_compile {basename type contents args} { ...@@ -93,7 +95,9 @@ proc check_compile {basename type contents args} {
} }
# Restore additional_sources. # Restore additional_sources.
set additional_sources "$tmp_additional_sources" if [info exists additional_sources] {
set additional_sources "$tmp_additional_sources"
}
return [list $lines $scan_output] 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