From patchwork Wed Oct 23 11:33:49 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: 837803 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f12:b0:37d:45d0:187 with SMTP id hh18csp405506wrb; Wed, 23 Oct 2024 04:35:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnwvI3qarDSgpYOoe0N0Yi6HWChIkKbvQ4R2pLZAx3CnLrzlh/9bySrXN+GS1e4HkAL9jDlg==@linaro.org X-Google-Smtp-Source: AGHT+IGYEqis5/HQjgjBH7jSH74lcx3zrd5lrrsReNkSagc8IRJ5sDV4gJk13iABy/2BcRFMbQmZ X-Received: by 2002:a05:6214:88e:b0:6cb:ef96:c79e with SMTP id 6a1803df08f44-6ce342f47b3mr23060166d6.34.1729683304709; Wed, 23 Oct 2024 04:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729683304; cv=none; d=google.com; s=arc-20240605; b=AuyUn7L+YBK+NHF2mlrvflmbp/b2FRN+5jY/tCfX4jGPQrabhjdDRR7SEnGjasaIVH 3zTrMC0BLLrgL0rR97Agt370eXuBEybYSd78zemkBLVdjh7TeYOzqd/M0zgGXJlNj1at V0toF1eZv0AQbagLKTXFqBOaJaobX0CwxV6SFMeGsd59EwsYaJMFSDlEm+wyZa0N5VJ7 9Cd09334qU7Af1g92RuAyj7V6onhyz8gMMNjrI1vlG7wBrjC3GJhGoiGp2fRj98ctM9O iI8Dygw83nBl9TrwjMYZZQyM1DAoIsPi5MeArLtE6XsZYyFyMcAxyGM3rWX0FkeaQ3qJ 4Wqg== 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=+XNjfi7hRi9preQg6Skm6jboyJIHM73C5JCjrQ/Fxa0=; fh=p+eKEdn09QHzHdwfHiKY3bz9+G3n7au2l3N4h9YZqkc=; b=hA3eVZwJXg5cnvL2AvX2JP7WsRTnpDrWKpySKUwu5FvT+aWyPfOPju3rQf2lT1LvoS Oz7LSz7eeruTTO+bxjhNtUH/82tTUrIBFPFjPzL2AGFTac5TwLTIt237xzMcAP+ij5Mw 9FSj1zv7cb3WoaNyrrPguCoyBA9lZk57Rkf1QWPFQ5tQK2X+cBZshODi/+ErpeP6R9Dm lTWDAqGzKDkPe1aKv5ikuyCOkD+89DHEoVHJnmImJZtwabYhc9xGwAVEfmejrLQV64Th 27qk3LLuHd4jqVBDCLNTY+y8WqFB+1pIjaITk3Gj7H7r462Amn8yNL6jwiQHu+4pPp5T j87A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gSmwH/Q7"; 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 6a1803df08f44-6ce008f3f7esi85877806d6.137.2024.10.23.04.35.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Oct 2024 04:35:04 -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="gSmwH/Q7"; 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 1t3ZdB-0007KO-OX; Wed, 23 Oct 2024 07:34:25 -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 1t3Zd2-0007DN-Rp for qemu-devel@nongnu.org; Wed, 23 Oct 2024 07:34:16 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3Zcy-00033q-2e for qemu-devel@nongnu.org; Wed, 23 Oct 2024 07:34:14 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5c95a962c2bso8038746a12.2 for ; Wed, 23 Oct 2024 04:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729683249; x=1730288049; 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=+XNjfi7hRi9preQg6Skm6jboyJIHM73C5JCjrQ/Fxa0=; b=gSmwH/Q7+/Rr63a5baY/EhChgY05Q+7PZiQg5QMVSsfGV/n6SwHdDJrX6PesT8nIMK MzmwJjrzf+eucnctEoNIT3GNuFAMf1+5eoOnTPCbupzGMgseX1vvMP+AD5aQWqLPMFDt v/GdB8TpJGt4TJC12Lt6a95pR831IwU3cs+GZX/lSAFjQQLxhxOcbTajXKYtk9hXNl6d KSNgF95du3C5sTwTSKqeKuFJHfO+NOxh77lBSss1lNLoapIIFb9OxKgAKk+p+HEUtqD1 ZTctnlWF9ctvXbGY9f8PdqNkzcTP7dfyAv1iHqjBc2W/UonqxXCJrPEGhaBXAwyPdmSh b2xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729683249; x=1730288049; 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=+XNjfi7hRi9preQg6Skm6jboyJIHM73C5JCjrQ/Fxa0=; b=XwjhhQ6acA6tEnJeWcqHTPslswawVkeH6H6cSRoQbzNxKFxBOMfyUv1z3hUWnRAd2z RY0wu4LDG1O5ub+TGy96Nw2dtJ0LnBYI5UsEJW0hbvefe6yCfE3AO3iL6M4ZDvbcqCBv ZGGNjMQ+8ONnJFRNGnFBqcdMVH+4mq1Ps86Ia0KTduHUQrAxWDsM49QFmiilkbuNXOOP RLO5r46fwQL4qGxwZaaHVRskmPADzKDRPJ02dmpZLKVCdmgjWaBtuyJTTsi1vDQAPFIG /bOE2dR5vDXhax29iZDBuFAyv4nma+3ADInfRuBxU3jfT7XnQs245N1mZhsJk1oMFnAG 8ADw== X-Gm-Message-State: AOJu0YyHiPW5TNzrF/4+sAZ/8GacI/odiT5ao3yTSDJ23IMFiEJU4khc M4aOb31xBUfjD49HTwMkcuVsGdl4DbBdDEx1eXfdoBLHGoclW3NLgE/U7gr6ols= X-Received: by 2002:a05:6402:434c:b0:5c4:51b3:d75f with SMTP id 4fb4d7f45d1cf-5cb8af72080mr1849170a12.24.1729683248677; Wed, 23 Oct 2024 04:34:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb766710d1sm2661378a12.90.2024.10.23.04.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 04:34:07 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 11D8C5F8AD; Wed, 23 Oct 2024 12:34:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Eduardo Habkost , Pierrick Bouvier , Peter Maydell , Yanan Wang , John Snow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , devel@lists.libvirt.org, Marcelo Tosatti , Riku Voipio , Wainer dos Santos Moschetta , Marcel Apfelbaum , Paolo Bonzini , Mahmoud Mandour , Laurent Vivier , Jiaxun Yang , "Edgar E. Iglesias" , Richard Henderson , Alexandre Iooss , qemu-arm@nongnu.org, =?utf-8?q?Daniel_?= =?utf-8?q?P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Cleber Rosa , kvm@vger.kernel.org, Beraldo Leal , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Ilya Leoshkevich Subject: [PATCH v3 01/18] tests/docker: Fix microblaze atomics Date: Wed, 23 Oct 2024 12:33:49 +0100 Message-Id: <20241023113406.1284676-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023113406.1284676-1-alex.bennee@linaro.org> References: <20241023113406.1284676-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.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, RCVD_IN_DNSWL_NONE=-0.0001, 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 Reviewed-by: Pierrick Bouvier Message-Id: <20241022105614.839199-2-alex.bennee@linaro.org> 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