From patchwork Wed Sep 25 17:11:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 830478 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1374:b0:367:895a:4699 with SMTP id q20csp856305wrz; Wed, 25 Sep 2024 10:12:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU3ICN+hezQK0AdHty5CratTwPLNMXNvRla6DEbVolUAhv67FTU8AjZwiZmZVWtE9yPJdSqJQ==@linaro.org X-Google-Smtp-Source: AGHT+IGngwPstrsNX2a9AFqsC8H80Vk4RZUJ1BGqRyOgECdkX7V53HFi1bvA2ln0Rfb1cL4j6xEQ X-Received: by 2002:a05:622a:152:b0:457:f8b1:a042 with SMTP id d75a77b69052e-45b5def4947mr51096391cf.33.1727284374844; Wed, 25 Sep 2024 10:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727284374; cv=none; d=google.com; s=arc-20240605; b=DX9c75jYaAErmLAP5MR5xOLWUz6D23H26r/z7ssw3/0Xlz/Gk0bn/lYVipvaEGSHIS EpRpbMEjz+KJYvTgKy3D97VurHnBJS4jJV8epwKdva7SWIWNe3+WY/Ftg3bfmlXIsYdE rYjQf7yTtYQffCyGtRBFMhv0nsCpfCpMZU+kw4qEHfn9BE43pj0/T4HvDzGWn2+wbXlN 17MErEe4Y+c91F0VJNzPVVZoR8Wp8iT4gEDEdVEBanhgx7dbejFfJVoCPxOu+YcwQ/Ky aPb5RkVQ+GjrWBq5CxxA7W6XGJKn0ouAWRmGb9HrkNHoxAR9+vmWePsUMYBp5lGzaWbW AIMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; fh=bhMV5gdVbu13jqnF/jARfHEflCpVPSLbnzD7kGOjemw=; b=OudBHx8qmZb3ZoQjs/LyRgFvUv9qzaBx0YeWj2pFfYRAiz6OU6NtmyE85Qy79QmNby 0NMFwKD0526hyRVt5Lf/8UbYkUlVgtv9jiLDC6wrJ0tbZLKEuE4DkpaBRnaKSHHkFjmr /880XKyUhbRsvOv+o6fCjvrXpoXEv4ln74At1IxZ3rCayj8LNmlVblmbY7Flt4AQFyx/ CUS2+eXlKLgTYGKUfqz6WBGcS36YYZ550kJDrK/8toHRKAiiId6SFOSxkOSzXdxM4TgX O/ynYsCyi3nYTFYWJjrnrtAr3A8iclhG0+z5OPBSCx/T07RLrVbvf0I6paFLn0DYdZAJ CIvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DmvUCoMW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45b526f3c72si41657281cf.529.2024.09.25.10.12.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Sep 2024 10:12:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DmvUCoMW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stVYd-0000rg-An; Wed, 25 Sep 2024 13:12:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stVYR-0000Kk-Ej for qemu-devel@nongnu.org; Wed, 25 Sep 2024 13:11:55 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1stVYM-0000bi-12 for qemu-devel@nongnu.org; Wed, 25 Sep 2024 13:11:53 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3770320574aso10932f8f.2 for ; Wed, 25 Sep 2024 10:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727284307; x=1727889107; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; b=DmvUCoMWt6YjzQP5P9iNrwQIT794xzg1V+2HKnXggV2KY56PniGD3AHAQXp43laCqG I96q95z4osqcz05t+VfffePQgkvlKUuKpd36LJARnVjiyNC6buf3LeCboPoUyiDnMbIm k9gzTGec18NfMoBLbsyqyoRv/rIhEn1ieUdqUxInd6WxPdxH+uS8ht4yDsX/4A8sTnep WFLm6LxUAg38ltdBr7UMUsHAwAJfY6udakoNB97gkQdIevaON8HYeNaf+QbF6dg3JVTh w5vMPcyShbGyMjhFOmbBoK+5ooU6qyinH0TfE4viO1eH4mVu+LnsQd3Lu3biYgXc8oU8 Ey5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727284307; x=1727889107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FXjwiUjPDmRUKmjejukivCx1FVXlutJ/frWtXF30WgI=; b=PeOOQoyRHbdnqhVQ3kKpGS1xukwkGOBdd2Bh9h88c3vBWYbtS6bNah3TMMYFcwZY+e 6ghC/0lWJWKZP1o6+ATbKG1jwcjIz7nFS6HiEUfo8Pbd1geBwjnF5i/93RVgJi2LS4WT hRUfF8caAzx9hG9LIQysN7x8zhywaP6Xzkj51H44fEbimR2+k5ujp1veq5cwmf5O4r2Q OFL/vFcCc2OIRsF5f1UOLQIZgikjVtlPUsU3qfQbABERkIYRlfhXWlMHhQOJngD17b5P Onwk4TIf2D8Qamj9UaEXBQRyoZ9piQSoFTqHcy5b8vsQd66zrYJ9dKxR7PNIcZivpCaw T+iw== X-Gm-Message-State: AOJu0YydLh+g+P475EgISW9e+sIqCcr5H7nxnoAyob3ZpfvYvpj8aCS/ SI+Mfp8xMaRFnY8VSEw5OhjC8H3jUSYRqJYIykytRFZ0+lVX5FD17PdGS5Acwiw= X-Received: by 2002:a5d:6685:0:b0:374:c977:7453 with SMTP id ffacd0b85a97d-37cc24762e0mr2263987f8f.25.1727284307287; Wed, 25 Sep 2024 10:11:47 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e90274aa0sm35547145e9.0.2024.09.25.10.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 10:11:44 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8619C5F92F; Wed, 25 Sep 2024 18:11:40 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , "Edgar E. Iglesias" , Marcel Apfelbaum , Alexandre Iooss , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Pierrick Bouvier , Wainer dos Santos Moschetta , kvm@vger.kernel.org, Jiaxun Yang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , qemu-arm@nongnu.org, Peter Maydell , devel@lists.libvirt.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Marcelo Tosatti , Laurent Vivier , Yanan Wang , Thomas Huth , Beraldo Leal , Ilya Leoshkevich Subject: [PATCH 02/10] tests/docker: Fix microblaze atomics Date: Wed, 25 Sep 2024 18:11:32 +0100 Message-Id: <20240925171140.1307033-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240925171140.1307033-1-alex.bennee@linaro.org> References: <20240925171140.1307033-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich GCC produces invalid code for microblaze atomics. The fix is unfortunately not upstream, so fetch it from an external location and apply it locally. Suggested-by: Peter Maydell Signed-off-by: Ilya Leoshkevich Message-Id: <20240919152308.10440-1-iii@linux.ibm.com> Signed-off-by: Alex Bennée --- .../debian-microblaze-cross.d/build-toolchain.sh | 8 ++++++++ tests/docker/dockerfiles/debian-toolchain.docker | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh index 23ec0aa9a7..c5cd0aa931 100755 --- a/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh +++ b/tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh @@ -10,6 +10,8 @@ TOOLCHAIN_INSTALL=/usr/local TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin CROSS_SYSROOT=${TOOLCHAIN_INSTALL}/$TARGET/sys-root +GCC_PATCH0_URL=https://raw.githubusercontent.com/Xilinx/meta-xilinx/refs/tags/xlnx-rel-v2024.1/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch + export PATH=${TOOLCHAIN_BIN}:$PATH # @@ -31,6 +33,12 @@ mv gcc-11.2.0 src-gcc mv musl-1.2.2 src-musl mv linux-5.10.70 src-linux +# +# Patch gcc +# + +wget -O - ${GCC_PATCH0_URL} | patch -d src-gcc -p1 + mkdir -p bld-hdr bld-binu bld-gcc bld-musl mkdir -p ${CROSS_SYSROOT}/usr/include diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/dockerfiles/debian-toolchain.docker index 687a97fec4..ab4ce29533 100644 --- a/tests/docker/dockerfiles/debian-toolchain.docker +++ b/tests/docker/dockerfiles/debian-toolchain.docker @@ -10,6 +10,8 @@ FROM docker.io/library/debian:11-slim # ??? The build-dep isn't working, missing a number of # minimal build dependiencies, e.g. libmpc. +RUN sed 's/^deb /deb-src /' /etc/apt/sources.list.d/deb-src.list + RUN apt update && \ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ DEBIAN_FRONTEND=noninteractive eatmydata \ @@ -33,6 +35,11 @@ RUN cd /root && ./build-toolchain.sh # and the build trees by restoring the original image, # then copying the built toolchain from stage 0. FROM docker.io/library/debian:11-slim +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + libmpc3 COPY --from=0 /usr/local /usr/local # As a final step configure the user (if env is defined) ARG USER