toolchain/Dockerfile
Adrien Beaudouin 4e8d866ce1
All checks were successful
/ build (push) Successful in 23s
init
2025-06-06 18:33:05 +02:00

33 lines
913 B
Docker

FROM gitea.okami101.io/okami101/stagex/core-binutils:latest AS binutils
FROM gitea.okami101.io/okami101/stagex/core-gcc:latest AS gcc
FROM gitea.okami101.io/okami101/stagex/core-make:latest AS make
FROM gitea.okami101.io/okami101/stagex/core-musl:latest AS musl
FROM gitea.okami101.io/okami101/stagex/core-busybox:latest AS busybox
FROM scratch AS bootstrap-c-toolchain
COPY --from=binutils / /
COPY --from=gcc / /
COPY --from=make / /
COPY --from=musl / /
COPY --from=busybox / /
FROM bootstrap-c-toolchain AS build-make
WORKDIR /source
RUN wget https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz -O make.tar.gz
RUN tar -xzf make.tar.gz --strip-components=1 && \
mkdir build && \
cd build && \
../configure --prefix=/usr --without-guile
RUN cd build && \
make -j$(nproc)
RUN cd build && \
make DESTDIR=/rootfs install
FROM bootstrap-c-toolchain AS final
COPY --from=build-make /rootfs/ /