[OE-core] [PATCH 4/6] multilib.bbclass: install all bits toochains when populate mlprefix SDK

Robert Yang liezhi.yang at windriver.com
Wed Sep 16 02:04:12 UTC 2015


Fixed when:
$ bitbake lib32-core-image-minimal  -cpopulate_sdk

Only 32 bit toolchain was installed but there were both
environment-setup-core2-64-poky-linux and
environment-setup-core2-64-pokymllib32-linux in extracted sdk, this was
becase multilib.bbclass mapped TOOLCHAIN_TARGET_TASK into only lib32-
ones, and dropped 64 bit ones. This patches fixes the problem.

[YOCTO #8089]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/classes/multilib.bbclass |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 8f61d8d..465e208 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -94,8 +94,22 @@ python __anonymous () {
         d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "")
 
     if bb.data.inherits_class('populate_sdk_base', d):
+        orig_task = (d.getVar('TOOLCHAIN_TARGET_TASK', True) or "").split()
+        orig_task_attemptonly = (d.getVar('TOOLCHAIN_TARGET_TASK_ATTEMPTONLY', True) or "").split()
         clsextend.map_depends_variable("TOOLCHAIN_TARGET_TASK")
         clsextend.map_depends_variable("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY")
+        # Append original tasks since all bits (such as 32 and 64)
+        # toolchains should be installed when mutilib.
+        task = (d.getVar('TOOLCHAIN_TARGET_TASK', True) or "").split()
+        task_attemptonly = (d.getVar('TOOLCHAIN_TARGET_TASK_ATTEMPTONLY', True) or "").split()
+        for t in orig_task:
+            if t not in task:
+                task.append(t)
+        for t in orig_task_attemptonly:
+            if t not in task_attemptonly:
+                task_attemptonly.append(t)
+        d.setVar("TOOLCHAIN_TARGET_TASK", " ".join(task))
+        d.setVar("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", " ".join(task_attemptonly))
 
     if bb.data.inherits_class('image', d):
         return
-- 
1.7.9.5




More information about the Openembedded-core mailing list