diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2015-02-19 19:57:30 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2015-02-19 19:57:30 +0000 |
commit | 1c10e0cecc0c99f9b729beea47bbfb563c5dd84e (patch) | |
tree | 9d82eb90c27a2f2f4d070048ae2ae521a0f5960f /gcc | |
parent | 53b2288f93d54b50a0781941009f384d765f3bb6 (diff) | |
download | gcc-1c10e0cecc0c99f9b729beea47bbfb563c5dd84e.zip gcc-1c10e0cecc0c99f9b729beea47bbfb563c5dd84e.tar.gz gcc-1c10e0cecc0c99f9b729beea47bbfb563c5dd84e.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 65303b1..7514a0a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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> PR middle-end/65074 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 50a055d..6b957de 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -44,8 +44,10 @@ proc check_compile {basename type contents args} { # 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 [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]"] @@ -93,7 +95,9 @@ proc check_compile {basename type contents args} { } # 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] } |