From: Simon Ruderich Date: Thu, 29 Mar 2012 15:42:15 +0000 (+0200) Subject: Detect more C++ non-verbose builds. X-Git-Tag: 0.01~41 X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=commitdiff_plain;h=e8d66101e7bf4ba755df5c5f893402f98131fedf Detect more C++ non-verbose builds. --- diff --git a/bin/blhc b/bin/blhc index 8703745..9800eaf 100755 --- a/bin/blhc +++ b/bin/blhc @@ -312,13 +312,16 @@ sub is_non_verbose_build { my ($line, $next_line, $skip_ref) = @_; if (not ($line =~ /^checking if you want to see long compiling messages\.\.\. no/ - or $line =~ /^\s*\[?(?:CC|CCLD|CXX|CXXLD|LD|LINK)\]?\s+(.+?)$/ + or $line =~ /^\s*\[?(?:CC|CCLD|C\+\+|CXX|CXXLD|LD|LINK)\]?\s+(.+?)$/ or $line =~ /^\s*(?:C|c)ompiling\s+(.+?)(?:\.\.\.)?$/ or $line =~ /^\s*(?:B|b)uilding (?:program|shared library)\s+(.+?)$/ or $line =~ /^\s*\[[\d ]+%\] Building (?:C|CXX) object (.+?)$/)) { return 0; } + # False positives. + return 0 if $line =~ /^\s*C\+\+.+?:\s+(?:yes|no)\s*$/; + my $file = $1; # On the first pass we only check if this line is verbose or not. @@ -586,6 +589,9 @@ FILE: foreach my $file (@ARGV) { # `./configure` output. next if not $non_verbose and $line =~ /^(?:checking|(?:C|c)onfigure:) /; + next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)? + (?:C|c)ompiler[\s.]*:?\s+ + /xo; next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o; # Check if additional hardening options were used. Used to diff --git a/t/logs/configure b/t/logs/configure index b390ba8..91cb354 100644 --- a/t/logs/configure +++ b/t/logs/configure @@ -77,11 +77,15 @@ Configuration: Looking for compiler... gcc is executable. Looking for compiler... cc is executable. +Compiler version: gcc (Debian 4.6.3-1) 4.6.3 + configure: using CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC configure: using LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,--as-needed configure: Compiling with gcc -fstack-protector-all et al. + C++ library: yes + echo Using CC="gcc" Using CC=gcc echo Using CXX="gcc" diff --git a/t/logs/verbose-build b/t/logs/verbose-build index 835e7c5..aca060b 100644 --- a/t/logs/verbose-build +++ b/t/logs/verbose-build @@ -48,6 +48,9 @@ checking whether compiling and linking against OpenSSL works... yes CC modules/server/test.c + C++ test/test.o +C++ test.cpp + Byte-compiling python modules... Byte-compiling python modules (optimized versions) ... Byte-compiling python modules... diff --git a/t/tests.t b/t/tests.t index 69da465..0d9281a 100644 --- a/t/tests.t +++ b/t/tests.t @@ -377,6 +377,8 @@ NONVERBOSE BUILD: [CC] src/test-b.o NONVERBOSE BUILD: [CC] src/test_c.o NONVERBOSE BUILD: [LD] src/test.o NONVERBOSE BUILD: CC modules/server/test.c +NONVERBOSE BUILD: C++ test/test.o +NONVERBOSE BUILD: C++ test.cpp NONVERBOSE BUILD: Compiling test/test.cc to ../build/test/test.o NONVERBOSE BUILD: Building shared library ../build/test/libtest.so.1.2.3 NONVERBOSE BUILD: Compiling test.cc to ../build/test/test.o