Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian
@ 2015-07-03  8:40 Robert Yang
  2015-07-03  8:40 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2015-07-03  8:40 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit dd09fab685de2eaf04aa5ab60f8220b89c1deae9:

  tune-core2.inc: set X86ARCH32 to i686 (instead of i586) (2015-07-02 23:08:27 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/cross
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/corss

Robert Yang (1):
  multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian

 meta/classes/multilib_global.bbclass |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian
  2015-07-03  8:40 [PATCH 0/1] multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian Robert Yang
@ 2015-07-03  8:40 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2015-07-03  8:40 UTC (permalink / raw)
  To: openembedded-core

Fixed:
When both gcc 4.9 and 5.1 are in the layer, and set these in local.conf:
GCCVERSION = "4.9%"
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake gcc-cross-canadian-i586

Then gcc 5.1 would be built rather than 4.9, it is because
multilib_virtclass_handler() doesn't reset PN such as gcc-cross-canadian
to lib32-gcc-cross-canadian, but preferred_ml_updates() rename
PREFERRED_VERSION_gcc-cross-canadian to
PREFERRED_VERSION_lib32-gcc-cross-canadian, so it can't get the required
value PREFERRED_VERSION_gcc-cross-canadian, and then gcc 5.1 would be
used, don't reset it in preferred_ml_updates() will fix the problem.

[YOCTO #7950]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/multilib_global.bbclass |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index 67bd70d..a9c0efc 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/"):
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-03  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-03  8:40 [PATCH 0/1] multilib_global.bbclass: fix PREFERRED_VERSION for cross-canadian Robert Yang
2015-07-03  8:40 ` [PATCH 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox