]> code.ossystems Code Review - openembedded-core.git/commitdiff
multilib_global: Fix PREFERRED_VERSION mapping for gcc-cross-canadian
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 Jul 2015 10:29:35 +0000 (11:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 Jul 2015 14:15:12 +0000 (15:15 +0100)
Our multilib cross toolchains have <ml_prefix> as a prefix however we
only have a single gcc-cross-canadian for each arch and it is not
prefixed even in the multilib case. We can have two versions of
gcc-cross-canadian, 32 and 64 bit.

This fixes the multilib PREFERRED_VERSION mapping code so that
no prefix is added to the preferred version and therefore the
right versions of gcc-cross-canadian are used.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/multilib_global.bbclass

index ed34404117f1dae3caf43f82bfa1b05985841993..612cfb6919407a71114f15c2398ccd0d1a601c87 100644 (file)
@@ -30,7 +30,10 @@ def preferred_ml_updates(d):
                 override = ":virtclass-multilib-" + p
                 localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
                 bb.data.update_data(localdata)
-                newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
+                if "-canadian-" in pkg:
+                    newname = localdata.expand(v)
+                else:
+                    newname = localdata.expand(v).replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p + '-')
                 if newname != v:
                     newval = localdata.expand(val)
                     d.setVar(newname, newval)