[honister] arm/edk2-firmware: correctly set the target prefix in Clang builds

Message ID 20211216144016.3249821-1-ross.burton@arm.com
State New
Headers show
Series [honister] arm/edk2-firmware: correctly set the target prefix in Clang builds | expand

Commit Message

Ross Burton Dec. 16, 2021, 2:40 p.m. UTC
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 <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
 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 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:toolchain-clang = "CLANG38"
 do_configure:prepend() {
     sed -i -e "s#-target ${HOST_ARCH}-linux-gnu*#-target ${HOST_SYS}#" ${S}/BaseTools/Conf/tools_def.template