Skip to content

Commit 28ea7a9

Browse files
committed
ci/docs: Build and check powerpc64le-unknown-linux-musl
Now that all of the issues with powerpc64 + musl are resolved, let's make sure it won't regress in the future and also build the documentation for it. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
1 parent 0cbd33d commit 28ea7a9

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ jobs:
188188
- loongarch64-unknown-linux-musl
189189
- powerpc64-unknown-linux-gnu
190190
- powerpc64le-unknown-linux-gnu
191+
- powerpc64le-unknown-linux-musl
191192
- riscv64gc-unknown-linux-gnu
192193
- s390x-unknown-linux-gnu
193194
- wasm32-unknown-emscripten
@@ -222,6 +223,9 @@ jobs:
222223
- target: loongarch64-unknown-linux-musl
223224
env:
224225
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
226+
- target: powerpc64le-unknown-linux-musl
227+
env:
228+
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
225229
# FIXME(ppc): SIGILL running tests, see
226230
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
227231
# - target: powerpc-unknown-linux-gnu

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ targets = [
7878
"powerpc64-unknown-linux-gnu",
7979
"powerpc64-wrs-vxworks",
8080
"powerpc64le-unknown-linux-gnu",
81+
"powerpc64le-unknown-linux-musl",
8182
"riscv32gc-unknown-linux-gnu",
8283
"riscv32i-unknown-none-elf",
8384
"riscv32imac-unknown-none-elf",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM ubuntu:24.10
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
gcc make libc6-dev git curl ca-certificates \
5+
gcc-powerpc64le-linux-gnu qemu-user xz-utils patch rsync
6+
7+
COPY install-musl.sh /
8+
RUN /install-musl.sh powerpc64le
9+
10+
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in std?
11+
ENV PATH=$PATH:/musl-powerpc64/bin:/rust/bin \
12+
CC_powerpc64le_unknown_linux_musl=musl-gcc \
13+
RUSTFLAGS='-Clink-args=-lgcc -L /musl-powerpc64/lib' \
14+
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
15+
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_MUSL_RUNNER="qemu-ppc64le -L /musl-powerpc64"

ci/install-musl.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ case ${1} in
6868
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
6969
make install -j4
7070
;;
71+
powerpc64*)
72+
musl_arch=powerpc64
73+
kernel_arch=powerpc
74+
CC="${1}-linux-gnu-gcc" CFLAGS="-mlong-double-64" \
75+
./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
76+
make install -j4
77+
;;
7178
*)
7279
echo "Unknown target arch: \"${1}\""
7380
exit 1

ci/verify-build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,14 @@ x86_64-unknown-linux-musl \
161161
x86_64-unknown-netbsd \
162162
"
163163

164+
# FIXME(powerpc64le): powerpc64le-unknown-linux-musl is tier 2 since 1.85 and
165+
# can be moved to rust_linux_targets once MSRV is increased
164166
rust_nightly_linux_targets="\
165167
aarch64-unknown-fuchsia \
166168
armv5te-unknown-linux-gnueabi \
167169
armv5te-unknown-linux-musleabi \
168170
i686-pc-windows-gnu \
171+
powerpc64le-unknown-linux-musl \
169172
riscv64gc-unknown-linux-gnu \
170173
x86_64-fortanix-unknown-sgx \
171174
x86_64-pc-solaris \

0 commit comments

Comments
 (0)