diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-15 10:03:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-11 17:39:48 +0000 |
commit | 78a2eeea4e2ef867437c315337b9188e1f3fa759 (patch) | |
tree | 4749c405ead31ffded3a3ebe45eaec9f4b905bd7 /meta/classes | |
parent | 72ff97a2ec225bafb83be56ca1b8c3c4e68a0c55 (diff) | |
download | openembedded-core-78a2eeea4e2ef867437c315337b9188e1f3fa759.tar.gz openembedded-core-78a2eeea4e2ef867437c315337b9188e1f3fa759.tar.bz2 openembedded-core-78a2eeea4e2ef867437c315337b9188e1f3fa759.zip |
cross-canadian/meta-environment: Allow modification of TARGET_OS to be optional
There are some cases we want the manipulation cross-canadian performance
on TARGET_OS, there are also cases like meta-environment where we do not
want this manipulation.
We did try and use immediate expansion to avoid this problem and it
works in the non multilib case. If we have a multilib that used an
extension, like for example:
require conf/multilib.conf
MULTILIBS = "multilib:lib32 multilib:lib64"
DEFAULTTUNE = "mips32r2"
DEFAULTTUNE_virtclass-multilib-lib32 = "mips64-n32"
DEFAULTTUNE_virtclass-multilib-lib64 = "mips64"
then the n32 extension case will be misconfigured.
It turns out saving an unexpanded variable is hard. The best I could
come up with was:
SAVEDTOS := "${@d.getVar('TARGET_OS', False).replace("{", "*")}"
and then
localdata.setVar("TARGET_OS", d.getVar("SAVEDOS", False).replace('*','{'))
which is rather evil, I'd challenge someone to come up with a nicer way
of making it work though!
Rather than the above madness, we modify cross-canadian to make the
problamtic code conditional.
This fixes the original issue (where a linux-gnuspe target was seeing
'linux') of
http://cgit.openembedded.org/openembedded-core/commit/?id=0038634ee6e2b6035c023a2702547f20f67c103a
but also fixes the multilib one.
(From OE-Core rev: 85ff3d6491c54aa712ed238c561742cda4f4ba07)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index fec6438c60..a8565e91e3 100644 --- a/meta/classes/cross-canadian.bbclass +++ b/meta/classes/cross-canadian.bbclass @@ -16,6 +16,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S # PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" CANADIANEXTRAOS = "" +MODIFYTOS ??= "1" python () { archs = d.getVar('PACKAGE_ARCHS', True).split() sdkarchs = [] @@ -23,6 +24,9 @@ python () { sdkarchs.append(arch + '-${SDKPKGSUFFIX}') d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) + # Allow the following code segment to be disabled, e.g. meta-environment + if d.getVar("MODIFYTOS", True) != "1": + return # PowerPC can build "linux" and "linux-gnuspe" tarch = d.getVar("TARGET_ARCH", True) if tarch == "powerpc": |