12add0d91Sopenharmony_ciFROM ubuntu:22.04
22add0d91Sopenharmony_ci
32add0d91Sopenharmony_ciRUN apt-get update && apt-get install -y --no-install-recommends \
42add0d91Sopenharmony_ci  gcc make libc6-dev git curl ca-certificates \
52add0d91Sopenharmony_ci  gcc-mips64-linux-gnuabi64 qemu-user
62add0d91Sopenharmony_ci
72add0d91Sopenharmony_ciCOPY install-musl.sh /
82add0d91Sopenharmony_ciRUN sh /install-musl.sh mips64
92add0d91Sopenharmony_ci
102add0d91Sopenharmony_ci# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
112add0d91Sopenharmony_ciENV PATH=$PATH:/musl-mips64/bin:/rust/bin \
122add0d91Sopenharmony_ci    CC_mips64_unknown_linux_muslabi64=musl-gcc \
132add0d91Sopenharmony_ci    RUSTFLAGS='-Clink-args=-lgcc -L /musl-mips64/lib' \
142add0d91Sopenharmony_ci    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_LINKER=musl-gcc \
152add0d91Sopenharmony_ci    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_RUNNER="qemu-mips64 -L /musl-mips64"
16