aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/kmod.mk
diff options
context:
space:
mode:
Diffstat (limited to 'sys/conf/kmod.mk')
-rw-r--r--sys/conf/kmod.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 610484ba7e36..f67be86eeb73 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -168,6 +168,13 @@ CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
CFLAGS+= -fPIC
.endif
+.if ${MACHINE_CPUARCH} == "aarch64"
+# https://bugs.freebsd.org/264094
+# lld >= 14 and recent GNU ld can relax adrp+add and adrp+ldr instructions,
+# which breaks VNET.
+LDFLAGS+= --no-relax
+.endif
+
# Temporary workaround for PR 196407, which contains the fascinating details.
# Don't allow clang to use fpu instructions or registers in kernel modules.
.if ${MACHINE_CPUARCH} == arm