FROM docker.io/archlinux:latest AS build ARG BINUTILS_VERSION ARG GCC_VERSION ARG GDB_VERSION ARG NEWLIB_VERSION ARG TARGET RUN /scripts/0000-prepare-os.sh RUN /scripts/0100-download.sh RUN /scripts/0200-build-target-binutils.sh RUN /scripts/0300-build-bootstrap-gcc.sh RUN /scripts/0400-build-target-newlib.sh RUN /scripts/0500-build-target-gcc.sh RUN /scripts/0600-build-target-gdb.sh FROM docker.io/archlinux:latest ARG EMULATOR=x86 RUN useradd -m dev COPY --from=build /opt/toolchain /opt/toolchain ENV PATH=/opt/toolchain/bin:$PATH RUN pacman --noconfirm -Syu && \ pacman --noconfirm --needed -S \ cmake \ doxygen \ flex \ git \ gmp \ grub \ guile \ libelf \ libisl \ libisoburn \ libmpc \ mpfr \ mtools \ ninja \ openssh \ qemu-system-$EMULATOR \ qemu-ui-curses \ which \ xxhash \ zlib