Compileing world on Intel Haswell with CPUTYPE?=native set in either /etc/make.conf and/or /etc/src.conf renders /boot/loader.efi to fail: the EFI boot process stops and freezes when loader.efi is loaded.
The problem affects only Haswell-based hardware (from my point of view, it seems to be AVX2), since Sandy_bridge and Ivy-Bridge based systems do not show the problem, even if world/kernel is compiled with -O3 and -march=native as I have tested on several CURRENT systems with most recent CURRENT as of today (FreeBSD 11.0-CURRENT #2 r273743: Mon Oct 27 19:51:01 CET 2014 amd64).
The problem has been discussed recently on the CURRENT mailing list, but no PR has been issued so far.
Please look at
Note, adding -mno-avx2 reported not to help:
It appears the flags are not passed into libefi.
Does CPUTYPE=haswell also cause this issue?
And more importantly, this was from 3 years ago... Can someone confirm the problem still exists...
I think that https://svnweb.freebsd.org/changeset/base/326038 fixed this. Can someone who is in a position to test please confirm?
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017
- Set Status to "Open"
I just tried this again in my WIP branch and loader.efi still hangs with CPUTYPE?=native in src.conf.
comparing builds with and without the src.conf setting shows -march=native in the cc commandline
I know how to paper over this bug :)
Any update @imp?
I'm starting to think there's a miscompilation or other build problem in general, too. I've been seeing memory corruption when using the new HTTP boot feature that appears to be in our binary.