bad7a2759c
All the lcitool generated containers define a "MAKE" env. It will be convenient for later patches if all containers do this. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240513111551.488088-2-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
54 lines
1.9 KiB
Docker
54 lines
1.9 KiB
Docker
#
|
|
# Docker Hexagon cross-compiler target
|
|
#
|
|
# This docker target is used for building hexagon tests. As it also
|
|
# needs to be able to build QEMU itself in CI we include its
|
|
# build-deps.
|
|
#
|
|
FROM docker.io/library/debian:11-slim
|
|
|
|
# Duplicate deb line as deb-src
|
|
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
# Install common build utilities
|
|
apt-get install -y --no-install-recommends \
|
|
curl \
|
|
ccache \
|
|
xz-utils \
|
|
ca-certificates \
|
|
bison \
|
|
flex \
|
|
git \
|
|
ninja-build \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-venv \
|
|
python3-wheel && \
|
|
# Install QEMU build deps for use in CI
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt build-dep -yy --arch-only qemu && \
|
|
mkdir -p /usr/libexec/ccache-wrappers && \
|
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
|
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
|
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
|
|
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
|
|
|
|
RUN /usr/bin/pip3 install tomli
|
|
|
|
ENV TOOLCHAIN_INSTALL /opt
|
|
ENV TOOLCHAIN_RELEASE 12.Dec.2023
|
|
ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl"
|
|
ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz
|
|
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
|
|
|
|
RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL"
|
|
ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin
|
|
ENV MAKE /usr/bin/make
|
|
# As a final step configure the user (if env is defined)
|
|
ARG USER
|
|
ARG UID
|
|
RUN if [ "${USER}" ]; then \
|
|
id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
|