zephyr-qemuboot.bbclass: Don't overwrite the entire elf dictionary key

The nios2_machdata_setfunc was overwriting the elf key in matchdata for
arc done in arc_machdata_setfunc which in turn was overwriting the one
from oe-core. This is making qemu-x86 builds (as an example)
unbuildable:

Exception: KeyError: 'i586'

This patch makes sure that the changes complement the machdata
dictionary as opposed to overwriting the entire "elf" key.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
This commit is contained in:
Andrei Gherzan
2021-05-13 15:02:07 +01:00
committed by Naveen Saini
parent df6d40ed40
commit 5461dda2ce

View File

@@ -1,4 +1,3 @@
def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
archinfo['arc'] = "endian-little bit-32 "
osinfo['linux'] = "common-linux common-glibc"
@@ -8,7 +7,7 @@ def arc_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
SITEINFO_EXTRA_DATAFUNCS += "arc_siteinfo_setfunc"
def arc_machdata_setfunc(machdata, d):
machdata["elf"] = { "arc" : (195, 0, 0, True, 32), }
machdata["elf"]["arc"] = (195, 0, 0, True, 32)
return machdata
PACKAGEQA_EXTRA_MACHDEFFUNCS += "arc_machdata_setfunc"
@@ -22,7 +21,7 @@ def iamcu_siteinfo_setfunc(archinfo, osinfo, targetinfo, d):
SITEINFO_EXTRA_DATAFUNCS += "iamcu_siteinfo_setfunc"
def nios2_machdata_setfunc(machdata, d):
machdata["elf"] = {"nios2": (113, 0, 0, True, 32), }
machdata["elf"]["nios2"] = (113, 0, 0, True, 32)
return machdata
PACKAGEQA_EXTRA_MACHDEFFUNCS += "nios2_machdata_setfunc"
PACKAGEQA_EXTRA_MACHDEFFUNCS += "nios2_machdata_setfunc"