mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 04:37:23 +08:00
Add support for Linux RISC-V 64 (#1159)
This commit is contained in:
@@ -19,6 +19,10 @@ SYSROOT = "/usr/local/ohos-sdk/linux/native/sysroot"
|
|||||||
linker = "aarch64-unknown-linux-musl-gcc"
|
linker = "aarch64-unknown-linux-musl-gcc"
|
||||||
rustflags = ["-C", "target-feature=+crt-static"]
|
rustflags = ["-C", "target-feature=+crt-static"]
|
||||||
|
|
||||||
|
[target.riscv64gc-unknown-linux-musl]
|
||||||
|
linker = "riscv64-unknown-linux-musl-gcc"
|
||||||
|
rustflags = ["-C", "target-feature=+crt-static"]
|
||||||
|
|
||||||
[target.'cfg(all(windows, target_env = "msvc"))']
|
[target.'cfg(all(windows, target_env = "msvc"))']
|
||||||
rustflags = ["-C", "target-feature=+crt-static"]
|
rustflags = ["-C", "target-feature=+crt-static"]
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/core.yml
vendored
7
.github/workflows/core.yml
vendored
@@ -83,6 +83,9 @@ jobs:
|
|||||||
- TARGET: x86_64-unknown-linux-musl
|
- TARGET: x86_64-unknown-linux-musl
|
||||||
OS: ubuntu-22.04
|
OS: ubuntu-22.04
|
||||||
ARTIFACT_NAME: linux-x86_64
|
ARTIFACT_NAME: linux-x86_64
|
||||||
|
- TARGET: riscv64gc-unknown-linux-musl
|
||||||
|
OS: ubuntu-22.04
|
||||||
|
ARTIFACT_NAME: linux-riscv64
|
||||||
- TARGET: mips-unknown-linux-musl
|
- TARGET: mips-unknown-linux-musl
|
||||||
OS: ubuntu-22.04
|
OS: ubuntu-22.04
|
||||||
ARTIFACT_NAME: linux-mips
|
ARTIFACT_NAME: linux-mips
|
||||||
@@ -189,6 +192,8 @@ jobs:
|
|||||||
if [[ $OS =~ ^windows.*$ ]]; then
|
if [[ $OS =~ ^windows.*$ ]]; then
|
||||||
SUFFIX=.exe
|
SUFFIX=.exe
|
||||||
CORE_FEATURES="--features=mimalloc"
|
CORE_FEATURES="--features=mimalloc"
|
||||||
|
elif [[ $TARGET =~ ^riscv64.*$ ]]; then
|
||||||
|
CORE_FEATURES="--features=mimalloc"
|
||||||
else
|
else
|
||||||
CORE_FEATURES="--features=jemalloc"
|
CORE_FEATURES="--features=jemalloc"
|
||||||
fi
|
fi
|
||||||
@@ -255,7 +260,7 @@ jobs:
|
|||||||
TAG=$GITHUB_SHA
|
TAG=$GITHUB_SHA
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $OS =~ ^ubuntu.*$ && ! $TARGET =~ ^.*freebsd$ && ! $TARGET =~ ^loongarch.*$ ]]; then
|
if [[ $OS =~ ^ubuntu.*$ && ! $TARGET =~ ^.*freebsd$ && ! $TARGET =~ ^loongarch.*$ && ! $TARGET =~ ^riscv64.*$ ]]; then
|
||||||
UPX_VERSION=4.2.4
|
UPX_VERSION=4.2.4
|
||||||
curl -L https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz -s | tar xJvf -
|
curl -L https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz -s | tar xJvf -
|
||||||
cp upx-${UPX_VERSION}-amd64_linux/upx .
|
cp upx-${UPX_VERSION}-amd64_linux/upx .
|
||||||
|
|||||||
2
.github/workflows/install_rust.sh
vendored
2
.github/workflows/install_rust.sh
vendored
@@ -15,6 +15,8 @@ if [[ $OS =~ ^ubuntu.*$ ]]; then
|
|||||||
# if target is mips or mipsel, we should use soft-float version of musl
|
# if target is mips or mipsel, we should use soft-float version of musl
|
||||||
if [[ $TARGET =~ ^mips.*$ || $TARGET =~ ^mipsel.*$ ]]; then
|
if [[ $TARGET =~ ^mips.*$ || $TARGET =~ ^mipsel.*$ ]]; then
|
||||||
MUSL_TARGET=${TARGET}sf
|
MUSL_TARGET=${TARGET}sf
|
||||||
|
elif [[ $TARGET =~ ^riscv64gc-.*$ ]]; then
|
||||||
|
MUSL_TARGET=${TARGET/#riscv64gc-/riscv64-}
|
||||||
fi
|
fi
|
||||||
if [[ $MUSL_TARGET =~ musl ]]; then
|
if [[ $MUSL_TARGET =~ musl ]]; then
|
||||||
mkdir -p ./musl_gcc
|
mkdir -p ./musl_gcc
|
||||||
|
|||||||
Reference in New Issue
Block a user