From 5b6b8e2eddbb9e6590e59a84d160e5d23bc09a9a Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 14 Mar 2012 00:02:48 +0100 Subject: [PATCH] Ignore false positive in ./configure summary. --- MANIFEST | 1 + bin/blhc | 5 +++++ t/logs/configure | 3 +++ t/tests.t | 8 +++++++- 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 t/logs/configure diff --git a/MANIFEST b/MANIFEST index 51ed4bc..0c53335 100644 --- a/MANIFEST +++ b/MANIFEST @@ -12,6 +12,7 @@ t/logs/bad-library t/logs/bad-multiline t/logs/c++ t/logs/cc +t/logs/configure t/logs/debian t/logs/empty t/logs/g++ diff --git a/bin/blhc b/bin/blhc index 383fcc1..1cb49a6 100755 --- a/bin/blhc +++ b/bin/blhc @@ -265,6 +265,11 @@ if ($bindnow) { } foreach my $line (@input) { + # Ignore false positives. + # + # ./configure summary. + next if $line =~ /^Compiler:\s+(cc|gcc|g\+\+|c\+\+)$/; + # Is this a compiler or linker command? my $compiler = 1; my $linker = 0; diff --git a/t/logs/configure b/t/logs/configure new file mode 100644 index 0000000..8e20f8f --- /dev/null +++ b/t/logs/configure @@ -0,0 +1,3 @@ +# Output by configure or similar tools which should be ignored. + +Compiler: gcc diff --git a/t/tests.t b/t/tests.t index f122c25..6013606 100644 --- a/t/tests.t +++ b/t/tests.t @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 66; +use Test::More tests => 68; sub is_blhc { @@ -280,6 +280,12 @@ LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs "; +# configure + +is_blhc 'configure', '', 0, + ''; + + # cc is_blhc 'cc', '--pie --bindnow', 4, -- 2.45.2