From 552a0482af54cd856f14c8fa138fff63d4e0b926 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 24 Oct 2025 14:50:52 +0200 Subject: toolchain: switch to semi-static toolchain --- Containerfile | 62 ++++++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 35 deletions(-) (limited to 'Containerfile') diff --git a/Containerfile b/Containerfile index e840311..8add7ce 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM docker.io/archlinux:latest AS build +FROM ubuntu:latest AS builder ARG BINUTILS_VERSION ARG GCC_VERSION @@ -6,48 +6,40 @@ 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 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 - -RUN rm -rf /var/cache/pacman +FROM ubuntu:latest + +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" ] -- cgit v1.2.3