On Thu, 2011-09-22 at 20:05 +0200, Jakub Jelinek wrote: > %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. You can't default to -fPIE because at cc1 time you don't know whether the object is destined for a DSO or not, -fPIE will produce relocations that aren't legal in DSOs, and ld isn't awesome enough to convert them for you. Although, one could probably argue that if it were going to be in a DSO, it'd have -fPIC already present. If we're willing to accept that, then sure. - ajax
Attachment:
signature.asc
Description: This is a digitally signed message part
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel