Hi Alexander,

On 05/26/2018 05:51 PM, Alexander Kanavin wrote:
On 05/25/2018 05:48 AM, Robert Yang wrote:
+def buildcfg_multilibs(d):
+    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)
+        statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
+        for var in statusvars:
+            origvalue = d.getVar(var, True)
+            variantvalue = localdata.getVar(var, True)
+            if origvalue is not None and variantvalue is not None and origvalue != variantvalue:
+                yield '%-7s %-17s = "%s"' % (variant + ":", var, variantvalue)
+

There are helper functions in utils.bbclass that take care of multilib datastore setup, please use them instead of re-implementing what they do. USe all_multlilib_tune_values() in particular.

Thanks for the reply, but I'm afraid that all_multlilib_tune_values() isn't
suitable for this case, what need to display is something like:

lib32:  DEFAULTTUNE       = "x86"
lib32:  TARGET_SYS        = "i686-pokymllib32-linux"
lib32:  TUNE_FEATURES     = "m32"

But all_multlilib_tune_values() returns all values, e.g:

DEFAULTTUNE       = "core2-64 x86"

If there is only one multilib variant, it can work if we remove "core2-64" from
DEFAULTTUNE, then we will get "x86", but if there are multiple multilib
variants, e.g., lib32 and lib64, then
all_multlilib_tune_values(d, 'DEFAULTTUNE') is:

DEFAULTTUNE       = "core2-64 x86 <foo>"

We don't know how to strip x86 for lib32, or <foo> for lib64. So I think that
the current implementation is a must.

// Robert



Alex

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to