rust: enable riscv64 support

rust natively supports riscv64 so let's enable it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-06-07 19:00:54 +08:00
parent ba267237e7
commit 7ace3bb7d6
No known key found for this signature in database
GPG key ID: 6850B6345C862176
2 changed files with 3 additions and 1 deletions

View file

@ -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)

View file

@ -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