diff mbox series

[1/2] meta-extsdk-toolchain: Install multilib toolchain files in the eSDK if multilib is enabled

Message ID 20261001174220.3492439-2-workjagadeesh@gmail.com
State New
Headers show
Series Add support to compile source for multilib in the eSDK | expand

Commit Message

Jagadeesh K Oct. 1, 2026, 5:42 p.m. UTC
1. Ship multilib virtual/cross-cc, virtual/compilerlibs, and virtual/libc
packages in the eSDK if it is created with multilib configuration. These
packages are required to compile source for multilib using the eSDK.

2. Include multilib tune configuration directory in SPDX_MULTILIB_SSTATE_ARCHS
to search SPDX document as meta-extsdk-toolchain is dependent on multilib recipes.

[YOCTO #14020]

Signed-off-by: Jagadeesh K <workjagadeesh@gmail.com>
---
 meta/recipes-core/meta/meta-extsdk-toolchain.bb | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/meta/recipes-core/meta/meta-extsdk-toolchain.bb
index 16fe185964..2b30d89b4d 100644
--- a/meta/recipes-core/meta/meta-extsdk-toolchain.bb
+++ b/meta/recipes-core/meta/meta-extsdk-toolchain.bb
@@ -2,7 +2,22 @@  SUMMARY = "Extensible SDK toolchain meta-recipe"
 DESCRIPTION = "Meta-recipe for ensuring the build directory contains all appropriate toolchain packages for using an IDE"
 LICENSE = "MIT"
 
-DEPENDS = "virtual/libc ${MLPREFIX}gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
+DEPENDS = "virtual/libc ${MLPREFIX}gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native ${@add_multilib_depends(d)}"
+
+def add_multilib_depends(d):
+    mlpkgs = ""
+    for v in d.getVar('MULTILIB_VARIANTS').split():
+        localdata = bb.data.createCopy(d)
+        override = ":virtclass-multilib-" + v
+        localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
+        for p in localdata.getVar('BASEDEPENDS').split():
+            pkg = localdata.getVar("PREFERRED_PROVIDER_%s" % p)
+            if pkg:
+                mlpkgs = mlpkgs + ' ' + v + '-' + pkg
+    return mlpkgs
+
+# Search the SPDX document of multilib recipe in multilib tune configuration directory.
+SPDX_MULTILIB_SSTATE_ARCHS = "${@all_multilib_tune_values(d, 'SSTATE_ARCHS')}"
 
 do_populate_sysroot[deptask] = "do_populate_sysroot"