Skip to contentSkip to conversation

arm/edk2-firmware: localize BUILD_CC assignments

PATCH Applied Ross Burton 2 participants 2 messages Jun 13, 2025 – Jun 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/edk2-firmware: localize BUILD_CC assignments

BUILD_CC and friends are only needed for the build of BaseTools, so move the assignments to that specific make call.

---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +7 -13
index 6d86a68f..92f080bf 100644
@@ -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 \
Signature · 1 line
2.43.0
Applied
#1 lore raw
Quoted 4 lines · Ross Burton

BUILD_CC and friends are only needed for the build of BaseTools, so move the assignments to that specific make call.

Applied, thanks!

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

      commit: 043d8c94f5c62802a8fcbcb5f551984f2ef00a89

Best regards,

Signature · 1 line
Jon Mason <[email protected]>