summaryrefslogtreecommitdiffstats
path: root/meta/classes/cross-canadian.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2015-12-07 15:36:11 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:35:38 +0100
commit7debab3e1f37bdc43a2231ef50eeceb2d198a542 (patch)
tree1845fb4f2540a4f95ed4704eec715b6f258f6c5c /meta/classes/cross-canadian.bbclass
parent310d8602624b7c602049bb3b31c24f768974232d (diff)
downloadpoky-7debab3e1f37bdc43a2231ef50eeceb2d198a542.tar.gz
cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos
By default the system will expand the extra os entries for uclibc and musl even if they are not enabled in the build. There was no way to prevent this behavior while still getting the expansion for things like x32 or spe. The change adds a new setting which a distribution creator can override easily, setting the base set of canadianextraos components. The other expansions are then based on this setting. (From OE-Core rev: ea24d69fdf7ebbd7f2d9811cff8a77bffc19a75c) Signed-off-by: Mark Hatle <mark.hatle@windriver.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.bbclass22
1 files changed, 17 insertions, 5 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index d35451dbf2..099c0daf42 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -15,7 +15,8 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
15# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS 15# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
16# 16#
17PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" 17PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
18CANADIANEXTRAOS = "linux-uclibc linux-musl" 18BASECANADIANEXTRAOS ?= "linux-uclibc linux-musl"
19CANADIANEXTRAOS = "${BASECANADIANEXTRAOS}"
19CANADIANEXTRAVENDOR = "" 20CANADIANEXTRAVENDOR = ""
20MODIFYTOS ??= "1" 21MODIFYTOS ??= "1"
21python () { 22python () {
@@ -34,8 +35,13 @@ python () {
34 35
35 tos = d.getVar("TARGET_OS", True) 36 tos = d.getVar("TARGET_OS", True)
36 whitelist = [] 37 whitelist = []
38 extralibcs = [""]
39 if "uclibc" in d.getVar("BASECANADIANEXTRAOS", True):
40 extralibcs.append("uclibc")
41 if "musl" in d.getVar("BASECANADIANEXTRAOS", True):
42 extralibcs.append("musl")
37 for variant in ["", "spe", "x32", "eabi", "n32"]: 43 for variant in ["", "spe", "x32", "eabi", "n32"]:
38 for libc in ["", "uclibc", "musl"]: 44 for libc in extralibcs:
39 entry = "linux" 45 entry = "linux"
40 if variant and libc: 46 if variant and libc:
41 entry = entry + "-" + libc + variant 47 entry = entry + "-" + libc + variant
@@ -59,14 +65,20 @@ python () {
59 if tarch == "x86_64": 65 if tarch == "x86_64":
60 d.setVar("LIBCEXTENSION", "") 66 d.setVar("LIBCEXTENSION", "")
61 d.setVar("ABIEXTENSION", "") 67 d.setVar("ABIEXTENSION", "")
62 d.appendVar("CANADIANEXTRAOS", " linux-gnux32 linux-uclibcx32 linux-muslx32") 68 d.appendVar("CANADIANEXTRAOS", " linux-gnux32")
69 for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
70 d.appendVar("CANADIANEXTRAOS", " " + extraos + "x32")
63 elif tarch == "powerpc": 71 elif tarch == "powerpc":
64 # PowerPC can build "linux" and "linux-gnuspe" 72 # PowerPC can build "linux" and "linux-gnuspe"
65 d.setVar("LIBCEXTENSION", "") 73 d.setVar("LIBCEXTENSION", "")
66 d.setVar("ABIEXTENSION", "") 74 d.setVar("ABIEXTENSION", "")
67 d.appendVar("CANADIANEXTRAOS", " linux-gnuspe linux-uclibcspe linux-muslspe") 75 d.appendVar("CANADIANEXTRAOS", " linux-gnuspe")
76 for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
77 d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe")
68 elif tarch == "mips64": 78 elif tarch == "mips64":
69 d.appendVar("CANADIANEXTRAOS", " linux-gnun32 linux-uclibcn32 linux-musln32") 79 d.appendVar("CANADIANEXTRAOS", " linux-gnun32")
80 for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
81 d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32")
70 if tarch == "arm" or tarch == "armeb": 82 if tarch == "arm" or tarch == "armeb":
71 d.appendVar("CANADIANEXTRAOS", " linux-musleabi linux-uclibceabi") 83 d.appendVar("CANADIANEXTRAOS", " linux-musleabi linux-uclibceabi")
72 d.setVar("TARGET_OS", "linux-gnueabi") 84 d.setVar("TARGET_OS", "linux-gnueabi")