From c9c2b043ede29abd51b4926ba299bb6583ddae73 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 8 Jan 2025 09:17:10 -0500 Subject: [PATCH] Enable --local-caprelocs=elf for Morello This is done in bsd.{lib,prog}.mk instead of bsd.cpu.mk as it can't be turned off for the lib32 build otherwise. --- share/mk/bsd.lib.mk | 4 ++++ share/mk/bsd.prog.mk | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 18b6ad8b04e1..8e36dec62926 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -112,6 +112,10 @@ LDFLAGS+= -Wl,-zbti-report=error .endif .endif +.if ${MACHINE_CPUARCH} == "aarch64" && ${MACHINE_CPU:Mcheri} +LDFLAGS+= -Wl,--local-caprelocs=elf +.endif + # Initialize stack variables on function entry .if ${OPT_INIT_ALL} != "none" .if ${COMPILER_FEATURES:Minit-all} diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 028e4bbfe882..30eff9cb45f1 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -84,6 +84,10 @@ LDFLAGS+= -Wl,-zbti-report=error .endif .endif +.if ${MACHINE_CPUARCH} == "aarch64" && ${MACHINE_CPU:Mcheri} +LDFLAGS+= -Wl,--local-caprelocs=elf +.endif + # Initialize stack variables on function entry .if ${OPT_INIT_ALL} != "none" .if ${COMPILER_FEATURES:Minit-all}