@@ -78,6 +78,9 @@ proc check_compile {basename type contents args} {
set lines [${tool}_target_compile $src $output $compile_type "$options"]
file delete $src
+ # Mask out messages from gcc that aren't useful for our purposes here.
+ set lines [string trim [prune_gcc_output $lines]]
+
set scan_output $output
# Don't try folding this into the switch above; calling "glob" before the
# file is created won't work.
Patch to mask out »valid for Fortran but not for C« warnings.
@@ -46,6 +46,10 @@ proc prune_gcc_output { text } {
regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
+ # Ignore warning for gfortran options passed to xgcc not running in Fortran
+ # mode.
+ regsub -all "(^|\n)\[^\n\]*: warning: command line option .-f\[^\n\]*. is valid for Fortran but not for C\[^\n\]*" $text "" text
+
# Ignore harmless VTA note.
regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text