git: 31b259049e2b - main - riscv: Enable the zifencei extension explicitly in -march
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 31 Jan 2026 17:21:30 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=31b259049e2b932ae6527d1dc850c2bec58e94e0
commit 31b259049e2b932ae6527d1dc850c2bec58e94e0
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-01-31 17:10:56 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-01-31 17:10:56 +0000
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 e86ffb684f9a..af7b1589c5cd 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