On 7/24/18 6:10 AM, Xi Ruoyao wrote:
I agree with Marc that the problem is likely to be in MPC/GMP/MPFR.
Use contrib/download_prerequistes to get the source code of them,
and try to compile GCC with --enable-bootstrap.
Found it!
Your suspicions were correct: it was in MPC.
I wasn't able to get debug symbols working (apparently they're hard on
macOS), but I found this program to dump instruction set extension names
- https://github.com/pkgw/elfx86exts - and ran it on gfortran and those
libraries, and that BMI2 MULX instruction showed up in libgmp.
$ elfx86exts libgmp.dylib
MODE64 (push)
SSE1 (xorps)
SSE2 (ucomisd)
CMOV (cmove)
BMI2 (mulx)
Rebuilding GMP for Core2 fixed the issue. This wasn't a gfortran/GCC
build problem after all.
Thank you for your help! This discussion was very useful.
Cheers,
Andrew