arm/edk2-firmware: correctly set the target prefix in Clang builds
PATCH 1/1 arm/edk2-firmware: correctly set the target prefix in Clang builds
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 <[email protected]>
Signed-off-by Jon Mason <[email protected]>
--- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +3 -1
@@ -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
Signature · 1 line
2.25.1