From 5d2c33804eade9a6b1463d4cb46d7cac0018274c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 21 Apr 2024 16:24:33 +0200 Subject: [PATCH 1/1] Fix false positive in C++ compiler detection --- NEWS | 2 ++ bin/blhc | 1 + t/logs/false-positives | 2 ++ 3 files changed, 5 insertions(+) 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 -- 2.45.2