Using gcc-4.6.3 (USE=amd64 cxx elibc_glibc fortran hardened kernel_linux mudflap multilib nls nptl openmp userland_GNU), the net-misc/networkmanager-0.9.8.8 is miscompiled when using CFLAGS="-O2 -pipe -march=native -mavx -maes -ggdb". Adding -fno-partial-inlining to the CFLAGS fixes this issue, and using net-misc/networkmanager-0.9.6.4 with the original CFLAGS works fine as well. Upgrading to GCC 4.7.3 and using the unmodified -O2 works, too. All details which I have are available at https://bugzilla.gnome.org/show_bug.cgi?id=721465 .
Looks like it fixed in newer gcc?
(In reply to Magnus Granberg from comment #1) > Looks like it fixed in newer gcc? Yes, that's what I reported here three months ago.
We could add a check to the networkmanager ebuild to automatically add -fno-partial-inlining to CFLAGS if a problematic compiler is detected. The question is, how to check for a problematic compiler? Is there something we can do with gcc-specs-directive() to determine whether this is gcc on a hardened profile?
Way need to check for hardened compiler when it is GCC that have a bug and it is fixed in newer version?
(In reply to Magnus Granberg from comment #4) > Way need to check for hardened compiler when it is GCC that have a bug and > it is fixed in newer version? Is this bug still relevant? Sould we just block against an older version of gcc and move on?
Fixed in newer gcc >=4.7.3