[PATCH] New option --enable-pie-programs

Siddhesh Poyarekar siddhesh@gotplt.org
Thu Nov 18 18:09:22 GMT 2021


On 11/18/21 23:28, H.J. Lu wrote:
>> How do you see --disable-default-pie behaving with a compiler that
>> produces PIE by default?  That is, in case where
>> libc_cv_cc_default_pie=yes?  Should it add -fno-pie or leave it as is?
>>
> 
> It should add -fno-pie by default when building programs.
> 

In that case I'm inclined towards --enable-default-pie=yes being the new 
default since AFAIK at least Ubuntu will have to start adding 
--enable-default-pie to its flags to maintain its current state with its 
default-pie toolchain.  With Fedora too I think we'd prefer to build PIE 
by default and I suspect other distros would be OK with that too.

Those that don't could add --disable-default-pie to continue maintaining 
status quo.  This is a step forward security-wise IMO.

Siddhesh


More information about the Libc-alpha mailing list