X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=bin%2Fblhc;h=8cbee81e37bf357c65265fc25d932811a5baf198;hp=a6cb190dea75797765adc38fa1613bc1e27736b2;hb=74008a4373f685a862518f8fe3298c6752fac0ce;hpb=640b00ae26577c67685b80964e1811294c156d5c diff --git a/bin/blhc b/bin/blhc index a6cb190..8cbee81 100755 --- a/bin/blhc +++ b/bin/blhc @@ -2,7 +2,7 @@ # Build log hardening check, checks build logs for missing hardening flags. -# Copyright (C) 2012-2019 Simon Ruderich +# Copyright (C) 2012-2020 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ use warnings; use Getopt::Long (); use Text::ParseWords (); -our $VERSION = '0.09'; +our $VERSION = '0.10'; # CONSTANTS/VARIABLES @@ -53,7 +53,7 @@ my $cc_regex_normal = qr/ my $warning_regex = qr/^(.+?):(\d+):\d+: warning: (.+?) \[(.+?)\]$/; # Regex to catch libtool commands and not lines which show commands executed # by libtool (e.g. libtool: link: ...). -my $libtool_regex = qr/\blibtool\s.*--mode=/; +my $libtool_regex = qr/\blibtool["']?\s.*--mode=/; my $libtool_link_regex = qr/\blibtool: link: /; # List of source file extensions which require preprocessing. @@ -544,7 +544,7 @@ sub is_non_verbose_build { return 0 if $line =~ /^\s*C\+\+.+?:\s+(?:yes|no)\s*$/; return 0 if $line =~ /^\s*C\+\+ Library: stdc\+\+$/; # "Compiling" non binary files. - return 0 if $line =~ /^\s*Compiling \S+\.(?:py|el)['"]?\s*(?:\.\.\.)?$/; + return 0 if $line =~ /^\s*Compiling \S+\.(?:py|pyx|el)['"]?\s*(?:\.\.\.|because it changed\.)?$/; return 0 if $line =~ /^\s*[Cc]ompiling catalog \S+\.po\b/; # "Compiling" with no file name. if ($line =~ /^\s*[Cc]ompiling\s+(.+?)(?:\.\.\.)?$/) { @@ -684,7 +684,7 @@ if ($option_help) { } if ($option_version) { print <<"EOF"; -blhc $VERSION Copyright (C) 2012-2019 Simon Ruderich +blhc $VERSION Copyright (C) 2012-2020 Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1061,6 +1061,7 @@ foreach my $file (@ARGV) { # look like a compiler executable thus causing the line to be # treated as a normal compiler line. next if $line =~ m{^\s*rm\s+}; + next if $line =~ m{^\s*dwz\s+}; # Some build systems emit "gcc > file". next if $line =~ m{$cc_regex_normal\s*>\s*\S+}o; # Hex output may contain "cc". @@ -1758,7 +1759,7 @@ Ejari.aalto@cante.netE for their valuable input and suggestions. =head1 LICENSE AND COPYRIGHT -Copyright (C) 2012-2019 by Simon Ruderich +Copyright (C) 2012-2020 by Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by