summaryrefslogtreecommitdiffstats
path: root/meta/classes/cross-canadian.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/cross-canadian.bbclass
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz
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>
Diffstat (limited to 'meta/classes/cross-canadian.bbclass')
-rw-r--r--meta/classes/cross-canadian.bbclass34
1 files changed, 17 insertions, 17 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 21921b3dd0..64db1134f5 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -20,25 +20,25 @@ CANADIANEXTRAOS = "${BASECANADIANEXTRAOS}"
20CANADIANEXTRAVENDOR = "" 20CANADIANEXTRAVENDOR = ""
21MODIFYTOS ??= "1" 21MODIFYTOS ??= "1"
22python () { 22python () {
23 archs = d.getVar('PACKAGE_ARCHS', True).split() 23 archs = d.getVar('PACKAGE_ARCHS').split()
24 sdkarchs = [] 24 sdkarchs = []
25 for arch in archs: 25 for arch in archs:
26 sdkarchs.append(arch + '-${SDKPKGSUFFIX}') 26 sdkarchs.append(arch + '-${SDKPKGSUFFIX}')
27 d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) 27 d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
28 28
29 # Allow the following code segment to be disabled, e.g. meta-environment 29 # Allow the following code segment to be disabled, e.g. meta-environment
30 if d.getVar("MODIFYTOS", True) != "1": 30 if d.getVar("MODIFYTOS") != "1":
31 return 31 return
32 32
33 if d.getVar("TCLIBC", True) == "baremetal": 33 if d.getVar("TCLIBC") == "baremetal":
34 return 34 return
35 35
36 tos = d.getVar("TARGET_OS", True) 36 tos = d.getVar("TARGET_OS")
37 whitelist = [] 37 whitelist = []
38 extralibcs = [""] 38 extralibcs = [""]
39 if "uclibc" in d.getVar("BASECANADIANEXTRAOS", True): 39 if "uclibc" in d.getVar("BASECANADIANEXTRAOS"):
40 extralibcs.append("uclibc") 40 extralibcs.append("uclibc")
41 if "musl" in d.getVar("BASECANADIANEXTRAOS", True): 41 if "musl" in d.getVar("BASECANADIANEXTRAOS"):
42 extralibcs.append("musl") 42 extralibcs.append("musl")
43 for variant in ["", "spe", "x32", "eabi", "n32"]: 43 for variant in ["", "spe", "x32", "eabi", "n32"]:
44 for libc in extralibcs: 44 for libc in extralibcs:
@@ -51,33 +51,33 @@ python () {
51 entry = entry + "-" + libc 51 entry = entry + "-" + libc
52 whitelist.append(entry) 52 whitelist.append(entry)
53 if tos not in whitelist: 53 if tos not in whitelist:
54 bb.fatal("Building cross-candian for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True)) 54 bb.fatal("Building cross-candian for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS"))
55 55
56 for n in ["PROVIDES", "DEPENDS"]: 56 for n in ["PROVIDES", "DEPENDS"]:
57 d.setVar(n, d.getVar(n, True)) 57 d.setVar(n, d.getVar(n))
58 d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True)) 58 d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN"))
59 for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]: 59 for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]:
60 n = prefix + "_FOR_TARGET" 60 n = prefix + "_FOR_TARGET"
61 d.setVar(n, d.getVar(n, True)) 61 d.setVar(n, d.getVar(n))
62 # This is a bit ugly. We need to zero LIBC/ABI extension which will change TARGET_OS 62 # This is a bit ugly. We need to zero LIBC/ABI extension which will change TARGET_OS
63 # however we need the old value in some variables. We expand those here first. 63 # however we need the old value in some variables. We expand those here first.
64 tarch = d.getVar("TARGET_ARCH", True) 64 tarch = d.getVar("TARGET_ARCH")
65 if tarch == "x86_64": 65 if tarch == "x86_64":
66 d.setVar("LIBCEXTENSION", "") 66 d.setVar("LIBCEXTENSION", "")
67 d.setVar("ABIEXTENSION", "") 67 d.setVar("ABIEXTENSION", "")
68 d.appendVar("CANADIANEXTRAOS", " linux-gnux32") 68 d.appendVar("CANADIANEXTRAOS", " linux-gnux32")
69 for extraos in d.getVar("BASECANADIANEXTRAOS", True).split(): 69 for extraos in d.getVar("BASECANADIANEXTRAOS").split():
70 d.appendVar("CANADIANEXTRAOS", " " + extraos + "x32") 70 d.appendVar("CANADIANEXTRAOS", " " + extraos + "x32")
71 elif tarch == "powerpc": 71 elif tarch == "powerpc":
72 # PowerPC can build "linux" and "linux-gnuspe" 72 # PowerPC can build "linux" and "linux-gnuspe"
73 d.setVar("LIBCEXTENSION", "") 73 d.setVar("LIBCEXTENSION", "")
74 d.setVar("ABIEXTENSION", "") 74 d.setVar("ABIEXTENSION", "")
75 d.appendVar("CANADIANEXTRAOS", " linux-gnuspe") 75 d.appendVar("CANADIANEXTRAOS", " linux-gnuspe")
76 for extraos in d.getVar("BASECANADIANEXTRAOS", True).split(): 76 for extraos in d.getVar("BASECANADIANEXTRAOS").split():
77 d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe") 77 d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe")
78 elif tarch == "mips64": 78 elif tarch == "mips64":
79 d.appendVar("CANADIANEXTRAOS", " linux-gnun32") 79 d.appendVar("CANADIANEXTRAOS", " linux-gnun32")
80 for extraos in d.getVar("BASECANADIANEXTRAOS", True).split(): 80 for extraos in d.getVar("BASECANADIANEXTRAOS").split():
81 d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32") 81 d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32")
82 if tarch == "arm" or tarch == "armeb": 82 if tarch == "arm" or tarch == "armeb":
83 d.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi linux-uclibceabi") 83 d.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi linux-uclibceabi")
@@ -86,10 +86,10 @@ python () {
86 d.setVar("TARGET_OS", "linux") 86 d.setVar("TARGET_OS", "linux")
87 87
88 # Also need to handle multilib target vendors 88 # Also need to handle multilib target vendors
89 vendors = d.getVar("CANADIANEXTRAVENDOR", True) 89 vendors = d.getVar("CANADIANEXTRAVENDOR")
90 if not vendors: 90 if not vendors:
91 vendors = all_multilib_tune_values(d, 'TARGET_VENDOR') 91 vendors = all_multilib_tune_values(d, 'TARGET_VENDOR')
92 origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL", True) 92 origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL")
93 if origvendor: 93 if origvendor:
94 d.setVar("TARGET_VENDOR", origvendor) 94 d.setVar("TARGET_VENDOR", origvendor)
95 if origvendor not in vendors.split(): 95 if origvendor not in vendors.split():
@@ -116,7 +116,7 @@ HOST_LD_ARCH = "${SDK_LD_ARCH}"
116HOST_AS_ARCH = "${SDK_AS_ARCH}" 116HOST_AS_ARCH = "${SDK_AS_ARCH}"
117 117
118#assign DPKG_ARCH 118#assign DPKG_ARCH
119DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH', True), '')}" 119DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH'), '')}"
120 120
121CPPFLAGS = "${BUILDSDK_CPPFLAGS}" 121CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
122CFLAGS = "${BUILDSDK_CFLAGS}" 122CFLAGS = "${BUILDSDK_CFLAGS}"