I tried to globally enable CFLAGS="-D_FORTIFY_SOURCE=2" in make.conf. Filtering that flag in the ebuild works (see patch). Reproducible: Always Steps to Reproduce: 1. add CFLAGS="-D_FORTIFY_SOURCE=2 in make.conf 2. try to compile util-linux
Created attachment 398036 [details, diff] patch for util-linux-2.26.ebuild
Emerge --info and buildlog We enable -D_FORTIFY_SOURCE=2 in the gcc with a patch so no need to add it to CFLAGS.
(In reply to Magnus Granberg from comment #2) > Emerge --info and buildlog > We enable -D_FORTIFY_SOURCE=2 in the gcc with a patch > so no need to add it to CFLAGS. I'd also like to see the build.log so we can pingpoint the failure. I'm not htting this with hardened gcc 4.8 amd64. There are a few other suspicious changes with 2.26 so I don't doubt something is going on here, but its not as simple as just masking out "-D_FORTIFY_SOURCE=2".
ignoring the fact that -D flags go into CPPFLAGS, not CFLAGS, please attach an actual build log. you must do this for every report.
Created attachment 398178 [details] build log
Created attachment 398180 [details] emerge --info
Additional info: * util-linux-2.25-r2 compiles just fine (with gcc 4.9.2) * on my musl-box util-linux-2.25-r99::hardened-dev also works (with gcc 4.8.4) * LTO is not the cause for that error I admit my make.conf is pretty experimental - I'm looking into how far i can go with hardening and optimizing (got some free time ATM ;-) ). If you want to close the bug INVALID please don't hesitate to do so.
the problem starts earlier: configure: WARNING: scanf string alloc modifier not found; not building libmount can you attach your config.log please