svn commit: r352639 - stable/12/sys/conf
Mitchell Horne
mhorne at FreeBSD.org
Tue Sep 24 02:33:03 UTC 2019
Author: mhorne
Date: Tue Sep 24 02:33:03 2019
New Revision: 352639
URL: https://svnweb.freebsd.org/changeset/base/352639
Log:
MFC r352034:
RISC-V: fix kernel CFLAGS with clang
Modified:
stable/12/sys/conf/kern.mk
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/conf/kern.mk
==============================================================================
--- stable/12/sys/conf/kern.mk Tue Sep 24 02:30:32 2019 (r352638)
+++ stable/12/sys/conf/kern.mk Tue Sep 24 02:33:03 2019 (r352639)
@@ -131,8 +131,18 @@ CFLAGS += -ffixed-x18
INLINE_LIMIT?= 8000
.endif
+#
+# For RISC-V we specify the soft-float ABI (lp64) to avoid the use of floating
+# point registers within the kernel. We also specify the "medium" code model,
+# which generates code suitable for a 2GiB addressing range located at any
+# offset, allowing modules to be located anywhere in the 64-bit address space.
+# Note that clang and GCC refer to this code model as "medium" and "medany"
+# respectively.
+#
.if ${MACHINE_CPUARCH} == "riscv"
-CFLAGS.gcc+= -mcmodel=medany -march=rv64imafdc -mabi=lp64
+CFLAGS+= -march=rv64imafdc -mabi=lp64
+CFLAGS.clang+= -mcmodel=medium
+CFLAGS.gcc+= -mcmodel=medany
INLINE_LIMIT?= 8000
.endif
More information about the svn-src-stable
mailing list