[Guidelines Change] Changes to the Packaging Guidelines
Jakub Jelinek
jakub at redhat.com
Thu Sep 22 18:05:10 UTC 2011
On Thu, Sep 22, 2011 at 01:59:33PM -0400, Tom Callaway wrote:
> On 09/22/2011 01:36 PM, Jakub Jelinek wrote:
> > That should be ... "adds -fPIE (if -fPIC is not already present)" ...
> > I'd say. At least I hope that's what the spec change does, the initial
> > version did that.
>
> No, I'm fairly sure that it only adds -fPIC in scenarios where -fPIE is
> not already passed. Adam can probably comment further on why.
Ah, I see:
%rename cc1_options rh_cc1_options_old
*cc1_options:
%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIC}}}}} %(rh_cc1_options_old)
That looks just wrong. -fpie/-fPIE is in general faster than -fpic/-fPIC,
because it can assume (non-weak) symbols defined in the object can't be
overridden. Without hardening, objects compiled without
-fpie/-fPIE/-fpic/-fPIC assume that too (and additionally are position
dependent), so I fail to see why you'd want to default to -fPIC. You
certainly want to default to -fPIE.
Jakub
More information about the devel
mailing list