Date: Tue, 24 Sep 2019 02:33:03 +0000 (UTC) From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352639 - stable/12/sys/conf Message-ID: <201909240233.x8O2X3DE084451@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909240233.x8O2X3DE084451>