[oe-commits] [openembedded-core] 07/12: kernel-arch.bbclass: conditional error message
git at git.openembedded.org
git at git.openembedded.org
Thu Apr 20 06:58:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 0b931e983b1f663d5d7dc65f1db7687334dd3ef2
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Sat Apr 8 11:35:25 2017 -0700
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.
Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/kernel-arch.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
index 04c49b9..d036fcf 100644
--- a/meta/classes/kernel-arch.bbclass
+++ b/meta/classes/kernel-arch.bbclass
@@ -32,6 +32,8 @@ def map_kernel_arch(a, d):
elif re.match('microblazee[bl]', a): return 'microblaze'
elif a in valid_archs: return a
else:
+ if not d.getVar("TARGET_OS").startswith("linux"):
+ return a
bb.error("cannot map '%s' to a linux kernel architecture" % a)
export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list