blob: 37fb7a3b1f9fc0eeeb475ea64df25ca6e934379f (
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
45
|
FROM ubuntu:latest AS builder
ARG BINUTILS_VERSION
ARG GCC_VERSION
ARG GDB_VERSION
ARG NEWLIB_VERSION
ARG TARGET
ARG ZLIB_VERSION
ARG NCURSES_VERSION
ARG EXPAT_VERSION
ARG READLINE_VERSION
ARG GMP_VERSION
ARG MPFR_VERSION
ARG MPC_VERSION
ENV STATIC_DEPS_PREFIX=/opt/static-deps
ADD ./patches /patches
ADD ./scripts /scripts
RUN /scripts/0000-prepare-os.sh
RUN /scripts/0100-download.sh
RUN /scripts/0150-build-static-deps.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 ubuntu:questing
LABEL org.opencontainers.image.title="TeachOS Toolchain"
LABEL org.opencontainers.image.description="A semi-statically linked cross-compiler toolchain for TeachOS development."
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libstdc++6 && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt/toolchain /opt/toolchain
ENV PATH="/opt/toolchain/bin:${PATH}"
CMD [ "/bin/bash" ]
|