rust: enable riscv64 support 21298/head
authorTianling Shen <cnsztl@immortalwrt.org>
Wed, 7 Jun 2023 11:00:54 +0000 (19:00 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Wed, 7 Jun 2023 11:17:08 +0000 (19:17 +0800)
rust natively supports riscv64 so let's enable it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
lang/rust/rust-package.mk
lang/rust/rust-values.mk

index 6ab0e239922efdf985e9fdd3267f8158f6d85cb5..955b37c29e796dfb3bda65468fc9da6e913a74d6 100644 (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)
index daebec2d6950161ab7c307e0396de973c53a1650..7ae37982347e065d4024414502c1065e06123304 100644 (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