On Thu, Sep 22, 2011 at 02:18:10PM -0400, Adam Jackson 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. Such packages would be broken and would fail to link without hardening or at least have text relocations too. Packagers shouldn't rely on this spec hack to fix up their packaging bugs (or upstream bugs), the hack should be just about changing position dependent binaries in the executable into position independent binaries. Jakub -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel