public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] base: Fix HOST_ARCH for native builds
@ 2023-09-18  8:04 Jan Kiszka
  2023-09-21  5:57 ` Uladzimir Bely
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2023-09-18  8:04 UTC (permalink / raw)
  To: isar-users; +Cc: Moessbauer, Felix (T CED SES-DE)

From: Jan Kiszka <jan.kiszka@siemens.com>

HOST_ARCH must be DISTRO_ARCH when we are not cross-building. Otherwise,
recipes that set PACKAGE_ARCH to it will fail in native builds.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Affects specifically the starfive packages.

 meta/classes/base.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 88004120..f315a9d5 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -49,13 +49,15 @@ def oe_import(d):
 # We need the oe module name space early (before INHERITs get added)
 OE_IMPORTED := "${@oe_import(d)}"
 
-def get_deb_host_arch():
+def get_deb_host_arch(d):
     import subprocess
+    if d.getVar("ISAR_CROSS_COMPILE") != "1":
+        return d.getVar("DISTRO_ARCH")
     host_arch = subprocess.check_output(
         ["dpkg", "--print-architecture"]
     ).decode('utf-8').strip()
     return host_arch
-HOST_ARCH ??= "${@get_deb_host_arch()}"
+HOST_ARCH ??= "${@get_deb_host_arch(d)}"
 HOST_DISTRO ??= "${DISTRO}"
 
 die() {
-- 
2.35.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-21 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-18  8:04 [PATCH] base: Fix HOST_ARCH for native builds Jan Kiszka
2023-09-21  5:57 ` Uladzimir Bely
2023-09-21 10:36   ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox