From 31b259049e2b932ae6527d1dc850c2bec58e94e0 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 31 Jan 2026 12:10:56 -0500 Subject: [PATCH] riscv: Enable the zifencei extension explicitly in -march clang is more tolerant and implies this extension whereas GCC is stricter and requires it to be included. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54965 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index e86ffb684f9..af7b1589c5c 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -166,7 +166,7 @@ INLINE_LIMIT?= 8000 # code model as "medium" and "medany" respectively. # .if ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imafdch +CFLAGS+= -march=rv64imafdch_zifencei CFLAGS+= -mabi=lp64 CFLAGS.clang+= -mcmodel=medium CFLAGS.gcc+= -mcmodel=medany