I am trying to upgrade my GCC from 4.8.4 which was declared obsolete to 4.9.4 as I started to have compile errors in C++ packages. However, I am unable to use my current compiler to perform the needed update. Reproducible: Always Steps to Reproduce: 1. emerge gcc:4.9.4 2. 3. Actual Results: * ERROR: sys-devel/gcc-4.9.4::gentoo failed (compile phase): * emake failed Expected Results: GCC 4.9.4 installed on its slot
Created attachment 492144 [details] emerge --info
Created attachment 492146 [details] build.log
Created attachment 492148 [details] gcc-build-logs.tar.bz2 /var/tmp/portage/sys-devel/gcc-4.9.4/work/gcc-build-logs.tar.bz2 as requested in the detailed error message
* CFLAGS="-march=athlon64-sse3 -O2 -pipe -fno-strict-overflow -fstack-check -Wformat -Werror=format-security" Turning warnings into errors (-Werror*) does not make your system more secure.
Created attachment 497284 [details, diff] gcc-4.9.4-format-security.patch Meanwhile, I made a patch to fix those format security problems. Here it is.
CFLAGS="-march=athlon64-sse3 -O2 -pipe -fno-strict-overflow -fstack-check -ffunction-sections -fdata-sections -Wformat -Werror=format-security -static-libgcc" -Werror=format-security is not a security flag - it's a development aid. Just remove it.