]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Fix false positive when calling make
authorSimon Ruderich <simon@ruderich.org>
Sat, 28 Nov 2020 11:10:43 +0000 (12:10 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sat, 28 Nov 2020 11:10:43 +0000 (12:10 +0100)
NEWS
bin/blhc
t/logs/false-positives

diff --git a/NEWS b/NEWS
index c42fbf146f122f23ae7761d22bdee42bda1c998f..9c9f8bcb06699a9d261b5b784bd253ce09e4ff7e 100644 (file)
--- 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
index eacf541b40c0891e6c59ff4f422b0e976ad99e68..3611c6de4c3980fa743b201be179484705559590 100755 (executable)
--- 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
index 81343dcc3a92973dc21e676bd778ee426cc8a4f6..467ab6a03b1fe451dbe5e4b476789731268f7529 100644 (file)
@@ -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=/<<PKGBUILDDIR>>=. -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)