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
This commit is contained in:
Adam Jackson 2011-08-08 10:59:25 -04:00
parent da8d7a1e6a
commit ca385d9198
2 changed files with 13 additions and 0 deletions

4
redhat-hardened-cc1 Normal file
View File

@ -0,0 +1,4 @@
%rename cc1_options rh_cc1_options_old
*cc1_options:
%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIC}}}}} %(rh_cc1_options_old)

9
redhat-hardened-ld Normal file
View File

@ -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)