Browse Source

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
Guillem Jover 7 years ago
parent
commit
8ce8524a72
5 changed files with 11 additions and 5 deletions
  1. 1 1
      data/no-pie-compile.specs
  2. 1 1
      data/no-pie-link.specs
  3. 2 2
      data/pie-compile.specs
  4. 1 1
      data/pie-link.specs
  5. 6 0
      debian/changelog

+ 1 - 1
data/no-pie-compile.specs

@@ -1,2 +1,2 @@
-*cc1_options:
+*self_spec:
 + %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fno-PIE}}}}}}

+ 1 - 1
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}}}}

+ 2 - 2
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}}}}}}}}

+ 1 - 1
data/pie-link.specs

@@ -1,2 +1,2 @@
 *self_spec:
-+ %{!shared:%{!r:-fPIE -pie}}
++ %{!shared:%{!r:%{!fno-PIE:%{!no-pie:-fPIE -pie}}}}

+ 6 - 0
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: