aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2025-07-25 16:45:16 +0100
committerAlex Bennée <alex.bennee@linaro.org>2025-07-26 23:04:35 +0100
commit6da616bb17004f9332b2798353ebef88cac61cc2 (patch)
treee547f82a2aa469af9de377eb269fe8f7caf10f86
parent408c8629105f32aa1d02d3004998ea453f69809b (diff)
downloadqemu-6da616bb17004f9332b2798353ebef88cac61cc2.zip
qemu-6da616bb17004f9332b2798353ebef88cac61cc2.tar.gz
qemu-6da616bb17004f9332b2798353ebef88cac61cc2.tar.bz2
tests/docker: handle host-arch selection for all-test-cross
When building on non-x86 we get a bunch but not all of the compilers. Handle this in the Dockerfile by probing the arch and expanding the list available. Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250725154517.3523095-14-alex.bennee@linaro.org>
-rw-r--r--tests/docker/dockerfiles/debian-all-test-cross.docker32
1 files changed, 18 insertions, 14 deletions
diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
index 5aa4374..ef69bbc 100644
--- a/tests/docker/dockerfiles/debian-all-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
@@ -23,7 +23,9 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
bison \
ccache \
clang \
+ dpkg-dev \
flex \
+ gcc \
git \
libclang-rt-dev \
ninja-build \
@@ -33,16 +35,11 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
python3-venv \
python3-wheel
-RUN DEBIAN_FRONTEND=noninteractive eatmydata \
- apt install -y --no-install-recommends \
- gcc-aarch64-linux-gnu \
+# All the generally available compilers
+ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross \
gcc-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
- gcc-hppa-linux-gnu \
- libc6-dev-hppa-cross \
- gcc-m68k-linux-gnu \
- libc6-dev-m68k-cross \
gcc-mips-linux-gnu \
libc6-dev-mips-cross \
gcc-mips64-linux-gnuabi64 \
@@ -51,18 +48,25 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
libc6-dev-mips64el-cross \
gcc-mipsel-linux-gnu \
libc6-dev-mipsel-cross \
- gcc-powerpc-linux-gnu \
- libc6-dev-powerpc-cross \
- gcc-powerpc64-linux-gnu \
- libc6-dev-ppc64-cross \
gcc-powerpc64le-linux-gnu \
libc6-dev-ppc64el-cross \
gcc-riscv64-linux-gnu \
libc6-dev-riscv64-cross \
gcc-s390x-linux-gnu \
- libc6-dev-s390x-cross \
- gcc-sparc64-linux-gnu \
- libc6-dev-sparc64-cross && \
+ libc6-dev-s390x-cross
+
+RUN if dpkg-architecture -e amd64; then \
+ export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-hppa-linux-gnu libc6-dev-hppa-cross"; \
+ export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-m68k-linux-gnu libc6-dev-m68k-cross"; \
+ export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-powerpc-linux-gnu libc6-dev-powerpc-cross"; \
+ export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross"; \
+ export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-sparc64-linux-gnu libc6-dev-sparc64-cross"; \
+ fi && \
+ echo "compilers: ${AVAILABLE_COMPILERS}"
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+ apt install -y --no-install-recommends \
+ ${AVAILABLE_COMPILERS} && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt