Skip to content

Commit 9f583eb

Browse files
committed
del alpine in loongarch64
Signed-off-by: yzewei <[email protected]>
1 parent 52e6955 commit 9f583eb

9 files changed

+22
-25
lines changed

Diff for: src/test-cargo.bats

+11-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ testHelloCargoRustup() {
9292
}
9393

9494
@test "loong64-hellocargo-rustup" {
95-
skip "LOONG64 not supported" # rust stdlib package not available
95+
if ! supportLoongArch; then
96+
skip "LOONGARCH64 not supported" # rust stdlib package not available
97+
fi
98+
export TARGETARCH=loongarch64
99+
testHelloCargoRustup
96100
}
97101

98102
@test "386-hellocargo-rustup" {
@@ -148,7 +152,12 @@ testHelloCargoRustup() {
148152
}
149153

150154
@test "loong64-hellocargo-rustpkg" {
151-
skip "LOONG64 not supported" # rust stdlib package not available
155+
if ! supportLoongArch; then
156+
skip "LOONGARCH64 not supported" # rust stdlib package not available
157+
fi
158+
export TARGETARCH=loongarch64
159+
export LOONG64_TARGET_ARCH=loongarch64
160+
testHelloCargo
152161
}
153162

154163
@test "386-hellocargo-rustpkg" {

Diff for: src/test-clang.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ clean() {
1414

1515
testHelloCLLD() {
1616
clean
17-
add clang binutils lld
17+
add clang lld
1818
xxadd xx-c-essentials
1919
run sh -c 'xx-clang --print-target-triple | sed s/unknown-// | sed s/pc-//'
2020
assert_success

Diff for: src/test-go.bats

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ ensureGo() {
99
else
1010
add golang
1111
fi
12-
if [ "$(xx-info arch)" = "loong64" ]; then
13-
add clang binutils
14-
else
15-
add clang lld
16-
fi
12+
add clang lld
1713
}
1814

1915
setup_file() {

Diff for: src/test-info-alpine.bats

-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ load 'assert'
7474
assert_equal "riscv64" "$(TARGETPLATFORM=linux/riscv64 RISCV64_TARGET_ARCH=riscv64gc xx-info pkg-arch)" # does not change
7575
}
7676

77-
@test "loong64" {
78-
assert_equal "loong64-alpine-linux-muslabi" "$(TARGETPLATFORM=linux/loong64 xx-info triple)"
79-
assert_equal "loongarch64" "$(TARGETPLATFORM=linux/loong64 xx-info pkg-arch)"
80-
}
81-
8277
@test "custom-vendor" {
8378
assert_equal "riscv64-unknown-linux-musl" "$(TARGETPLATFORM=linux/riscv64 XX_VENDOR=unknown xx-info triple)"
8479
}

Diff for: src/test-info-debian.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fi
7878
}
7979

8080
@test "loong64" {
81-
assert_equal "loong64-linux-gnuabi" "$(TARGETPLATFORM=linux/loong64 xx-info triple)"
81+
assert_equal "loong64-linux-gnu" "$(TARGETPLATFORM=linux/loong64 xx-info triple)"
8282
assert_equal "loong64" "$(TARGETPLATFORM=linux/loong64 xx-info pkg-arch)"
8383
}
8484

Diff for: src/test_helper.bash

+3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ supportLoongArch() {
103103
return 1
104104
fi
105105
fi
106+
if [ -f /etc/alpine-release ]; then
107+
return 0
108+
fi
106109
return 0
107110
}
108111

Diff for: src/xx-apk

-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ setup() {
5151
echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >"$apk_dir/repositories"
5252
echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >>"$apk_dir/repositories"
5353
fi
54-
# add loongarch support
55-
if [ "$TARGETARCH" = "loong64" ]; then
56-
echo "http://alpine.loongnix.cn/v3.11/main" >"$apk_dir/repositories"
57-
echo "http://alpine.loongnix.cn/v3.11/community" >>"$apk_dir/repositories"
58-
echo "http://alpine.loongnix.cn/v3.11/testing" >>"$apk_dir/repositories"
59-
fi
6054
mkdir "$apk_dir/keys"
6155
mkdir "$apk_dir/protected_paths.d"
6256
echo "$XX_PKG_ARCH" >"$apk_dir/arch"

Diff for: src/xx-cargo

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ if [ -n "$XX_RUSTFLAGS" ]; then
7979
fi
8080
export "CC_$(xx-info | tr - _)=$(xx-info)-clang"
8181

82-
if which "qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONG64_TARGET_ARCH='' xx-info march)" >/dev/null 2>&1; then
83-
export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_RUNNER=qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONG64_TARGET_ARCH='' xx-info march)"
82+
if which "qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONGARCH64_TARGET_ARCH='' xx-info march)" >/dev/null 2>&1; then
83+
export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_RUNNER=qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONGARCH64_TARGET_ARCH='' xx-info march)"
8484
if [ -f /etc/alpine-release ]; then
85-
export "QEMU_LD_PREFIX=/$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONG64_TARGET_ARCH='' xx-info)/"
85+
export "QEMU_LD_PREFIX=/$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONGARCH64_TARGET_ARCH='' xx-info)/"
8686
else
87-
export "QEMU_LD_PREFIX=/lib/$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONG64_TARGET_ARCH='' XX_VENDOR='' xx-info)/"
87+
export "QEMU_LD_PREFIX=/lib/$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' LOONGARCH64_TARGET_ARCH='' XX_VENDOR='' xx-info)/"
8888
fi
8989
fi
9090

Diff for: src/xx-info

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ case "$TARGETARCH" in
345345
XX_DEBIAN_ARCH="loong64"
346346
XX_ALPINE_ARCH="loongarch64"
347347
XX_RHEL_ARCH="loong64"
348-
XX_TRIPLE="loong64${vendor}-linux-${XX_LIBC}abi"
348+
XX_TRIPLE="loong64${vendor}-linux-${XX_LIBC}"
349349
;;
350350

351351
esac

0 commit comments

Comments
 (0)