HomeFreeBSD

loader: make sure CPUTYPE is ignored when building

Description

loader: make sure CPUTYPE is ignored when building

CPUTYPE?=native causes -march=native to be added to the command
line. When the host machine is haswell, this causes some versions of
clang to generate code that can't execute in the efi boot loader
environment. Set _CPUCFLAGS= to undo what's done bsd.cpu.mk. bsd.cpu.mk
is included too early to control with NO_CPU_CFLAGS here. The only other
option is to put that in all the Makefiles, and this is less tedious and
error prone.

PR: 194641
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31187
MFC After: 1 week

(cherry picked from commit 7a0c0ff7ee25ff1efa3dbedcb20d2c80178639cc)

Details

Provenance
impAuthored on Jul 15 2021, 3:06 AM
Differential Revision
D31187: loader: make sure CPUTYPE is ignored when building
Parents
rG48d6f8f13a30: Remove incorrect __restricted labels from strcspn
Branches
Unknown
Tags
Unknown