1# FIXME(sparc): newer versions of Ubuntu get the following errors
2# ```
3# /prog: /lib/sparc64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /prog)
4# /prog: /lib/sparc64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /prog)
5# ```
6# Not sure if this is a problem from rustc, our libc, or Ubuntu so we just
7# stick with an old LTS for now.
8FROM ubuntu:22.04
9
10RUN apt-get update && apt-get install -y --no-install-recommends \
11        curl ca-certificates \
12        gcc libc6-dev \
13        gcc-sparc64-linux-gnu libc6-dev-sparc64-cross \
14        qemu-system-sparc64 openbios-sparc seabios ipxe-qemu \
15        p7zip-full cpio linux-libc-dev-sparc64-cross
16
17COPY linux-sparc64.sh /
18RUN /linux-sparc64.sh
19
20COPY test-runner-linux /
21
22ENV CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=sparc64-linux-gnu-gcc \
23    CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="/test-runner-linux sparc64" \
24    CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
25    PATH=$PATH:/rust/bin
26