diff options
Diffstat (limited to 'gcc/testsuite/lib/lto.exp')
-rw-r--r-- | gcc/testsuite/lib/lto.exp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp index 7b51fdd2f6f..7d0620faa0e 100644 --- a/gcc/testsuite/lib/lto.exp +++ b/gcc/testsuite/lib/lto.exp @@ -32,7 +32,7 @@ proc lto_prune_warns { text } { # Sun ld warns about common symbols with differing sizes. Unlike GNU ld # --warn-common (off by default), they cannot be disabled. - regsub -all "(^|\n)ld: warning: symbol `\[^\n\]*' has differing sizes:" $text "" text + regsub -all "(^|\n)ld: warning: symbol \[`'\]\[^\n\]*' has differing sizes:" $text "" text regsub -all "(^|\n)\[ \t\]*\[\(\]file \[^\n\]* value=\[^\n\]*; file \[^\n\]* value=\[^\n\]*\[)\];" $text "" text regsub -all "(^|\n)\[ \t\]*\[^\n\]* definition taken" $text "" text @@ -110,6 +110,7 @@ set lto_skip_list $LTO_SKIPS load_lib dg.exp load_lib gcc-dg.exp +load_lib gcc.exp # lto-obj -- compile to an object file # @@ -137,7 +138,13 @@ proc lto-obj { source dest optall optfile optstr xfaildata } { lappend options "additional_flags=$optall $optfile" set compiler_conditional_xfail_data $xfaildata - set comp_output [${tool}_target_compile "$source" "$dest" object $options] + + # Allow C source files to mix freely with other languages + if [ string match "*.c" $source ] then { + set comp_output [gcc_target_compile "$source" "$dest" object $options] + } else { + set comp_output [${tool}_target_compile "$source" "$dest" object $options] + } # Prune unimportant visibility warnings before checking output. set comp_output [lto_prune_warns $comp_output] ${tool}_check_compile "$testcase $dest assemble" $optstr $dest $comp_output |