Work around VNET and DPCPU related panics on aarch64
lld >= 14 and recent GNU ld can relax adrp+add and adrp+ldr instructions, which breaks VNET and DPCPU when used in modules. Until VNET and DPCPU can be fixed to deal with these relaxed instructions, disable linker relaxation for now. PR: 264094 Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41156
This commit is contained in:
@@ -170,6 +170,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
|
||||
|
||||
Reference in New Issue
Block a user