[3/3] insane: add support for ARM64 ILP32

Message ID 1510596387-27934-3-git-send-email-daniel.diaz@linaro.org
State Accepted
Commit 4b4a1295b8476d2820935eb5661b2d24a49b29b2
Headers show
Series
  • [1/3] cross-canadian: update GNU name for ILP32 triplet
Related show

Commit Message

Daniel Díaz Nov. 13, 2017, 6:06 p.m.
Add aarch64 32-bits (ILP32) ELF header into dictionary and
check binaries for 32-bitness.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
 meta/classes/insane.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index def9c70..fc9395c 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -146,6 +146,9 @@  def package_qa_get_machine_dict(d):
                         "powerpc":    (20,     0,    0,          False,         32),
                         "sh4":        (42,     0,    0,          True,          32),
                       },
+            "linux-gnu_ilp32" :     {
+                        "aarch64" :   (183,    0,    0,          True,          32),
+                      },
             "linux-gnux32" :       {
                         "x86_64":     (62,     0,    0,          True,          32),
                       },
@@ -426,7 +429,7 @@  def package_qa_check_arch(path,name,d, elf, messages):
 
     # Check the architecture and endiannes of the binary
     is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
-            (target_os == "linux-gnux32" or target_os == "linux-muslx32"  or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+            (target_os == "linux-gnux32" or target_os == "linux-muslx32" or target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
     if not ((machine == elf.machine()) or is_32):
         package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
                  (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))