* [PATCH] cross-canadian/libgcc-common: Fixes for arm multilib
@ 2016-09-28 14:59 Richard Purdie
2016-09-28 15:28 ` Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2016-09-28 14:59 UTC (permalink / raw)
To: openembedded-core
Arm is unusual in that we force it to "linux-gnueabi" and "linux" doesn't
build. This was causing problems for multilib configurations which were assuming
"linux" was the default compiler rather than linux-gnueabi.
This change does two things, ensures symlinks are generated for linux-gnueabi
and also adapts the libgcc code to account for the difference on arm.
It still needs to immediately expand/save TARGET_VENDOR but we defer
deciding what TARGET_OS should be until we know TARGET_ARCH (which the
multilib code may change).
[YOCTO #8642]
Note that sanity tests of a 32 bit arm multilib still break due to issues
with the kernel headers on a mixed bit system. This looks to be a general
headers issue for the platform though and a different type of bug.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 099c0da..21921b3 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -80,7 +80,7 @@ python () {
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.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi linux-uclibceabi")
d.setVar("TARGET_OS", "linux-gnueabi")
else:
d.setVar("TARGET_OS", "linux")
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index 4e4f0fd..1549eb4 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -123,15 +123,18 @@ fakeroot python do_multilib_install() {
os.symlink(src, dest)
}
-def get_original_vendoros(d):
- vendoros = d.expand('${TARGET_VENDOR}-${TARGET_OS}')
+def get_original_os(d):
+ vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}')
for suffix in [d.getVar('ABIEXTENSION', True), d.getVar('LIBCEXTENSION', True)]:
if suffix and vendoros.endswith(suffix):
vendoros = vendoros[:-len(suffix)]
+ # Arm must use linux-gnueabi not linux as only the former is accepted by gcc
+ if vendoros.startswith("arm-") and not vendoros.endswith("-gnueabi"):
+ vendoros = vendoros + "-gnueabi"
return vendoros
-ORIG_TARGET_VENDOROS := "${@get_original_vendoros(d)}"
-BASETARGET_SYS = "${TARGET_ARCH}${ORIG_TARGET_VENDOROS}"
+ORIG_TARGET_VENDOR := "${TARGET_VENDOR}"
+BASETARGET_SYS = "${@get_original_os(d)}"
addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
fakeroot python do_extra_symlinks() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cross-canadian/libgcc-common: Fixes for arm multilib
2016-09-28 14:59 [PATCH] cross-canadian/libgcc-common: Fixes for arm multilib Richard Purdie
@ 2016-09-28 15:28 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2016-09-28 15:28 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 3279 bytes --]
Seems fine
On Sep 28, 2016 8:00 AM, "Richard Purdie" <
richard.purdie@linuxfoundation.org> wrote:
> Arm is unusual in that we force it to "linux-gnueabi" and "linux" doesn't
> build. This was causing problems for multilib configurations which were
> assuming
> "linux" was the default compiler rather than linux-gnueabi.
>
> This change does two things, ensures symlinks are generated for
> linux-gnueabi
> and also adapts the libgcc code to account for the difference on arm.
>
> It still needs to immediately expand/save TARGET_VENDOR but we defer
> deciding what TARGET_OS should be until we know TARGET_ARCH (which the
> multilib code may change).
>
> [YOCTO #8642]
>
> Note that sanity tests of a 32 bit arm multilib still break due to issues
> with the kernel headers on a mixed bit system. This looks to be a general
> headers issue for the platform though and a different type of bug.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/classes/cross-canadian.bbclass
> b/meta/classes/cross-canadian.bbclass
> index 099c0da..21921b3 100644
> --- a/meta/classes/cross-canadian.bbclass
> +++ b/meta/classes/cross-canadian.bbclass
> @@ -80,7 +80,7 @@ python () {
> 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.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi
> linux-uclibceabi")
> d.setVar("TARGET_OS", "linux-gnueabi")
> else:
> d.setVar("TARGET_OS", "linux")
> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc
> b/meta/recipes-devtools/gcc/libgcc-common.inc
> index 4e4f0fd..1549eb4 100644
> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
> @@ -123,15 +123,18 @@ fakeroot python do_multilib_install() {
> os.symlink(src, dest)
> }
>
> -def get_original_vendoros(d):
> - vendoros = d.expand('${TARGET_VENDOR}-${TARGET_OS}')
> +def get_original_os(d):
> + vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_
> OS}')
> for suffix in [d.getVar('ABIEXTENSION', True),
> d.getVar('LIBCEXTENSION', True)]:
> if suffix and vendoros.endswith(suffix):
> vendoros = vendoros[:-len(suffix)]
> + # Arm must use linux-gnueabi not linux as only the former is accepted
> by gcc
> + if vendoros.startswith("arm-") and not vendoros.endswith("-gnueabi"):
> + vendoros = vendoros + "-gnueabi"
> return vendoros
>
> -ORIG_TARGET_VENDOROS := "${@get_original_vendoros(d)}"
> -BASETARGET_SYS = "${TARGET_ARCH}${ORIG_TARGET_VENDOROS}"
> +ORIG_TARGET_VENDOR := "${TARGET_VENDOR}"
> +BASETARGET_SYS = "${@get_original_os(d)}"
>
> addtask extra_symlinks after do_multilib_install before do_package
> do_populate_sysroot
> fakeroot python do_extra_symlinks() {
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 4432 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-28 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 14:59 [PATCH] cross-canadian/libgcc-common: Fixes for arm multilib Richard Purdie
2016-09-28 15:28 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.