mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> 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
d5e67725ac
commit
c4e2c59088
@@ -20,25 +20,25 @@ CANADIANEXTRAOS = "${BASECANADIANEXTRAOS}"
|
||||
CANADIANEXTRAVENDOR = ""
|
||||
MODIFYTOS ??= "1"
|
||||
python () {
|
||||
archs = d.getVar('PACKAGE_ARCHS', True).split()
|
||||
archs = d.getVar('PACKAGE_ARCHS').split()
|
||||
sdkarchs = []
|
||||
for arch in archs:
|
||||
sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
|
||||
d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
|
||||
|
||||
# Allow the following code segment to be disabled, e.g. meta-environment
|
||||
if d.getVar("MODIFYTOS", True) != "1":
|
||||
if d.getVar("MODIFYTOS") != "1":
|
||||
return
|
||||
|
||||
if d.getVar("TCLIBC", True) == "baremetal":
|
||||
if d.getVar("TCLIBC") == "baremetal":
|
||||
return
|
||||
|
||||
tos = d.getVar("TARGET_OS", True)
|
||||
tos = d.getVar("TARGET_OS")
|
||||
whitelist = []
|
||||
extralibcs = [""]
|
||||
if "uclibc" in d.getVar("BASECANADIANEXTRAOS", True):
|
||||
if "uclibc" in d.getVar("BASECANADIANEXTRAOS"):
|
||||
extralibcs.append("uclibc")
|
||||
if "musl" in d.getVar("BASECANADIANEXTRAOS", True):
|
||||
if "musl" in d.getVar("BASECANADIANEXTRAOS"):
|
||||
extralibcs.append("musl")
|
||||
for variant in ["", "spe", "x32", "eabi", "n32"]:
|
||||
for libc in extralibcs:
|
||||
@@ -51,33 +51,33 @@ python () {
|
||||
entry = entry + "-" + libc
|
||||
whitelist.append(entry)
|
||||
if tos not in whitelist:
|
||||
bb.fatal("Building cross-candian for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True))
|
||||
bb.fatal("Building cross-candian for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS"))
|
||||
|
||||
for n in ["PROVIDES", "DEPENDS"]:
|
||||
d.setVar(n, d.getVar(n, True))
|
||||
d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True))
|
||||
d.setVar(n, d.getVar(n))
|
||||
d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN"))
|
||||
for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]:
|
||||
n = prefix + "_FOR_TARGET"
|
||||
d.setVar(n, d.getVar(n, True))
|
||||
d.setVar(n, d.getVar(n))
|
||||
# This is a bit ugly. We need to zero LIBC/ABI extension which will change TARGET_OS
|
||||
# however we need the old value in some variables. We expand those here first.
|
||||
tarch = d.getVar("TARGET_ARCH", True)
|
||||
tarch = d.getVar("TARGET_ARCH")
|
||||
if tarch == "x86_64":
|
||||
d.setVar("LIBCEXTENSION", "")
|
||||
d.setVar("ABIEXTENSION", "")
|
||||
d.appendVar("CANADIANEXTRAOS", " linux-gnux32")
|
||||
for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
|
||||
for extraos in d.getVar("BASECANADIANEXTRAOS").split():
|
||||
d.appendVar("CANADIANEXTRAOS", " " + extraos + "x32")
|
||||
elif tarch == "powerpc":
|
||||
# PowerPC can build "linux" and "linux-gnuspe"
|
||||
d.setVar("LIBCEXTENSION", "")
|
||||
d.setVar("ABIEXTENSION", "")
|
||||
d.appendVar("CANADIANEXTRAOS", " linux-gnuspe")
|
||||
for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
|
||||
for extraos in d.getVar("BASECANADIANEXTRAOS").split():
|
||||
d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe")
|
||||
elif tarch == "mips64":
|
||||
d.appendVar("CANADIANEXTRAOS", " linux-gnun32")
|
||||
for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
|
||||
for extraos in d.getVar("BASECANADIANEXTRAOS").split():
|
||||
d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32")
|
||||
if tarch == "arm" or tarch == "armeb":
|
||||
d.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi linux-uclibceabi")
|
||||
@@ -86,10 +86,10 @@ python () {
|
||||
d.setVar("TARGET_OS", "linux")
|
||||
|
||||
# Also need to handle multilib target vendors
|
||||
vendors = d.getVar("CANADIANEXTRAVENDOR", True)
|
||||
vendors = d.getVar("CANADIANEXTRAVENDOR")
|
||||
if not vendors:
|
||||
vendors = all_multilib_tune_values(d, 'TARGET_VENDOR')
|
||||
origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL", True)
|
||||
origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL")
|
||||
if origvendor:
|
||||
d.setVar("TARGET_VENDOR", origvendor)
|
||||
if origvendor not in vendors.split():
|
||||
@@ -116,7 +116,7 @@ HOST_LD_ARCH = "${SDK_LD_ARCH}"
|
||||
HOST_AS_ARCH = "${SDK_AS_ARCH}"
|
||||
|
||||
#assign DPKG_ARCH
|
||||
DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH', True), '')}"
|
||||
DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH'), '')}"
|
||||
|
||||
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
|
||||
CFLAGS = "${BUILDSDK_CFLAGS}"
|
||||
|
||||
Reference in New Issue
Block a user