qemu/tests/docker/dockerfiles/debian-toolchain.docker
Richard Henderson 2eb4461ad5 tests/docker: Add debian-nios2-cross image
Build the entire cross tool chain from source.
For this reason, default to caching.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
[AJB: honour NOUSER in cached fetch and build, update MAINTAINERS]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211014224435.2539547-6-richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20211026102234.3961636-6-alex.bennee@linaro.org>
2021-11-04 10:31:32 +00:00

37 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 qemu/debian10
# 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 \
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 qemu/debian10
COPY --from=0 /usr/local /usr/local