X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=bin%2Fblhc;h=d966f9340248c5331157568f1fe2673f852d99cb;hp=5d018ee88df49702c0d826b6e95383db3771ce32;hb=4d6308c34fb0182db05846df83118bb83ad5497d;hpb=fdcf9bec1ed4e314ded6e0a5181ec7c24f400c9b diff --git a/bin/blhc b/bin/blhc index 5d018ee..d966f93 100755 --- a/bin/blhc +++ b/bin/blhc @@ -44,6 +44,14 @@ sub error_flags { error_color($message, 'red'), $flags, error_color(':', 'yellow'), $line; } +sub error_nonverbose_build { + my ($line) = @_; + + printf "%s%s %s", + error_color('NONVERBOSE BUILD', 'red'), + error_color(':', 'yellow'), + $line; +} sub error_color { my ($message, $color) = @_; @@ -87,7 +95,7 @@ sub pic_pie_conflict { my ($line, $pie, $missing_flags_ref, @flags_pie) = @_; return 0 if not $pie; - return 0 if not any_flags_used($line, ('-fPIC')); + return 0 if not any_flags_used($line, ('-fPIC', '-fpic')); my %flags = map { $_ => 1 } @flags_pie; @@ -206,6 +214,16 @@ while (my $line = <>) { # Ignore compiler warnings for now. next if $line =~ /$warning_regex/; + # Try to detect non verbose build logs. + if ($line =~ /^checking if you want to see long compiling messages\.\.\. no/ + or $line =~ /^\s*(CC|CCLD)\s+/ + or $line =~ /^\s*(C|c)ompiling\s+/ + or $line =~ /^\s*\[[\d ]+%\] Building /) { + error_nonverbose_build($line); + $exit |= 1 << 2; + } + + # One line may contain multiple commands (";"). Treat each one as single # line. my @line = split /(?) { } else { # Ignore lines with no compiler commands. - next if $line !~ /\b(cc|gcc|g\+\+|c\+\+)(\s|\\)/; + next if $line !~ /\b((? +Non verbose build. + +=item B<8> + Missing hardening flags. =back