[Bug driver/117992] gcc -flto -fharden leads to warning
xry111 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 11 15:23:54 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117992
--- Comment #9 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Icenowy Zheng from comment #7)
> Does -flto imply -pie ? I cannot understand the discussion here now...
No, but if your GCC is configured --with-default-pie (it's enabled by almost
all Linux distros), during LTO gcc will be invoked with an explicit -pie in the
command line.
Without -flto, there's no explicit -fpie flag and the bug is not triggered by
the default PIE configuration alone. So it appears triggered by -flto.
More information about the Gcc-bugs
mailing list