]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: make sure CPUTYPE is ignored when building
authorWarner Losh <imp@FreeBSD.org>
Thu, 15 Jul 2021 03:06:08 +0000 (21:06 -0600)
committerWarner Losh <imp@FreeBSD.org>
Wed, 21 Jul 2021 16:16:32 +0000 (10:16 -0600)
commitee6908d78275449011f8fb1b6d73bde75c02f705
treee6c79fa8dfccb501adc5807d48ab8fb50b7e1697
parent18b511454f779305f828b71ad5df69d1c1a3b3ba
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)
stand/defs.mk