1FROM ubuntu:24.10
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4        curl ca-certificates \
5        gcc \
6        gcc-s390x-linux-gnu \
7        qemu-user \
8        xz-utils patch rsync
9
10COPY install-musl.sh /
11RUN /install-musl.sh s390x
12
13# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in std?
14ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
15    CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /musl-s390x" \
16    CC_s390x_unknown_linux_gnu=musl-gcc \
17    RUSTFLAGS='-Clink-args=-lgcc -L /musl-s390x/lib' \
18    PATH=$PATH:/musl-s390x/bin:/rust/bin
19