aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-10-23 16:05:23 +0800
committerRobert Yang <liezhi.yang@windriver.com>2018-01-08 18:08:31 +0800
commit52359956e4cba6e2863e7562e43652162673c115 (patch)
tree284e5f824ee558bc4acf903636ee682fe56579f5
parent940149e1fa588e8b33681d9961b71dc2e62e1d90 (diff)
downloadopenembedded-core-contrib-52359956e4cba6e2863e7562e43652162673c115.tar.gz
openembedded-core-contrib-52359956e4cba6e2863e7562e43652162673c115.tar.bz2
openembedded-core-contrib-52359956e4cba6e2863e7562e43652162673c115.zip
staging.bbclass: staging_populate_sysroot_dir(): fix for multilib
Fixed: MACHINE = "qemux86-64" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" $ bitbake core-image-sato lib32-core-image-sato $ bitbake build-sysroots All lib32 manifests which had been built should be installed, but only a few such as qemux86_64-lib32-base-files were installed (it was installed because MACHINE_ARCH was still qemux86-64 when multilib), but others such as x86-lib32-zlib were not installed, this was incorrect. For multilib builds, fix-up overrides to prepend :virtclass-multilib- and then again append additional multilib arches from the PACKAGE_EXTRA_ARCHS list if needed can fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/classes/staging.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 412e269bd2e..455eb056f0f 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -190,8 +190,23 @@ 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')
+
+ # Handle multilib archs
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for variant in variants.split():
+ localdata = bb.data.createCopy(d)
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+ localdata.setVar("OVERRIDES", overrides)
+ bb.data.update_data(localdata)
+ pkgarchs_ml = localdata.getVar('PACKAGE_EXTRA_ARCHS').split()
+ for arch in pkgarchs_ml:
+ if arch not in pkgarchs:
+ pkgarchs.append(arch)
+
targetdir = targetsysroot
+ bb.debug(1, 'pkgarchs: %s' % pkgarchs)
+
bb.utils.mkdirhier(targetdir)
for pkgarch in pkgarchs:
for manifest in glob.glob(d.expand("${SSTATE_MANIFESTS}/manifest-%s-*.populate_sysroot" % pkgarch)):