Comment 20 for bug 1838448

Revision history for this message
Steven Falco (stevenfalco) wrote :

I'm not too familiar with this, but I do know that Fedora has recently been applying so-called "hardening" flags, in order to catch more run-time errors. The current flags are:

-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection

I could try adding:

%undefine _hardened_build

which should disable the hardening flags. Or I could experiment with overriding the %{optflags} macro, which should let me choose specific flags to include or omit. But I'd need some guidance on which flags we want.

But before I do that, I have to ask if we really want to override the hardening. I would have thought that the hardening was a desirable thing.

Please let me know how you'd like me to proceed.