]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Fix --ignore-flag with -fPIE.
authorSimon Ruderich <simon@ruderich.org>
Mon, 30 Apr 2012 12:45:40 +0000 (14:45 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 30 Apr 2012 12:45:40 +0000 (14:45 +0200)
MANIFEST
bin/blhc
t/logs/ignore-flag-ldflags [new file with mode: 0644]
t/tests.t

index 15d498dc190c64c075bb2c46163fc83bccae31fc..032a88068c8d3423d18919bdc994ecd111f3bb75 100644 (file)
--- 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/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
 t/logs/ignore-line
 t/logs/libtool
 t/logs/make
index e8849260607f8598aafea529a8731136f0ecf451..a51c860158608a12116c60a5d5113d182014dbb0 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -202,11 +202,11 @@ my @flag_refs = (
     \@def_ldflags,
     \@def_ldflags_relro,
     \@def_ldflags_bindnow,
     \@def_ldflags,
     \@def_ldflags_relro,
     \@def_ldflags_bindnow,
+    \@def_ldflags_pie,
 );
 # References to all used flags.
 my @flag_refs_all = (
     @flag_refs,
 );
 # 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
     \@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 (file)
index 0000000..24541b2
--- /dev/null
@@ -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
index eff3d2bea0d703ec13005c2f7e43165cf479adca..3ef7cd1d8a85b86021afee7320faf634252afcfd 100644 (file)
--- a/t/tests.t
+++ b/t/tests.t
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
-use Test::More tests => 138;
+use Test::More tests => 140;
 
 
 sub is_blhc {
 
 
 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', '--ignore-flag -g --ignore-flag -O2', 0,
         '';
 
+is_blhc 'ignore-flag-ldflags', '--ignore-flag -fPIE', 0,
+        '';
 
 # Ignore certain lines.
 
 
 # Ignore certain lines.