sorry if this goes into the wrong forum, I was unsure which one to choose, but this seemed the best choice to me.
Problem and workaround in short: current GCC in Gentoo seems to have a problem with CFLAGS "-march=native -O2 -pipe" on Intel Haswell CPU. Workaround: use "-march=core-avx-i -O2 -pipe"
Now, the long version:
Yesterday I got my new Intel i5-4670 CPU (after 5 years i finally decided to upgrade my home desktop a bit). After assembling the new hardware I tried a brand new stage3 install of gentoo and ran into a weird problem:
While installing Grub2, I got compile phase errors within the package dev-scheme/guile.
The error messages causing the failure are
Code: Select all
{standard input}:7885: Error: no such instruction: `vfmadd312sd .LC2(%rip),%xmm0,%xmm1'
{standard input}:7936: Error: no such instruction: `vfmadd312sd .LC2(%rip),%xmm4,%xmm1'
{standard input}:7957: Error: no such instruction: `vfmadd312sd .LC2(%rip),%xmm0,%xmm4'
First I blamed guile, but after I found out that I get similar errors while compiling some (not all!) other packages, like gcc, I tried different things until I tried setting the march-flag manually. After that, everything worked fine. If I set march back to native, the error returns.
So, since I use the same configs on different systems (Sandy & Ivy Bridge), I really believe GCC is selecting or handling something wrong with Intels newest CPU models (at least with my one).
Here is the output of
Code: Select all
diff -uNr <(echo|gcc -dM -E - -march=core-avx-i) <(echo|gcc -dM -E - -march=native)Code: Select all
+#define __ABM__ 1
-#define __F16C__ 1
+#define __FP_FAST_FMAF 1
-#define __tune_corei7__ 1
+#define __FMA__ 1
-#define __RDRND__ 1
+#define __FP_FAST_FMA 1
-#define __FSGSBASE__ 1
+#define __BMI__ 1




