mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
siteinfo: generalise siteinfo
Add a function siteinfo_data_for_machine to look up the data for any arch/os pair, not just HOST_ARCH-HOST_OS. (From OE-Core rev: 7429ed8d2a6e48cb3415113ef62348ae211aa189) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
802a7c1867
commit
f0c59c8876
@@ -15,7 +15,7 @@
|
|||||||
# It is an error for the target not to exist.
|
# It is an error for the target not to exist.
|
||||||
# If 'what' doesn't exist then an empty value is returned
|
# If 'what' doesn't exist then an empty value is returned
|
||||||
#
|
#
|
||||||
def siteinfo_data(d):
|
def siteinfo_data_for_machine(arch, os, d):
|
||||||
archinfo = {
|
archinfo = {
|
||||||
"allarch": "endian-little bit-32", # bogus, but better than special-casing the checks below for allarch
|
"allarch": "endian-little bit-32", # bogus, but better than special-casing the checks below for allarch
|
||||||
"aarch64": "endian-little bit-64 arm-common arm-64",
|
"aarch64": "endian-little bit-64 arm-common arm-64",
|
||||||
@@ -131,15 +131,13 @@ def siteinfo_data(d):
|
|||||||
locs = { "archinfo" : archinfo, "osinfo" : osinfo, "targetinfo" : targetinfo, "d" : d}
|
locs = { "archinfo" : archinfo, "osinfo" : osinfo, "targetinfo" : targetinfo, "d" : d}
|
||||||
archinfo, osinfo, targetinfo = bb.utils.better_eval(call, locs)
|
archinfo, osinfo, targetinfo = bb.utils.better_eval(call, locs)
|
||||||
|
|
||||||
hostarch = d.getVar("HOST_ARCH")
|
target = "%s-%s" % (arch, os)
|
||||||
hostos = d.getVar("HOST_OS")
|
|
||||||
target = "%s-%s" % (hostarch, hostos)
|
|
||||||
|
|
||||||
sitedata = []
|
sitedata = []
|
||||||
if hostarch in archinfo:
|
if arch in archinfo:
|
||||||
sitedata.extend(archinfo[hostarch].split())
|
sitedata.extend(archinfo[arch].split())
|
||||||
if hostos in osinfo:
|
if os in osinfo:
|
||||||
sitedata.extend(osinfo[hostos].split())
|
sitedata.extend(osinfo[os].split())
|
||||||
if target in targetinfo:
|
if target in targetinfo:
|
||||||
sitedata.extend(targetinfo[target].split())
|
sitedata.extend(targetinfo[target].split())
|
||||||
sitedata.append(target)
|
sitedata.append(target)
|
||||||
@@ -148,6 +146,9 @@ def siteinfo_data(d):
|
|||||||
bb.debug(1, "SITE files %s" % sitedata);
|
bb.debug(1, "SITE files %s" % sitedata);
|
||||||
return sitedata
|
return sitedata
|
||||||
|
|
||||||
|
def siteinfo_data(d):
|
||||||
|
return siteinfo_data_for_machine(d.getVar("HOST_ARCH"), d.getVar("HOST_OS"), d)
|
||||||
|
|
||||||
python () {
|
python () {
|
||||||
sitedata = set(siteinfo_data(d))
|
sitedata = set(siteinfo_data(d))
|
||||||
if "endian-little" in sitedata:
|
if "endian-little" in sitedata:
|
||||||
|
|||||||
Reference in New Issue
Block a user