From af102498dd22f108a466fe3830648d7705384f28 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 30 Apr 2012 14:45:40 +0200 Subject: [PATCH] Fix --ignore-flag with -fPIE. --- MANIFEST | 1 + bin/blhc | 2 +- t/logs/ignore-flag-ldflags | 3 +++ t/tests.t | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 t/logs/ignore-flag-ldflags 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. -- 2.43.2