multilib_global: Fix PREFERRED_VERSION mapping for gcc-cross-canadian

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.

(From OE-Core rev: c4b3540fc2b66730e021dd0b0c89b0fbe9dbf77a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2015-07-31 11:29:35 +01:00
parent d3f991a539
commit ac692c6af7
1 changed files with 4 additions and 1 deletions

View 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)