X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=dc71cc1c940d1130660dd9574ba27aa7c72e6bb1;hb=6bd8ae07ae91c53c36d219975bc3296b7af81045;hp=783ae73f27b66eb68df2fbc3c8e9c1635ebbfd2d;hpb=f840b1b9362096ce7a0b8813a37555d934d21887;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index 783ae73..dc71cc1 100755 --- a/bin/blhc +++ b/bin/blhc @@ -852,14 +852,18 @@ foreach my $file (@ARGV) { next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)? [Cc]ompiler[\s.]*:?\s+ /x; - next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o; + next if $line =~ m{^\s*(?:-\s)?(?:HOST_)?(?:CC|CXX) + \s*=\s*$cc_regex_full + # optional compiler options, don't allow + # "everything" here to prevent false negatives + \s*(?:\s-\S+)*\s*$}xo; # `moc-qt4`/`moc-qt5` contain '-I.../linux-g++' in their command # line (or similar for other architectures) which gets recognized # as a compiler line, but `moc-qt*` is only a preprocessor for Qt # C++ files. No hardening flags are relevant during this step, # thus ignore `moc-qt*` lines. The resulting files will be # compiled in a separate step (and therefore checked). - next if $line =~ m{^\S+/bin/moc-qt[45] + next if $line =~ m{^\S+/bin/moc(?:-qt[45])? \s.+\s -I\S+/mkspecs/[a-z]+-g\++(?:-64)? \s}x;