[OE-core] [PATCH 1/1] toolchain-scripts.bbclass: do not expand vars which starts with multilib prefixes

kai.kang at windriver.com kai.kang at windriver.com
Fri Nov 13 09:24:05 UTC 2015


From: Kai Kang <kai.kang at windriver.com>

When set MULTILIBS with two or more items, such as

MULTILIBS = "multilib:lib32 multilib:lib64"

It expands depends once in mutlib.bbclass, and expand again in
toolchain-scripts.bbclass that causes error:

| ERROR: Nothing PROVIDES 'virtual/lib32-lib64-libc'.

Check before expand a var. If starts with a multilib prefix, ignore it.

Signed-off-by: Kai Kang <kai.kang at windriver.com>
---
 meta/classes/toolchain-scripts.bbclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index d0b2b91..3878a42 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -146,7 +146,17 @@ python __anonymous () {
     deps = ""
     for dep in (d.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', True) or "").split():
         deps += " %s:do_populate_sysroot" % dep
-        for variant in (d.getVar('MULTILIB_VARIANTS', True) or "").split():
+
+        ml_variants = (d.getVar('MULTILIB_VARIANTS', True) or "").split()
+        extended = False
+        for variant in ml_variants:
+            if dep.startswith(variant) or dep.startswith('virtual/' + variant):
+                extended = True
+                break
+        if extended:
+            continue
+
+        for variant in ml_variants:
             clsextend = oe.classextend.ClassExtender(variant, d)
             newdep = clsextend.extend_name(dep)
             deps += " %s:do_populate_sysroot" % newdep
-- 
2.6.1




More information about the Openembedded-core mailing list