summaryrefslogtreecommitdiff
path: root/Containerfile
blob: d9888741a7648bcf25093484e698bd9b4be90880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 pacman --noconfirm -Syu && \
    pacman --noconfirm --needed -S \
      cmake                        \
      flex                         \
      git                          \
      gmp                          \
      grub                         \
      guile                        \
      libelf                       \
      libisl                       \
      libisoburn                   \
      libmpc                       \
      mpfr                         \
      mtools                       \
      ninja                        \
      openssh                      \
      qemu-system-$EMULATOR        \
      qemu-ui-curses               \
      xxhash                       \
      zlib

COPY --from=build /opt/toolchain /opt/toolchain

ENV PATH=/opt/toolchain/bin:$PATH