From: Simon Ruderich Date: Sat, 17 Mar 2012 21:21:04 +0000 (+0100) Subject: Handle another configure false positive. X-Git-Tag: 0.01~98 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=30a4fb78518a579a6725725a4647740aa8241987;p=blhc%2Fblhc.git Handle another configure false positive. --- diff --git a/bin/blhc b/bin/blhc index d8c621b..d089931 100755 --- a/bin/blhc +++ b/bin/blhc @@ -325,6 +325,10 @@ while (my $line = <>) { # # `./configure` output. next if not $non_verbose and $line =~ /^checking /; + next if $line =~ /^\s*(?:C|c)ompiler[\s.]*:\s+$cc_regex(?:\s-std=[a-z0-9:+]+)?\s*$/ + or $line =~ /^\s*- (?:CC|CXX)\s*=\s*$cc_regex\s*$/ + or $line =~ /^\s*-- Check for working (?:C|CXX) compiler: / + or $line =~ /^\s*(?:echo )?Using [A-Z_]+\s*=\s*/; push @input, $line; } @@ -399,12 +403,6 @@ for (my $i = 0; $i < scalar @input; $i++) { # Even if it's a verbose build, we might have to skip this line. next if $skip; - # Ignore false positives. - # - # ./configure summary. - next if $line =~ /^\s*(?:C|c)ompiler[\s.]*:\s+$cc_regex(?:\s-std=[a-z0-9:+]+)?\s*$/ - or $line =~ /^\s*- (?:CC|CXX)\s*=\s*$cc_regex\s*$/ - or $line =~ /^\s*-- Check for working (?:C|CXX) compiler: /; # Is this a compiler or linker command? my $compiler = 1; diff --git a/t/logs/configure b/t/logs/configure index 46e0bf7..039535b 100644 --- a/t/logs/configure +++ b/t/logs/configure @@ -48,3 +48,12 @@ Configuration: 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 + +echo Using CC="gcc" +Using CC=gcc +echo Using CXX="gcc" +Using CXX=gcc +echo Using ALL_CFLAGS="-D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security" +Using ALL_CFLAGS=-D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security +echo Using LDFLAGS="-Wl,-z,relro -Wl,--as-needed -fPIE -pie -Wall" +Using LDFLAGS=-Wl,-z,relro -Wl,--as-needed -fPIE -pie -Wall diff --git a/t/tests.t b/t/tests.t index 387ac2e..fa1eab8 100644 --- a/t/tests.t +++ b/t/tests.t @@ -329,8 +329,9 @@ CFLAGS missing (-Werror=format-security): cd /tmp/test/src && /usr/bin/gcc -g -O # configure -is_blhc 'configure', '', 0, - ''; +is_blhc 'configure', '', 1, + 'No compiler commands! +'; # cc