summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorEmil Kronborg <emil.kronborg@protonmail.com>2024-05-23 12:55:49 +0000
committerSteve Sakoman <steve@sakoman.com>2024-07-26 07:43:46 -0700
commit8cb7901a51a0e2562624fff020a392413250be0d (patch)
treebec62cc208c319dd3c1e8adfbe132e7749b63f5d /meta
parent9c030951054dc589d928d45bef22160f5fa368fb (diff)
downloadpoky-8cb7901a51a0e2562624fff020a392413250be0d.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: 7fd25eaa8fd5533d03d5f10792e2e6c30c64cc3c) Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit f5bebc96580ec74d10bc96b4265357ebc9bcd6ad) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-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 4eb8cb1397..bcc179fe26 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" % \