* [PATCH] cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos
@ 2015-12-07 21:36 Mark Hatle
2015-12-07 21:39 ` Mark Hatle
2016-08-10 5:34 ` Huang, Jie (Jackie)
0 siblings, 2 replies; 3+ messages in thread
From: Mark Hatle @ 2015-12-07 21:36 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/classes/cross-canadian.bbclass | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index ea17f09..799844b 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.setVar("TARGET_OS", "linux-gnueabi")
else:
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos
2015-12-07 21:36 [PATCH] cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos Mark Hatle
@ 2015-12-07 21:39 ` Mark Hatle
2016-08-10 5:34 ` Huang, Jie (Jackie)
1 sibling, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2015-12-07 21:39 UTC (permalink / raw)
To: openembedded-core
Sorry forgot to setup a cover letter.
The issue is that various extra OS entries cause numerous symlinks to be set.
These symlinks can cause confusion for someone looking in the directory. They
may think uclibc or musl is actually supported.
However, the real problem is when you build an SDK for Windows (mingw), symlinks
get expanded on installation. So you end up with a full copy of the toolchain
for each symlink.
This will increase (the installed) size of the x86_64 toolchain by 600MB, for no
real reason.
The change is equally applicable to master and jethro.
On 12/7/15 3:36 PM, Mark Hatle wrote:
> 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>
> ---
> meta/classes/cross-canadian.bbclass | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos
2015-12-07 21:36 [PATCH] cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos Mark Hatle
2015-12-07 21:39 ` Mark Hatle
@ 2016-08-10 5:34 ` Huang, Jie (Jackie)
1 sibling, 0 replies; 3+ messages in thread
From: Huang, Jie (Jackie) @ 2016-08-10 5:34 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
Ping!
I don't see any objection on this but this is not merged yet, is it ignored?
Thanks,
Jackie
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-
> bounces@lists.openembedded.org] On Behalf Of Mark Hatle
> Sent: Tuesday, December 08, 2015 5:36 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH] 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>
> ---
> meta/classes/cross-canadian.bbclass | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
> index ea17f09..799844b 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.setVar("TARGET_OS", "linux-gnueabi")
> else:
> --
> 1.9.3
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-10 5:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07 21:36 [PATCH] cross-canadian.bbclass: Add BASECANADIANEXTRAOS to specify main extraos Mark Hatle
2015-12-07 21:39 ` Mark Hatle
2016-08-10 5:34 ` Huang, Jie (Jackie)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox