Skip to content

Commit 6c30ff4

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 3f8a0e3 commit 6c30ff4

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-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 \
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ i686-unknown-linux-musl \
147147
powerpc-unknown-linux-gnu \
148148
powerpc64-unknown-linux-gnu \
149149
powerpc64le-unknown-linux-gnu \
150+
powerpc64le-unknown-linux-musl \
150151
s390x-unknown-linux-gnu \
151152
sparc64-unknown-linux-gnu \
152153
sparcv9-sun-solaris \

0 commit comments

Comments
 (0)