From d68205e919fe84c2121ee508059dcf910020a1f6 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Tue, 9 Jul 2024 13:15:10 +0100 Subject: [PATCH] ci: enable cross compile testing for amdgpu-plugin Skip cross-compilation on armv7 because, among many other errors, it fails with the following: In file included from ../../include/common/lock.h:9, from ../../criu/include/files.h:9, from amdgpu_plugin.c:30: ../../include/common/asm/atomic.h:60:2: error: #error ARM architecture version (CONFIG_ARMV*) not set or unsupported. 60 | #error ARM architecture version (CONFIG_ARMV*) not set or unsupported. | ^~~~~ ../../include/common/asm/atomic.h: In function 'atomic_add_return': ../../include/common/asm/atomic.h:81:9: error: implicit declaration of function 'smp_mb' [-Werror=implicit-function-declaration] 81 | smp_mb(); | ^~~~~~ Signed-off-by: Radostin Stoyanov --- scripts/build/Dockerfile.stable-cross.tmpl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/build/Dockerfile.stable-cross.tmpl b/scripts/build/Dockerfile.stable-cross.tmpl index 6a68cd1ca..078372c38 100644 --- a/scripts/build/Dockerfile.stable-cross.tmpl +++ b/scripts/build/Dockerfile.stable-cross.tmpl @@ -21,7 +21,8 @@ RUN apt-install \ libprotobuf-c-dev:${DEBIAN_ARCH} \ libcap-dev:${DEBIAN_ARCH} \ libaio-dev:${DEBIAN_ARCH} \ - libnl-route-3-dev:${DEBIAN_ARCH} + libnl-route-3-dev:${DEBIAN_ARCH} \ + libdrm-dev:${DEBIAN_ARCH} ENV CROSS_COMPILE=${CROSS_TRIPLET}- \ CROSS_ROOT=/usr/${CROSS_TRIPLET} \ @@ -39,4 +40,10 @@ ENV PATH="${PATH}:${CROSS_ROOT}/bin" \ COPY . /criu WORKDIR /criu -RUN make mrproper && date && make -j $(nproc) zdtm && date +# amdgpu_plugin with armv7 is not supported +RUN make mrproper && date && \ + make -j $(nproc) && \ + if [ "$SUBARCH" != "armv7" ]; then \ + make -j $(nproc) amdgpu_plugin; \ + fi && \ + make -j $(nproc) zdtm && date