aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2020-04-24 10:03:11 +0000
committerKyle Evans <kevans@FreeBSD.org>2021-10-08 01:15:59 +0000
commitc6bbaf794d11bc2d80b00eda20a0ce761ac9d656 (patch)
tree64811bd98afb7fc2db7bc2c961a64f0ce0eaf567
parent51ddd2851e4a36e28cf78dfe06125723f7d2b113 (diff)
downloadsrc-c6bbaf794d11bc2d80b00eda20a0ce761ac9d656.tar.gz
src-c6bbaf794d11bc2d80b00eda20a0ce761ac9d656.zip
Build the arm64 loader with -ffixed-x18
This stops the compiler from using the x18 register. Some UEFI implementations assume this will be preserved when calling the Boot Services. (cherry picked from commit a2e2311a40696e39eb24ff4a4d4c0968bba42c8c)
-rw-r--r--stand/defs.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/stand/defs.mk b/stand/defs.mk
index 9e291639e877..6fba2051301b 100644
--- a/stand/defs.mk
+++ b/stand/defs.mk
@@ -126,7 +126,7 @@ AFLAGS+= --32
# currently has no /boot/loader, but may soon.
CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD}
.if ${MACHINE_CPUARCH} == "aarch64"
-CFLAGS+= -mgeneral-regs-only -fPIC
+CFLAGS+= -mgeneral-regs-only -ffixed-x18 -fPIC
.elif ${MACHINE_CPUARCH} == "riscv"
CFLAGS+= -march=rv64imac -mabi=lp64
.else