summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-11-10 04:55:02 +0100
committerGuillem Jover <guillem@debian.org>2016-11-11 02:34:16 +0100
commit8ce8524a7268525b27e04cab550e92edd9ea18a5 (patch)
treecaa7690c97d0c6f16a9155b0bb109e253064f719
parentc0f98e5994506ebd676918832aca97a81cf2bd45 (diff)
downloaddpkg-8ce8524a7268525b27e04cab550e92edd9ea18a5.tar.gz
data: Improve PIE handling
- Rename the spec name cc1_options to self_spec. - Do not set PIE options if they have been negated, and do not reset them if they have been requested. Closes: #843791, #843826
-rw-r--r--data/no-pie-compile.specs2
-rw-r--r--data/no-pie-link.specs2
-rw-r--r--data/pie-compile.specs4
-rw-r--r--data/pie-link.specs2
-rw-r--r--debian/changelog6
5 files changed, 11 insertions, 5 deletions
diff --git a/data/no-pie-compile.specs b/data/no-pie-compile.specs
index f85b39438..2277b97ef 100644
--- a/data/no-pie-compile.specs
+++ b/data/no-pie-compile.specs
@@ -1,2 +1,2 @@
-*cc1_options:
+*self_spec:
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fno-PIE}}}}}}
diff --git a/data/no-pie-link.specs b/data/no-pie-link.specs
index 15243a0f3..54db649b1 100644
--- a/data/no-pie-link.specs
+++ b/data/no-pie-link.specs
@@ -1,2 +1,2 @@
*self_spec:
-+ %{!shared:%{!r:-fno-PIE -no-pie}}
++ %{!shared:%{!r:%{!fPIE:%{!pie:-fno-PIE -no-pie}}}}
diff --git a/data/pie-compile.specs b/data/pie-compile.specs
index fc54bcb51..74d82155c 100644
--- a/data/pie-compile.specs
+++ b/data/pie-compile.specs
@@ -1,2 +1,2 @@
-*cc1_options:
-+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
+*self_spec:
++ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:%{!fno-PIE:%{!no-pie:-fPIE}}}}}}}}
diff --git a/data/pie-link.specs b/data/pie-link.specs
index a5e0fe4c2..35d26e1f8 100644
--- a/data/pie-link.specs
+++ b/data/pie-link.specs
@@ -1,2 +1,2 @@
*self_spec:
-+ %{!shared:%{!r:-fPIE -pie}}
++ %{!shared:%{!r:%{!fno-PIE:%{!no-pie:-fPIE -pie}}}}
diff --git a/debian/changelog b/debian/changelog
index 1143be45c..ff4096625 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,12 @@
dpkg (1.18.14) UNRELEASED; urgency=medium
[ Guillem Jover ]
+ * Improve PIE flags support:
+ - Rename the spec name cc1_options to self_spec.
+ Suggested by James Clarke <jrtc27@jrtc27.com>
+ - Do not set PIE options if they have been negated, and do not reset
+ them if they have been requested.
+ Closes: #843791, #843826
* Test suite:
- Do not fail tests on missing fakeroot, just skip them.
* Build system: