summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/insane.bbclass
diff options
context:
space:
mode:
authorEmil Kronborg <emil.kronborg@protonmail.com>2024-05-23 12:55:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-06-03 07:47:04 +0100
commit920537c840828ff99a63eeed24085de255e097a9 (patch)
tree545d1330a7307dc17f0f1fc0049931a38512bb53 /meta/classes-global/insane.bbclass
parent20c388957334478ae6c8a531b3a6796d5e264f7f (diff)
downloadpoky-920537c840828ff99a63eeed24085de255e097a9.tar.gz
insane.bbclass: fix HOST_ variable names
Commit cd25e5544ca3 ("insane: use HOST_ variables, not TARGET_ to determine the cross system") updated the variables themselves, but not their names. To prevent confusion, match the Python variable name to the BitBake variable name. (From OE-Core rev: f5bebc96580ec74d10bc96b4265357ebc9bcd6ad) Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global/insane.bbclass')
-rw-r--r--meta/classes-global/insane.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 3f26e1e065..b9d11d4910 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -334,12 +334,12 @@ def package_qa_check_arch(path,name,d, elf, messages):
334 if not elf: 334 if not elf:
335 return 335 return
336 336
337 target_os = d.getVar('HOST_OS') 337 host_os = d.getVar('HOST_OS')
338 target_arch = d.getVar('HOST_ARCH') 338 host_arch = d.getVar('HOST_ARCH')
339 provides = d.getVar('PROVIDES') 339 provides = d.getVar('PROVIDES')
340 bpn = d.getVar('BPN') 340 bpn = d.getVar('BPN')
341 341
342 if target_arch == "allarch": 342 if host_arch == "allarch":
343 pn = d.getVar('PN') 343 pn = d.getVar('PN')
344 oe.qa.add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries") 344 oe.qa.add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries")
345 return 345 return
@@ -351,12 +351,12 @@ def package_qa_check_arch(path,name,d, elf, messages):
351 351
352 #if this will throw an exception, then fix the dict above 352 #if this will throw an exception, then fix the dict above
353 (machine, osabi, abiversion, littleendian, bits) \ 353 (machine, osabi, abiversion, littleendian, bits) \
354 = oe.elf.machine_dict(d)[target_os][target_arch] 354 = oe.elf.machine_dict(d)[host_os][host_arch]
355 355
356 # Check the architecture and endiannes of the binary 356 # Check the architecture and endiannes of the binary
357 is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \ 357 is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
358 (target_os == "linux-gnux32" or target_os == "linux-muslx32" or \ 358 (host_os == "linux-gnux32" or host_os == "linux-muslx32" or \
359 target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE'))) 359 host_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
360 is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF") 360 is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
361 if not ((machine == elf.machine()) or is_32 or is_bpf): 361 if not ((machine == elf.machine()) or is_32 or is_bpf):
362 oe.qa.add_message(messages, "arch", "Architecture did not match (%s, expected %s) in %s" % \ 362 oe.qa.add_message(messages, "arch", "Architecture did not match (%s, expected %s) in %s" % \