mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
20c3889573
commit
920537c840
@@ -334,12 +334,12 @@ def package_qa_check_arch(path,name,d, elf, messages):
|
|||||||
if not elf:
|
if not elf:
|
||||||
return
|
return
|
||||||
|
|
||||||
target_os = d.getVar('HOST_OS')
|
host_os = d.getVar('HOST_OS')
|
||||||
target_arch = d.getVar('HOST_ARCH')
|
host_arch = d.getVar('HOST_ARCH')
|
||||||
provides = d.getVar('PROVIDES')
|
provides = d.getVar('PROVIDES')
|
||||||
bpn = d.getVar('BPN')
|
bpn = d.getVar('BPN')
|
||||||
|
|
||||||
if target_arch == "allarch":
|
if host_arch == "allarch":
|
||||||
pn = d.getVar('PN')
|
pn = d.getVar('PN')
|
||||||
oe.qa.add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries")
|
oe.qa.add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries")
|
||||||
return
|
return
|
||||||
@@ -351,12 +351,12 @@ def package_qa_check_arch(path,name,d, elf, messages):
|
|||||||
|
|
||||||
#if this will throw an exception, then fix the dict above
|
#if this will throw an exception, then fix the dict above
|
||||||
(machine, osabi, abiversion, littleendian, bits) \
|
(machine, osabi, abiversion, littleendian, bits) \
|
||||||
= oe.elf.machine_dict(d)[target_os][target_arch]
|
= oe.elf.machine_dict(d)[host_os][host_arch]
|
||||||
|
|
||||||
# Check the architecture and endiannes of the binary
|
# Check the architecture and endiannes of the binary
|
||||||
is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
|
is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
|
||||||
(target_os == "linux-gnux32" or target_os == "linux-muslx32" or \
|
(host_os == "linux-gnux32" or host_os == "linux-muslx32" or \
|
||||||
target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
|
host_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
|
||||||
is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
|
is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
|
||||||
if not ((machine == elf.machine()) or is_32 or is_bpf):
|
if not ((machine == elf.machine()) or is_32 or is_bpf):
|
||||||
oe.qa.add_message(messages, "arch", "Architecture did not match (%s, expected %s) in %s" % \
|
oe.qa.add_message(messages, "arch", "Architecture did not match (%s, expected %s) in %s" % \
|
||||||
|
|||||||
Reference in New Issue
Block a user