12add0d91Sopenharmony_ciFROM ubuntu:22.04
22add0d91Sopenharmony_ci
32add0d91Sopenharmony_ciRUN apt-get update && apt-get install -y --no-install-recommends \
42add0d91Sopenharmony_ci        curl ca-certificates \
52add0d91Sopenharmony_ci        gcc \
62add0d91Sopenharmony_ci        gcc-s390x-linux-gnu \
72add0d91Sopenharmony_ci        qemu-user
82add0d91Sopenharmony_ci
92add0d91Sopenharmony_ciCOPY install-musl.sh /
102add0d91Sopenharmony_ciRUN sh /install-musl.sh s390x
112add0d91Sopenharmony_ci
122add0d91Sopenharmony_ci# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
132add0d91Sopenharmony_ciENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
142add0d91Sopenharmony_ci    CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /musl-s390x" \
152add0d91Sopenharmony_ci    CC_s390x_unknown_linux_gnu=musl-gcc \
162add0d91Sopenharmony_ci    RUSTFLAGS='-Clink-args=-lgcc -L /musl-s390x/lib' \
172add0d91Sopenharmony_ci    PATH=$PATH:/musl-s390x/bin:/rust/bin
18