Add support to compile source for multilib in the eSDK
v2 cover Add support to compile source for multilib in the eSDK
* Install multilib toolchain in the eSDK if multilib configuration is enabled during the eSDK build.
* Search multilib manifest files to populate multilib packages such as lib32-gcc-runtime during the eSDK installation.
Jagadeesh Krishnanjanappa (2):
meta-extsdk-toolchain: Install multilib toolchain files in the eSDK if
multilib is enabled
staging: parse multilib sstate manifest files to install multilib
packages in the eSDK
meta/classes-global/staging.bbclass | 6 ++++++ .../recipes-core/meta/meta-extsdk-toolchain.bb | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.5
PATCH v2 1/2 meta-extsdk-toolchain: Install multilib toolchain files in the eSDK if multilib is enabled
From: Jagadeesh Krishnanjanappa <[email protected]>
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.
Changes in v2:
* Replace all_multilib_tune_values() with oe.utils.all_multilib_tune_values() as functions from utils.bbclass are moved to utils.py.
[YOCTO #14020]
--- .../recipes-core/meta/meta-extsdk-toolchain.bb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
meta/recipes-core/meta/meta-extsdk-toolchain.bb +17 -1
@@ -2,7 +2,23 @@ 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" + +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 + +DEPENDS = "virtual/libc ${MLPREFIX}gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native ${@add_multilib_depends(d)}" + +# Search the SPDX document of multilib recipe in multilib tune configuration directory. +SPDX_MULTILIB_SSTATE_ARCHS = "${@oe.utils.all_multilib_tune_values(d, 'SSTATE_ARCHS')}" do_populate_sysroot[deptask] = "do_populate_sysroot"
Signature · 1 line
2.39.5
PATCH v2 2/2 staging: parse multilib sstate manifest files to install multilib packages in the eSDK
In reply to Jagadeesh KFrom: Jagadeesh Krishnanjanappa <[email protected]>
Since the multilib-DEFAULTTUNE is not part of <pkgarch> of staging_populate_sysroot_dir function, the SSTATE_MANFILEPREFIX files of multilib packages are not parsed and due to this multilib package files are not populated in the <eSDK_install_dir>/tmp/sysroots during the installation of the eSDK. Hence, the eSDK sysroots lacks header files required to compile source for multilib.
For example:
The header file bits/c++config.h given by lib32-gcc-runtime recipe, is not populated in the <eSDK_install_directory>/tmp/sysroots by the staging_populate_sysroot_dir function as <pkgarch> list does not contains multilib-DEFAULTTUNE (i.e 'x86' in case of qemux86-64).
This change adds multilib-DEFAULTTUNE to <pkgarch> list and thereby parsing multilib SSTATE_MANFILEPREFIX files and populating multilib package files during the eSDK installation.
[YOCTO #14020]
--- meta/classes-global/staging.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)
meta/classes-global/staging.bbclass +6 -0
@@ -204,6 +204,12 @@ def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d): pkgarchs = ['${MACHINE_ARCH}'] pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split())) pkgarchs.append('allarch') + multilibs = d.getVar('MULTILIB_VARIANTS').split() + if multilibs: + for ml in multilibs: + mltunes = d.getVar('DEFAULTTUNE:virtclass-multilib-%s' % ml) + if mltunes: + pkgarchs.append(mltunes) targetdir = targetsysroot bb.utils.mkdirhier(targetdir)
Signature · 1 line
2.39.5