]> git.proxmox.com Git - mirror_qemu.git/blame - tests/docker/dockerfiles/debian-loongarch-cross.docker
dockerfiles: add 'MAKE' env variable to remaining containers
[mirror_qemu.git] / tests / docker / dockerfiles / debian-loongarch-cross.docker
CommitLineData
b70ec50b
RH
1#
2# Docker cross-compiler target
3#
35782a1b 4# This docker target uses prebuilt toolchains for LoongArch64 from:
b70ec50b
RH
5# https://github.com/loongson/build-tools/releases
6#
35782a1b
AB
7FROM docker.io/library/debian:11-slim
8
9# Duplicate deb line as deb-src
10RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
b70ec50b 11
cb8715bf
AB
12RUN export DEBIAN_FRONTEND=noninteractive && \
13 apt-get update && \
14 apt-get install -y eatmydata && \
15 eatmydata apt-get dist-upgrade -y && \
16 apt build-dep -yy qemu
17
b70ec50b
RH
18RUN apt-get update && \
19 DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
20 DEBIAN_FRONTEND=noninteractive eatmydata \
21 apt-get install -y --no-install-recommends \
22 build-essential \
cb8715bf 23 bison \
b70ec50b 24 ca-certificates \
cb8715bf
AB
25 ccache \
26 clang \
27 flex \
b70ec50b
RH
28 curl \
29 gettext \
30 git \
cb8715bf
AB
31 ninja-build \
32 python3-pip \
33 python3-setuptools \
34 python3-venv \
35 python3-wheel
36
37RUN /usr/bin/pip3 install tomli
b70ec50b 38
232ce1eb 39RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz \
b70ec50b
RH
40 | tar -xJC /opt
41
42ENV PATH $PATH:/opt/cross-tools/bin
43ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH
cb8715bf
AB
44
45ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools
46ENV DEF_TARGET_LIST loongarch64-linux-user,loongarch-softmmu
bad7a275 47ENV MAKE /usr/bin/make
cb8715bf 48
93bd2954
AB
49# As a final step configure the user (if env is defined)
50ARG USER
51ARG UID
52RUN if [ "${USER}" ]; then \
53 id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi