[PATCH 4/5] riscv: compat_vdso: Build with zacas if available
Nam Cao
namcao at linutronix.de
Fri Jun 19 07:11:20 PDT 2026
The compat vdso Makefile does not enable zacas, disallowing source
files from using zacas instructions. This is an obstacle to adding
robust __vdso_futex_robust_list32_try_unlock() in a follow-up commit.
Build with zacas, if compiler supports it.
Signed-off-by: Nam Cao <namcao at linutronix.de>
---
arch/riscv/kernel/compat_vdso/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/riscv/kernel/compat_vdso/Makefile b/arch/riscv/kernel/compat_vdso/Makefile
index 06d28a5a0368..7f222a77dbbb 100644
--- a/arch/riscv/kernel/compat_vdso/Makefile
+++ b/arch/riscv/kernel/compat_vdso/Makefile
@@ -19,6 +19,10 @@ else
COMPAT_MARCH := rv32imafd
endif
+ifneq ($(call cc-option,-mabi=ilp32 -march=rv32ima_zacas),)
+COMPAT_MARCH := $(COMPAT_MARCH)_zacas
+endif
+
COMPAT_CC_FLAGS := -march=$(COMPAT_MARCH) -mabi=ilp32
COMPAT_LD_FLAGS := -melf32lriscv
--
2.47.3
More information about the linux-riscv
mailing list