From ca385d9198e98ad60a107a01594abd142bb62591 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Aug 08 2011 14:59:25 +0000 Subject: 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 --- 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)