]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Detect more C++ non-verbose builds.
[blhc/blhc.git] / bin / blhc
index 87037453ac493594c06b3339118d28621be94f12..9800eafad367ab187ffedd6fe94ae9f4fc20ea45 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -312,13 +312,16 @@ sub is_non_verbose_build {
     my ($line, $next_line, $skip_ref) = @_;
 
     if (not ($line =~ /^checking if you want to see long compiling messages\.\.\. no/
-                or $line =~ /^\s*\[?(?:CC|CCLD|CXX|CXXLD|LD|LINK)\]?\s+(.+?)$/
+                or $line =~ /^\s*\[?(?:CC|CCLD|C\+\+|CXX|CXXLD|LD|LINK)\]?\s+(.+?)$/
                 or $line =~ /^\s*(?:C|c)ompiling\s+(.+?)(?:\.\.\.)?$/
                 or $line =~ /^\s*(?:B|b)uilding (?:program|shared library)\s+(.+?)$/
                 or $line =~ /^\s*\[[\d ]+%\] Building (?:C|CXX) object (.+?)$/)) {
         return 0;
     }
 
+    # False positives.
+    return 0 if $line =~ /^\s*C\+\+.+?:\s+(?:yes|no)\s*$/;
+
     my $file = $1;
 
     # On the first pass we only check if this line is verbose or not.
@@ -586,6 +589,9 @@ FILE: foreach my $file (@ARGV) {
                 # `./configure` output.
                 next if not $non_verbose
                         and $line =~ /^(?:checking|(?:C|c)onfigure:) /;
+                next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)?
+                                   (?:C|c)ompiler[\s.]*:?\s+
+                                 /xo;
                 next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o;
 
                 # Check if additional hardening options were used. Used to