From 7ace3bb7d66048d87290d360a2d200f4eded6bf4 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 7 Jun 2023 19:00:54 +0800 Subject: [PATCH] rust: enable riscv64 support rust natively supports riscv64 so let's enable it. Signed-off-by: Tianling Shen --- lang/rust/rust-package.mk | 2 +- lang/rust/rust-values.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/rust/rust-package.mk b/lang/rust/rust-package.mk index 6ab0e23992..955b37c29e 100644 --- a/lang/rust/rust-package.mk +++ b/lang/rust/rust-package.mk @@ -16,7 +16,7 @@ endif include $(RUST_INCLUDE_DIR)/rust-values.mk # Support only a subset for now. -RUST_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||mips64||mips64el||mipsel||powerpc64||x86_64) +RUST_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||mips64||mips64el||mipsel||powerpc64||riscv64||x86_64) # $(1) path to the package (optional) # $(2) additional arguments to cargo (optional) diff --git a/lang/rust/rust-values.mk b/lang/rust/rust-values.mk index daebec2d69..7ae3798234 100644 --- a/lang/rust/rust-values.mk +++ b/lang/rust/rust-values.mk @@ -33,6 +33,8 @@ RUSTC_TARGET_ARCH:=$(subst muslgnueabi,musleabi,$(RUSTC_TARGET_ARCH)) ifeq ($(ARCH),i386) RUSTC_TARGET_ARCH:=$(subst i486,i586,$(RUSTC_TARGET_ARCH)) +else ifeq ($(ARCH),riscv64) + RUSTC_TARGET_ARCH:=$(subst riscv64,riscv64gc,$(RUSTC_TARGET_ARCH)) endif # ARM Logic -- 2.30.2