diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-04-08 11:35:25 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-20 07:55:26 +0100 |
commit | 7f0f7df8b3f699340382b35a4c599b0ac0bcc0f9 (patch) | |
tree | 1ec56b48682bf4b18a8a58ad75d1ad8d70afa641 /meta/classes/kernel-arch.bbclass | |
parent | 9cb58a7f2b1329d60e8e7c9af2291f548cb651e0 (diff) | |
download | poky-7f0f7df8b3f699340382b35a4c599b0ac0bcc0f9.tar.gz |
kernel-arch.bbclass: conditional error message
The single purpose of "map_kernel_arch" is to set
export ARCH = "some-arch"
The case when "some-arch" is not a valid Linux architecture results in an error.
This makes sense if the TARGET_OS is Linux, but that is not always the case.
kernel-arch is also inherited by toolchain-script, which may be used to build
toolchains for architectures not supported by Linux.
Rather than modifying toolchain-script to provide its own version of "map_arch"
this patch bypasses the error if the TARGET_OS is not linux.
(From OE-Core rev: 0b931e983b1f663d5d7dc65f1db7687334dd3ef2)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-arch.bbclass')
-rw-r--r-- | meta/classes/kernel-arch.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass index 04c49b9d24..d036fcf20c 100644 --- a/meta/classes/kernel-arch.bbclass +++ b/meta/classes/kernel-arch.bbclass | |||
@@ -32,6 +32,8 @@ def map_kernel_arch(a, d): | |||
32 | elif re.match('microblazee[bl]', a): return 'microblaze' | 32 | elif re.match('microblazee[bl]', a): return 'microblaze' |
33 | elif a in valid_archs: return a | 33 | elif a in valid_archs: return a |
34 | else: | 34 | else: |
35 | if not d.getVar("TARGET_OS").startswith("linux"): | ||
36 | return a | ||
35 | bb.error("cannot map '%s' to a linux kernel architecture" % a) | 37 | bb.error("cannot map '%s' to a linux kernel architecture" % a) |
36 | 38 | ||
37 | export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" | 39 | export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" |