new gcc croaks on some flags that the xen and xen-tools ebuilds pass in. There's language in some of the subdirs to use test-gcc-flag, these patches add it to all of them
Created attachment 97194 [details] emerge --info emerge --info
Created attachment 97195 [details, diff] patch for app-emulation/xen makes xen/Rules.mk use test-gcc-flag to avoid invalid -fno-stack-protector and -fno-stack-protector-all on new gcc
Created attachment 97196 [details, diff] patch for app-emulation/xen-tools use test-gcc-flag, and changes -nopie which my compiler rejects to -fno-pie which it likes (but also filtered through test-gcc-flag)
The CFLAGs you've indicated are only included if you're using the hardened USE flag, which is intended for use only with the hardened profile. GCC 4.1 isn't compatible with Hardened Gentoo, so this bug is invalid.
Other packages, like gcc, force disable the hardened USE flag when appropriate. Should xen then also ignore the hardened USE flag when not using a hardened profile? On the other hand, what's the harm in changing the makefiles to use test-gcc-flag? Should have no effect when the option is needed, but automatically remove it for non-hardened gcc (which has doesn't recognize the options).
(In reply to comment #5) > Other packages, like gcc, force disable the hardened USE flag when appropriate. > Should xen then also ignore the hardened USE flag when not using a hardened > profile? How strange - it was my understanding that the hardened USE flag was masked on non-hardened profiles, but this doesn't seem to be the case. > On the other hand, what's the harm in changing the makefiles to use > test-gcc-flag? Should have no effect when the option is needed, but > automatically remove it for non-hardened gcc (which has doesn't recognize the > options). test-gcc-flag is broken by design and fails when used with "no*" flags, so your proposed patches break xen on hardened. It looks like this is why the hardened USE flag was originally added to the ebuild. I actually like the solution in http://overlays.gentoo.org/dev/aross/changeset/16 , so unless anyone objects I'll go with that.
Looks like a really clean fix. ++
Fixed in app-emulation/xen-tools-3.0.2-r4, thanks.