blob: c761c26c4b02558bd878d874877d941f4c555ac7 (
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
46
47
48
|
FROM ubuntu:questing 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 \
gnupg libstdc++6 software-properties-common wget && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/questing/ llvm-toolchain-questing main" > /etc/apt/sources.list.d/llvm.list && \
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y --purge gnupg software-properties-common wget && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /opt/toolchain /opt/toolchain
ENV PATH="/opt/toolchain/bin:${PATH}"
CMD [ "/bin/bash" ]
|