From: Simon Ruderich Date: Sun, 21 Apr 2024 14:24:33 +0000 (+0200) Subject: Fix false positive in C++ compiler detection X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;ds=inline;h=HEAD;hp=30b6e0b8ed3c75feb6901426375fed5817ba2a3b;p=blhc%2Fblhc.git Fix false positive in C++ compiler detection --- diff --git a/NEWS b/NEWS index 2fbf8bd..69f73f7 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ Version 0.xx - Ignore another cargo/rust false positive; reported by Yogeswaran Umasankar (see Debian Bug #1037521). - Permit "no compiler commands" for cargo/rust projects. +- Fix false positive in C++ compiler detection; reported by Rafael Laboissière + (Debian Bug #1069576). Version 0.14 ------------ diff --git a/bin/blhc b/bin/blhc index 99d80bf..f90fd7a 100755 --- a/bin/blhc +++ b/bin/blhc @@ -566,6 +566,7 @@ sub is_non_verbose_build { # C++ compiler setting. return 0 if $line =~ /^\s*C\+\+.+?:\s+(?:yes|no)\s*$/; return 0 if $line =~ /^\s*C\+\+ Library: stdc\+\+$/; + return 0 if $line =~ /^\s*CXX\s*:\s*g\+\+\s*$/; # "Compiling" non binary files. 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/; diff --git a/t/logs/false-positives b/t/logs/false-positives index 8141dc7..d612886 100644 --- a/t/logs/false-positives +++ b/t/logs/false-positives @@ -16,6 +16,8 @@ rm -f afl-gcc afl-as afl-fuzz afl-showmap as afl-g++ afl-clang afl-clang++ *.o * 19:49:25 runner ../source3/script/build_env.sh /build/samba-4.4.4+dfsg/source3 /build/samba-4.4.4+dfsg/source3 /usr/bin/gcc > default/source3/include/build_env.h + CXX : g++ + # gcc -v can cause false positives. cd GUI && qmake /usr/bin/make -C GUI