Many Linux distros configure GCC with --enable-default-pie (at least Arch/Debian/Fedora/Gentoo/Ubuntu). I think it makes sense to default to --enable-default-pie for Linux.
No. The whole reason why there is an option is because it is optional.
I want to switch the default because: * It seems to me that every Linux distro uses --enable-default-pie GCC. I use "many", but it is likely "most" at this point (2021). * When a user builds GCC on Linux, the generated GCC does not default PIE. This almost certainly does not match the behavior of their host GCC. On the libc-alpha mailing list, I have seen that contributors waste time because they don't notice that scripts/build-many-glibcs.py built GCC uses the implicit --disable-default-pie, which has a behavior different from the host GCC or cross compiler provided by system packages.
(In reply to Andrew Pinski from comment #1) > No. The whole reason why there is an option is because it is optional. A fair amount of future-new-defaults start off as optional and eventually become it. This isn't a particularly strong reason to reject it. The alternative would be that there was.. never a configure option? And one day it just flipped without any chance of changing it? I think this would probably benefit from more discussion. As meowray noted, this has been set by every major Linux distro for quite some time. It would make sense to re-evaluate GCC's defaults in that context and whether the reasons for them still make sense.
(In reply to Andrew Pinski from comment #1) > No. The whole reason why there is an option is because it is optional. Could this issue be re-considered? Or should -fhardened and related endeavors all re-suggest the specific flags that --enable-default-pie provides?