From: Simon Ruderich Date: Mon, 30 Apr 2012 12:45:40 +0000 (+0200) Subject: Fix --ignore-flag with -fPIE. X-Git-Tag: 0.03~15 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=af102498dd22f108a466fe3830648d7705384f28;p=blhc%2Fblhc.git Fix --ignore-flag with -fPIE. --- diff --git a/MANIFEST b/MANIFEST index 15d498d..032a880 100644 --- a/MANIFEST +++ b/MANIFEST @@ -40,6 +40,7 @@ t/logs/good-library t/logs/good-multiline t/logs/good-pie t/logs/ignore-flag +t/logs/ignore-flag-ldflags t/logs/ignore-line t/logs/libtool t/logs/make diff --git a/bin/blhc b/bin/blhc index e884926..a51c860 100755 --- a/bin/blhc +++ b/bin/blhc @@ -202,11 +202,11 @@ my @flag_refs = ( \@def_ldflags, \@def_ldflags_relro, \@def_ldflags_bindnow, + \@def_ldflags_pie, ); # References to all used flags. my @flag_refs_all = ( @flag_refs, - \@def_ldflags_pie, \@def_ldflags_pic, ); # Renaming rules for the output so the regex parts are not visible. Also diff --git a/t/logs/ignore-flag-ldflags b/t/logs/ignore-flag-ldflags new file mode 100644 index 0000000..24541b2 --- /dev/null +++ b/t/logs/ignore-flag-ldflags @@ -0,0 +1,3 @@ +dpkg-buildpackage: source package test + +gcc -pie -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest diff --git a/t/tests.t b/t/tests.t index eff3d2b..3ef7cd1 100644 --- a/t/tests.t +++ b/t/tests.t @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 138; +use Test::More tests => 140; sub is_blhc { @@ -97,6 +97,8 @@ is_blhc 'ignore-flag', '--ignore-flag -g', 8, is_blhc 'ignore-flag', '--ignore-flag -g --ignore-flag -O2', 0, ''; +is_blhc 'ignore-flag-ldflags', '--ignore-flag -fPIE', 0, + ''; # Ignore certain lines.