summaryrefslogtreecommitdiff
path: root/arch/riscv/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/Makefile')
-rw-r--r--arch/riscv/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 0d13b597cb55..807f82349521 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -26,6 +26,8 @@ ifeq ($(CONFIG_ARCH_RV64I),y)
KBUILD_CFLAGS += -mabi=lp64
KBUILD_AFLAGS += -mabi=lp64
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=generic-rv64
+
KBUILD_LDFLAGS += -melf64lriscv
else
BITS := 32
@@ -33,6 +35,9 @@ else
KBUILD_CFLAGS += -mabi=ilp32
KBUILD_AFLAGS += -mabi=ilp32
+
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=generic-rv32
+
KBUILD_LDFLAGS += -melf32lriscv
endif