From patchwork Thu Dec 16 14:40:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1604 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 1413DC433EF for ; Thu, 16 Dec 2021 14:40:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.11249.1639665621205123348 for ; Thu, 16 Dec 2021 06:40:21 -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 C8E1112FC for ; Thu, 16 Dec 2021 06:40:18 -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 7350B3F73B for ; Thu, 16 Dec 2021 06:40:18 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH][honister] arm/edk2-firmware: correctly set the target prefix in Clang builds Date: Thu, 16 Dec 2021 14:40:16 +0000 Message-Id: <20211216144016.3249821-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 ; Thu, 16 Dec 2021 14:40:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2729 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 Signed-off-by: Jon Mason --- 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 4b440860..d198a9bd 100644 --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc @@ -53,7 +53,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" @@ -63,7 +62,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