4239162add
Update to the latest stable Debian. While we are at it flatten into a single dockerfile as we do not need anything from the base image to build the toolchain. This is used to build both the nios and microblaze toolchains. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220914155950.804707-29-alex.bennee@linaro.org>
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
Docker
#
|
|
# Docker toolchain cross-compiler
|
|
#
|
|
# This dockerfile is used for building a cross-compiler toolchain.
|
|
# The script for building the toolchain is supplied via extra-files.
|
|
#
|
|
FROM docker.io/library/debian:11-slim
|
|
|
|
# Install build utilities for building gcc and glibc.
|
|
# ??? The build-dep isn't working, missing a number of
|
|
# minimal build dependiencies, e.g. libmpc.
|
|
|
|
RUN apt update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt install -y --no-install-recommends \
|
|
bison \
|
|
ca-certificates \
|
|
flex \
|
|
gawk \
|
|
libmpc-dev \
|
|
libmpfr-dev \
|
|
rsync \
|
|
texinfo \
|
|
wget && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt build-dep -yy --arch-only gcc glibc
|
|
|
|
ADD build-toolchain.sh /root/build-toolchain.sh
|
|
|
|
RUN cd /root && ./build-toolchain.sh
|
|
|
|
# Throw away the extra toolchain build deps, the downloaded source,
|
|
# and the build trees by restoring the original debian10 image,
|
|
# then copying the built toolchain from stage 0.
|
|
FROM docker.io/library/debian:bullseye-slim
|
|
COPY --from=0 /usr/local /usr/local
|