1#
2# Docker all cross-compiler target (tests only)
3#
4# While the normal cross builds take care to setup proper multiarch
5# build environments which can cross build QEMU this just installs the
6# basic compilers for as many targets as possible. We shall use this
7# to build and run linux-user tests on GitLab
8#
9FROM docker.io/library/debian:11-slim
10
11# Duplicate deb line as deb-src
12RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
13
14RUN export DEBIAN_FRONTEND=noninteractive && \
15    apt-get update && \
16    apt-get install -y eatmydata && \
17    eatmydata apt-get dist-upgrade -y && \
18    apt build-dep -yy qemu
19
20# Add extra build tools and as many cross compilers as we can for testing
21RUN DEBIAN_FRONTEND=noninteractive eatmydata \
22        apt install -y --no-install-recommends \
23        ccache \
24        clang  \
25        git \
26        ninja-build \
27        gcc-aarch64-linux-gnu \
28        libc6-dev-arm64-cross \
29        gcc-alpha-linux-gnu \
30        libc6.1-dev-alpha-cross \
31        gcc-arm-linux-gnueabihf \
32        libc6-dev-armhf-cross \
33        gcc-hppa-linux-gnu \
34        libc6-dev-hppa-cross \
35        gcc-m68k-linux-gnu \
36        libc6-dev-m68k-cross \
37        gcc-mips-linux-gnu \
38        libc6-dev-mips-cross \
39        gcc-mips64-linux-gnuabi64 \
40        libc6-dev-mips64-cross \
41        gcc-mips64el-linux-gnuabi64 \
42        libc6-dev-mips64el-cross \
43        gcc-mipsel-linux-gnu \
44        libc6-dev-mipsel-cross \
45        gcc-powerpc-linux-gnu \
46        libc6-dev-powerpc-cross \
47        gcc-powerpc64-linux-gnu \
48        libc6-dev-ppc64-cross \
49        gcc-powerpc64le-linux-gnu \
50        libc6-dev-ppc64el-cross \
51        gcc-riscv64-linux-gnu \
52        libc6-dev-riscv64-cross \
53        gcc-s390x-linux-gnu \
54        libc6-dev-s390x-cross \
55        gcc-sh4-linux-gnu \
56        libc6-dev-sh4-cross \
57        gcc-sparc64-linux-gnu \
58        libc6-dev-sparc64-cross
59
60ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools
61ENV DEF_TARGET_LIST aarch64-linux-user,alpha-linux-user,arm-linux-user,hppa-linux-user,i386-linux-user,m68k-linux-user,mips-linux-user,mips64-linux-user,mips64el-linux-user,mipsel-linux-user,ppc-linux-user,ppc64-linux-user,ppc64le-linux-user,riscv64-linux-user,s390x-linux-user,sh4-linux-user,sparc64-linux-user
62