diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2015-12-07 15:36:11 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:26:12 +0100 |
commit | ea24d69fdf7ebbd7f2d9811cff8a77bffc19a75c (patch) | |
tree | d61067dd85ccc2529c2640d409d5d289fb5a0925 /meta/classes | |
parent | c999b3d88dfcffbe0fb66406fb0bff1fb66f34bc (diff) | |
download | openembedded-core-ea24d69fdf7ebbd7f2d9811cff8a77bffc19a75c.tar.gz openembedded-core-ea24d69fdf7ebbd7f2d9811cff8a77bffc19a75c.tar.bz2 openembedded-core-ea24d69fdf7ebbd7f2d9811cff8a77bffc19a75c.zip |
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.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 22 |
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 # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS # PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" -CANADIANEXTRAOS = "linux-uclibc linux-musl" +BASECANADIANEXTRAOS ?= "linux-uclibc linux-musl" +CANADIANEXTRAOS = "${BASECANADIANEXTRAOS}" CANADIANEXTRAVENDOR = "" MODIFYTOS ??= "1" python () { @@ -34,8 +35,13 @@ python () { tos = d.getVar("TARGET_OS", True) whitelist = [] + extralibcs = [""] + if "uclibc" in d.getVar("BASECANADIANEXTRAOS", True): + extralibcs.append("uclibc") + if "musl" in d.getVar("BASECANADIANEXTRAOS", True): + extralibcs.append("musl") for variant in ["", "spe", "x32", "eabi", "n32"]: - for libc in ["", "uclibc", "musl"]: + for libc in extralibcs: entry = "linux" if variant and libc: entry = entry + "-" + libc + variant @@ -59,14 +65,20 @@ python () { if tarch == "x86_64": d.setVar("LIBCEXTENSION", "") d.setVar("ABIEXTENSION", "") - d.appendVar("CANADIANEXTRAOS", " linux-gnux32 linux-uclibcx32 linux-muslx32") + d.appendVar("CANADIANEXTRAOS", " linux-gnux32") + for extraos in d.getVar("BASECANADIANEXTRAOS", True).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 linux-uclibcspe linux-muslspe") + d.appendVar("CANADIANEXTRAOS", " linux-gnuspe") + for extraos in d.getVar("BASECANADIANEXTRAOS", True).split(): + d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe") elif tarch == "mips64": - d.appendVar("CANADIANEXTRAOS", " linux-gnun32 linux-uclibcn32 linux-musln32") + d.appendVar("CANADIANEXTRAOS", " linux-gnun32") + for extraos in d.getVar("BASECANADIANEXTRAOS", True).split(): + d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32") if tarch == "arm" or tarch == "armeb": d.appendVar("CANADIANEXTRAOS", " linux-musleabi linux-uclibceabi") d.setVar("TARGET_OS", "linux-gnueabi") |