12add0d91Sopenharmony_ci# FIXME: Update to 22.04 once Debian image of sparc64 has a newer glibc.
22add0d91Sopenharmony_ciFROM ubuntu:20.04
32add0d91Sopenharmony_ci
42add0d91Sopenharmony_ciRUN apt-get update && apt-get install -y --no-install-recommends \
52add0d91Sopenharmony_ci        curl ca-certificates \
62add0d91Sopenharmony_ci        gcc libc6-dev \
72add0d91Sopenharmony_ci        gcc-sparc64-linux-gnu libc6-dev-sparc64-cross \
82add0d91Sopenharmony_ci        qemu-system-sparc64 openbios-sparc seabios ipxe-qemu \
92add0d91Sopenharmony_ci        p7zip-full cpio linux-libc-dev-sparc64-cross
102add0d91Sopenharmony_ci
112add0d91Sopenharmony_ciCOPY linux-sparc64.sh /
122add0d91Sopenharmony_ciRUN bash /linux-sparc64.sh
132add0d91Sopenharmony_ci
142add0d91Sopenharmony_ciCOPY test-runner-linux /
152add0d91Sopenharmony_ci
162add0d91Sopenharmony_ciENV CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=sparc64-linux-gnu-gcc \
172add0d91Sopenharmony_ci    CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="/test-runner-linux sparc64" \
182add0d91Sopenharmony_ci    CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
192add0d91Sopenharmony_ci    PATH=$PATH:/rust/bin
20