[PATCH] arm/edk2-firmware: localize BUILD_CC assignments

Ross Burton <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
BUILD_CC and friends are only needed for the build of BaseTools, so move
the assignments to that specific make call.

Signed-off-by: Ross Burton <[email protected]>
---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
index 6d86a68f..92f080bf 100644
--- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
+++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
@@ -81,17 +81,6 @@ EDK_COMPILER:toolchain-clang = "CLANG38"
 export CLANG38_AARCH64_PREFIX = "${TARGET_PREFIX}"
 export CLANG38_ARM_PREFIX = "${TARGET_PREFIX}"
 
-# These variables were changed in edk2 commit
-# 206168e83f0901cbc1815ef5df4ac6598ad9721b, which was part of edk2-202305
-export CC = "${BUILD_CC}"
-export CXX = "${BUILD_CXX}"
-export AS = "${BUILD_AS}"
-export AR = "${BUILD_AR}"
-export LD = "${BUILD_LD}"
-export CFLAGS = "${BUILD_CFLAGS}"
-export CPPFLAGS = "${BUILD_CPPFLAGS}"
-export LDFLAGS = "${BUILD_LFLAGS}"
-
 #FIXME - arm32 doesn't work with clang due to a linker issue
 TOOLCHAIN:arm = "gcc"
 
@@ -108,8 +97,13 @@ do_compile() {
     cp ${EDK_TOOLS_PATH}/Conf/tools_def.template ${S}/Conf/tools_def.txt
     cp ${EDK_TOOLS_PATH}/Conf/target.template ${S}/Conf/target.txt
 
-    # Build basetools
-    oe_runmake -C ${S}/BaseTools
+    # Build basetools for the build host
+    oe_runmake -C ${S}/BaseTools \
+        CC="${BUILD_CC}" \
+        CXX="${BUILD_CXX}" \
+        AS="${BUILD_AS}" \
+        AR="${BUILD_AR}" \
+        LD="${BUILD_LD}"
 
     PATH="${WORKSPACE}:${BTOOLS_PATH}:$PATH" \
     build \
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.