]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport testsuite race fix from mainline
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
Tue, 24 Mar 2015 17:19:34 +0000 (17:19 +0000)
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>
Tue, 24 Mar 2015 17:19:34 +0000 (17:19 +0000)
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.

From-SVN: r221639

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 0b61978ea3b28e44794eb0973073d51c63562930..5ae1bf25077c538d9b58d0a7df0697c224336c5f 100644 (file)
@@ -1,3 +1,16 @@
+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
index 52ec684fb6d0dcb85aa4c4a3f81801034d85aa8e..04f08eb0416f04f0504281ff485d141073f314cb 100644 (file)
@@ -41,6 +41,14 @@ 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
+    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 {
@@ -86,6 +94,11 @@ proc check_compile {basename type contents args} {
        file delete $output
     }
 
+    # Restore additional_sources.
+    if [info exists additional_sources] {
+       set additional_sources "$tmp_additional_sources"
+    }
+
     return [list $lines $scan_output]
 }