From: Simon Ruderich Date: Sat, 28 Nov 2020 11:10:43 +0000 (+0100) Subject: Fix false positive when calling make X-Git-Tag: 0.13~6 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=79d3a9eaaffbb1c593adf715fa5055a4a91ed0af;p=blhc%2Fblhc.git Fix false positive when calling make --- diff --git a/NEWS b/NEWS index c42fbf1..9c9f8bc 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ Version 0.XX - Also split commands on && and || (not only on ;) to detect more false negatives. This could also trigger more false positives. +- Fix false positive when calling make; reported by Fabian Wolff (Debian Bug + #975650). Version 0.12 diff --git a/bin/blhc b/bin/blhc index eacf541..3611c6d 100755 --- a/bin/blhc +++ b/bin/blhc @@ -1047,6 +1047,9 @@ foreach my $file (@ARGV) { \s*(?:\s-\S+)*\s*$}xo; # `echo` is never a compiler command next if $line =~ /^\s*echo\s/; + # Ignore calls to `make` because they can contain environment + # variables which look like compiler commands, e.g. CC=). + next if $line =~ /^\s*make\s/; # `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 diff --git a/t/logs/false-positives b/t/logs/false-positives index 81343dc..467ab6a 100644 --- a/t/logs/false-positives +++ b/t/logs/false-positives @@ -70,3 +70,5 @@ Compiler executable checksum: 26648cf2c5cb5e5907eedabc7a0be2ce C++ linker for the host machine: c++ ld.bfd 2.34 mv -f /build/nvidia-cuda-toolkit-10.1.243/debian/tmp/usr/lib/x86_64-linux-gnu/`gcc -g -O2 -fdebug-prefix-map=/build/nvidia-cuda-toolkit-10.1.243=. -fstack-protector-strong -Wformat -Werror=format-security -print-multi-os-directory`/./libiberty.an /build/nvidia-cuda-toolkit-10.1.243/debian/tmp/usr/lib/x86_64-linux-gnu/`gcc -g -O2 -fdebug-prefix-map=/build/nvidia-cuda-toolkit-10.1.243=. -fstack-protector-strong -Wformat -Werror=format-security -print-multi-os-directory`/./libiberty.a + +(cd ../c-libs/posix-os; make VERSION="v-amd64-linux" MAKE="make" CC="gcc -std=gnu99 -Wall" CFLAGS="-O2 -m64 -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro" DEFS="-DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_LINUX -D_GNU_SOURCE -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC" CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" LDFLAGS="-Wl,-z,relro" AR="ar" ARFLAGS="rcv" RANLIB="ranlib" INCLUDES="-I../../objs -I../../include -I.." libposix-os.a)