[oe-commits] Richard Purdie : multilib: Fix an OVERRIDES expansion order issue

git at git.openembedded.org git at git.openembedded.org
Thu Feb 14 10:06:07 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 920c9024f5a47ad14670067f910450983bae2aa7
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=920c9024f5a47ad14670067f910450983bae2aa7

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Wed Feb 13 00:21:53 2013 +0000

multilib: Fix an OVERRIDES expansion order issue

There were problems where a SRC_URI with:

SRC_URI_append_powerpc = " xxx"
SRC_URI_append_powerpc64 = " xxx2"

would end up with *both* xxx and xxx2 being added when using a multilib
which is clearly incorrect and undesirable.

The issue is that OVERRIDES has virtclass-multilib-xxxx added to it,
this eventually changed DEFAULTTUNE which then changes
TRANSLATED_TARGET_ARCH which is in OVERRIDES meaning we then need to
re-evaluate the overides and the TRANSLATED_TARGET_ARCH gets applied
twice since once you apply an override, it doesn't get undone.

Expanding DEFAULTTUNE to the correct value in advance avoids the issue
and means only the correct overrides get applied.

[YOCTO #3874]

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/multilib.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index a999b69..3cc470e 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -52,6 +52,11 @@ python multilib_virtclass_handler () {
     e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
     e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
     e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
+
+    # DEFAULTTUNE can change TARGET_ARCH override so expand this now before update_data
+    newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
+    if newtune:
+        e.data.setVar("DEFAULTTUNE", newtune)
 }
 
 addhandler multilib_virtclass_handler





More information about the Openembedded-commits mailing list