+2015-03-24 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
+
+ Backport from mainline:
+
+ 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 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
+ * lib/target-supports.exp (check_compile): Save/restore
+ additional_sources that may belong to an actual test.
+
2015-03-24 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/60851
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
+ if [info exists additional_sources] {
+ set tmp_additional_sources "$additional_sources"
+ set additional_sources ""
+ }
+
if { [llength $args] > 0 } {
set options [list "additional_flags=[lindex $args 0]"]
} else {
file delete $output
}
+ # Restore additional_sources.
+ if [info exists additional_sources] {
+ set additional_sources "$tmp_additional_sources"
+ }
+
return [list $lines $scan_output]
}