From patchwork Fri Dec 3 13:26:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1030 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25D08C433F5 for ; Fri, 3 Dec 2021 13:26:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11354.1638537970338999812 for ; Fri, 03 Dec 2021 05:26:10 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BE63F1477 for ; Fri, 3 Dec 2021 05:26:09 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 64B983F5A1 for ; Fri, 3 Dec 2021 05:26:09 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH v2 1/3] arm/edk2-firmware: correctly set the target prefix in Clang builds Date: Fri, 3 Dec 2021 13:26:05 +0000 Message-Id: <20211203132607.2648640-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 Dec 2021 13:26:11 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2526 We set GCC5_AARCH64_PREFIX so the tools are prefixed correctly in GCC builds, but didn't set CLANG38_AARCH64_PREFIX. This meant the clang build used the host objcopy, which may not know about the target architecture. Also these can just be the prefix and not a full path, as the binaries are on $PATH. Signed-off-by: Ross Burton --- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc index 7072d1b4..cfe30652 100644 --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc @@ -58,7 +58,6 @@ LDFLAGS[unexport] = "1" do_configure[cleandirs] += "${B}" # Set variables as per envsetup -export GCC5_AARCH64_PREFIX = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}" export PACKAGES_PATH = "${S}:${S}/edk2-platforms" export WORKSPACE = "${B}" export EDK_TOOLS_PATH = "${S}/BaseTools" @@ -68,7 +67,10 @@ export CONF_PATH = "${S}/Conf" export BTOOLS_PATH = "${EDK_TOOLS_PATH}/BinWrappers/PosixLike" EDK_COMPILER ?= "GCC5" +export GCC5_AARCH64_PREFIX = "${TARGET_PREFIX}" + EDK_COMPILER:toolchain-clang = "CLANG38" +export CLANG38_AARCH64_PREFIX = "${TARGET_PREFIX}" do_configure:prepend() { sed -i -e "s#-target ${HOST_ARCH}-linux-gnu*#-target ${HOST_SYS}#" ${S}/BaseTools/Conf/tools_def.template From patchwork Fri Dec 3 13:26:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E581AC433EF for ; Fri, 3 Dec 2021 13:26:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.11601.1638537970626671808 for ; Fri, 03 Dec 2021 05:26:10 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4FBAE1396 for ; Fri, 3 Dec 2021 05:26:10 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EF84D3F5A1 for ; Fri, 3 Dec 2021 05:26:09 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH v2 2/3] arm/edk2-firmware: force debug builds when using Clang Date: Fri, 3 Dec 2021 13:26:06 +0000 Message-Id: <20211203132607.2648640-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211203132607.2648640-1-ross.burton@arm.com> References: <20211203132607.2648640-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 Dec 2021 13:26:11 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2527 edk2-firmware release builds with clang fail: MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:142:15: error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable] This is upstream as https://bugzilla.tianocore.org/show_bug.cgi?id=3758, but until that is resolved we can just force debug builds with clang. Signed-off-by: Ross Burton --- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc index cfe30652..d8c744df 100644 --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc @@ -26,6 +26,10 @@ COMPATIBLE_MACHINE ?= "invalid" PACKAGE_ARCH = "${MACHINE_ARCH}" EDK2_BUILD_RELEASE = "1" +# Release builds don't work with clang yet: +# https://bugzilla.tianocore.org/show_bug.cgi?id=3758 +EDK2_BUILD_RELEASE:toolchain-clang = "0" + EDK2_PLATFORM = "unset" # build --platform EDK2_PLATFORM_DSC = "unset" From patchwork Fri Dec 3 13:26:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1BFEC433FE for ; Fri, 3 Dec 2021 13:26:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.11602.1638537971226786539 for ; Fri, 03 Dec 2021 05:26:11 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DF56F1477 for ; Fri, 3 Dec 2021 05:26:10 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 81EF73F5A1 for ; Fri, 3 Dec 2021 05:26:10 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH v2 3/3] CI: also build qemu-generic-arm64 for clang Date: Fri, 3 Dec 2021 13:26:07 +0000 Message-Id: <20211203132607.2648640-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211203132607.2648640-1-ross.burton@arm.com> References: <20211203132607.2648640-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 Dec 2021 13:26:11 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2528 Signed-off-by: Ross Burton --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be522fc8..b2a4c438 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,7 +177,8 @@ qemu-generic-arm64: extends: .build parallel: matrix: - - TESTING: testimage + - TOOLCHAINS: [gcc, clang] + TESTING: testimage qemuarm64-secureboot: extends: .build