From e2245a0b12e3dc29b8becdaca78419fde3b97387 Mon Sep 17 00:00:00 2001 From: ffgan <114909534+ffgan@users.noreply.github.com> Date: Mon, 9 Jun 2025 00:12:05 +0800 Subject: [PATCH] allow cross-compiling support for RISC-V 64 (#21348) this is minor PR that supports building on RISC-V 64, this PR is for compilation only. There is no guarantee that code is tested and will work in production. --- buildscripts/checkdeps.sh | 4 ++-- buildscripts/cross-compile.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildscripts/checkdeps.sh b/buildscripts/checkdeps.sh index 11ecc4db0..ed4f666ea 100755 --- a/buildscripts/checkdeps.sh +++ b/buildscripts/checkdeps.sh @@ -74,11 +74,11 @@ check_minimum_version() { assert_is_supported_arch() { case "${ARCH}" in - x86_64 | amd64 | aarch64 | ppc64le | arm* | s390x | loong64 | loongarch64) + x86_64 | amd64 | aarch64 | ppc64le | arm* | s390x | loong64 | loongarch64 | riscv64) return ;; *) - echo "Arch '${ARCH}' is not supported. Supported Arch: [x86_64, amd64, aarch64, ppc64le, arm*, s390x, loong64, loongarch64]" + echo "Arch '${ARCH}' is not supported. Supported Arch: [x86_64, amd64, aarch64, ppc64le, arm*, s390x, loong64, loongarch64, riscv64]" exit 1 ;; esac diff --git a/buildscripts/cross-compile.sh b/buildscripts/cross-compile.sh index 691891bae..0590aebb9 100755 --- a/buildscripts/cross-compile.sh +++ b/buildscripts/cross-compile.sh @@ -9,7 +9,7 @@ function _init() { export CGO_ENABLED=0 ## List of architectures and OS to test coss compilation. - SUPPORTED_OSARCH="linux/ppc64le linux/mips64 linux/amd64 linux/arm64 linux/s390x darwin/arm64 darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64 linux/mips openbsd/amd64" + SUPPORTED_OSARCH="linux/ppc64le linux/mips64 linux/amd64 linux/arm64 linux/s390x darwin/arm64 darwin/amd64 freebsd/amd64 windows/amd64 linux/arm linux/386 netbsd/amd64 linux/mips openbsd/amd64 linux/riscv64" } function _build() {