[PATCH] base: Allow overriding HOST_ARCH

17 views
Skip to first unread message

Dimitri Biermann

unread,
Aug 17, 2026, 5:23:38 AMAug 17
to isar-...@googlegroups.com, felix.mo...@siemens.com, Dimitri Biermann
Commit 9634b274 made HOST_ARCH an unconditional immediate assignment.
This overwrites values supplied through configuration or the BitBake
environment. It prevents creating, for example, an arm64 SDK on an
amd64 build machine.

Evaluate the detected architecture immediately in a separate variable
and retain HOST_ARCH as a weak default.

Fixes: 9634b27488df ("improve performance by immediate evaluation of HOST_ARCH")
Closes: https://github.com/ilbers/isar/issues/127

Signed-off-by: Dimitri Biermann <2mo...@gmail.com>
---
meta/classes-global/base.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index f074eee6..60b15b6f 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -60,7 +60,8 @@ def get_deb_host_arch():
).decode('utf-8').strip()
return host_arch
# immediately evaluate to avoid costly process call
-HOST_ARCH := "${@get_deb_host_arch()}"
+DETECTED_HOST_ARCH := "${@get_deb_host_arch()}"
+HOST_ARCH ??= "${DETECTED_HOST_ARCH}"
HOST_DISTRO ??= "${DISTRO}"

# Inject the PREFERRED_PROVIDERs for multiarch variants. This corresponds to
--
2.50.1 (Apple Git-155)

Zhihang Wei

unread,
Aug 24, 2026, 5:42:11 AM (13 days ago) Aug 24
to Dimitri Biermann, isar-...@googlegroups.com, felix.mo...@siemens.com
Applied to next, thanks.

Zhihang
Reply all
Reply to author
Forward
0 new messages