summaryrefslogtreecommitdiffstats
path: root/meta/classes/multilib_global.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/multilib_global.bbclass')
-rw-r--r--meta/classes/multilib_global.bbclass15
1 files changed, 12 insertions, 3 deletions
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index 67bd70d293..a9c0efc37a 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -30,7 +30,16 @@ 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 + '-')
+ # Because multilib_virtclass_handler() doesn't reset PN such as
+ # gcc-cross-canadian to lib32-gcc-cross-canadian, so don't
+ # reset PREFERRED_VERSION_gcc-cross-canadian to
+ # PREFERRED_VERSION_lib32-gcc-cross-canadian, just expand v
+ # (need expand TRANSLATED_TARGET_ARCH) and set
+ # PREFERRED_VERSION_gcc-cross-canadian again.
+ if '-cross-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)
@@ -49,7 +58,7 @@ def preferred_ml_updates(d):
pkg = prov.replace("PREFERRED_PROVIDER_", "")
if pkg.endswith("-native") or "-crosssdk-" in pkg or pkg.startswith(("nativesdk-", "virtual/nativesdk-")):
continue
- if 'cross-canadian' in pkg:
+ if '-cross-canadian-' in pkg:
for p in prefixes:
localdata = bb.data.createCopy(d)
override = ":virtclass-multilib-" + p
@@ -94,7 +103,7 @@ def preferred_ml_updates(d):
mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
extramp = []
for p in mp:
- if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in p:
+ if p.endswith("-native") or "-crosssdk-" in p or p.startswith(("nativesdk-", "virtual/nativesdk-")) or '-cross-canadian-' in p:
continue
virt = ""
if p.startswith("virtual/"):