* [PATCH] multilib: Fix an OVERRIDES expansion order issue
@ 2013-02-13 0:21 Richard Purdie
2013-02-13 0:27 ` Mark Hatle
2013-02-13 3:33 ` Peter Seebach
0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2013-02-13 0:21 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 5454b4c..d52f721 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -51,6 +51,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("SHL
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)
+ if newtune:
+ e.data.setVar("DEFAULTTUNE", newtune)
}
addhandler multilib_virtclass_handler
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] multilib: Fix an OVERRIDES expansion order issue
2013-02-13 0:21 [PATCH] multilib: Fix an OVERRIDES expansion order issue Richard Purdie
@ 2013-02-13 0:27 ` Mark Hatle
2013-02-13 3:33 ` Peter Seebach
1 sibling, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2013-02-13 0:27 UTC (permalink / raw)
To: openembedded-core
On 2/12/13 6:21 PM, Richard Purdie wrote:
Please add:
[ YOCTO #3874 ]
to the commit message. (The problem is complex enough, that the bugzilla entry
is helpful in understanding why this is needed.)
> 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.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
> index 5454b4c..d52f721 100644
> --- a/meta/classes/multilib.bbclass
> +++ b/meta/classes/multilib.bbclass
> @@ -51,6 +51,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("SHL
> 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)
> + if newtune:
> + e.data.setVar("DEFAULTTUNE", newtune)
> }
>
> addhandler multilib_virtclass_handler
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] multilib: Fix an OVERRIDES expansion order issue
2013-02-13 0:21 [PATCH] multilib: Fix an OVERRIDES expansion order issue Richard Purdie
2013-02-13 0:27 ` Mark Hatle
@ 2013-02-13 3:33 ` Peter Seebach
1 sibling, 0 replies; 3+ messages in thread
From: Peter Seebach @ 2013-02-13 3:33 UTC (permalink / raw)
To: openembedded-core
On Wed, 13 Feb 2013 00:21:53 +0000
Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> + # DEFAULTTUNE can change TARGET_ARCH override so expand this now
> before update_data
> + newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" +
> variant)
I was going to ask whether this wants a ", True", but it occurs to me
that I think it actually doesn't.
At which point I feel I should ask: Should there be an explicit
", False" so it doesn't get corrected in a later patch?
-s
--
Listen, get this. Nobody with a good compiler needs to be justified.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-13 3:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-13 0:21 [PATCH] multilib: Fix an OVERRIDES expansion order issue Richard Purdie
2013-02-13 0:27 ` Mark Hatle
2013-02-13 3:33 ` Peter Seebach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox