[redhat-rpm-config] redhat-hardened-{cc1, ld}: Move some of the rewrite magic to gcc specs so we don't end up with both -

Adam Jackson ajax at fedoraproject.org
Mon Aug 8 14:59:37 UTC 2011


commit ca385d9198e98ad60a107a01594abd142bb62591
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Aug 8 10:59:25 2011 -0400

    redhat-hardened-{cc1,ld}: Move some of the rewrite magic to gcc specs so
    we don't end up with both -fPIC and -fPIE on the command line

 redhat-hardened-cc1 |    4 ++++
 redhat-hardened-ld  |    9 +++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/redhat-hardened-cc1 b/redhat-hardened-cc1
new file mode 100644
index 0000000..04b8f3c
--- /dev/null
+++ b/redhat-hardened-cc1
@@ -0,0 +1,4 @@
+%rename cc1_options rh_cc1_options_old
+
+*cc1_options:
+%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIC}}}}} %(rh_cc1_options_old)
diff --git a/redhat-hardened-ld b/redhat-hardened-ld
new file mode 100644
index 0000000..b26049c
--- /dev/null
+++ b/redhat-hardened-ld
@@ -0,0 +1,9 @@
+%rename self_spec rh_self_spec_old
+
+*self_spec:
+%{!shared:-pie} %(rh_self_spec_old)
+
+%rename link rh_link_old
+
+*link:
+-z now %(rh_link_old)


More information about the scm-commits mailing list