diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-09-12 21:12:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-13 17:38:07 +0100 |
commit | 025343ed6e7ef9ccb7d3ff629d5e6b2f0f850924 (patch) | |
tree | 353e4013874d31cf13d78b939d13e34841bbbe09 /meta/classes | |
parent | 6c1ed635dfddbec565b9328b9bcf462eea61a558 (diff) | |
download | poky-025343ed6e7ef9ccb7d3ff629d5e6b2f0f850924.tar.gz |
insane: Recognise BPF as a valid EM_MACHINE type
BPF Linux ELF objects are generated with kernel-selftests with
>= 4.18 kernel and when clang is enabled which packages BPF objects
into packages, therefore recongnise this as a valid ELF target
Add a selftest for BPF
Do not flag BPF objects in target, since they pretty much will be ok for
most of kernels architectures we care do support BPF
(From OE-Core rev: 3667a8ec016bae3f8026ef7b4c895546804f6368)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 8c360c83e7..4644221bc6 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -301,8 +301,10 @@ def package_qa_check_arch(path,name,d, elf, messages): | |||
301 | 301 | ||
302 | # Check the architecture and endiannes of the binary | 302 | # Check the architecture and endiannes of the binary |
303 | is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \ | 303 | is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \ |
304 | (target_os == "linux-gnux32" or target_os == "linux-muslx32" or target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE'))) | 304 | (target_os == "linux-gnux32" or target_os == "linux-muslx32" or \ |
305 | if not ((machine == elf.machine()) or is_32): | 305 | target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE'))) |
306 | is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF") | ||
307 | if not ((machine == elf.machine()) or is_32 or is_bpf): | ||
306 | package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \ | 308 | package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \ |
307 | (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d))) | 309 | (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d))) |
308 | elif not ((bits == elf.abiSize()) or is_32): | 310 | elif not ((bits == elf.abiSize()) or is_32): |