* [PATCH 0/1] cross-canadian/libgcc: fix aarch64's multilib SDK
@ 2015-11-04 13:58 Robert Yang
2015-11-04 13:58 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 7+ messages in thread
From: Robert Yang @ 2015-11-04 13:58 UTC (permalink / raw)
To: openembedded-core
The following changes since commit e44ed8c18e395b9c055aefee113b90708e8a8a2f:
build-appliance-image: Update to jethro head revision (2015-11-03 14:02:57 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/aarch64_lib32
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/aarch64_lib32
Robert Yang (1):
cross-canadian/libgcc: fix aarch64's multilib SDK
meta/classes/cross-canadian.bbclass | 3 +++
meta/recipes-devtools/gcc/libgcc-common.inc | 24 +++++++++++++++++-------
meta/recipes-devtools/gcc/libgcc.inc | 2 +-
3 files changed, 21 insertions(+), 8 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] cross-canadian/libgcc: fix aarch64's multilib SDK
2015-11-04 13:58 [PATCH 0/1] cross-canadian/libgcc: fix aarch64's multilib SDK Robert Yang
@ 2015-11-04 13:58 ` Robert Yang
2015-11-05 1:48 ` Robert Yang
2015-11-09 16:27 ` Burton, Ross
0 siblings, 2 replies; 7+ messages in thread
From: Robert Yang @ 2015-11-04 13:58 UTC (permalink / raw)
To: openembedded-core
The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
this makes multilib sdk doesn't work, for example:
MACHINE = qemuarm64
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
$ bitbake core-image-minimal -cpopulate_sdk
Then extract SDK, the
environment-setup-armv7a-vfp-neon-pokymllib32-linux-gnueabi
doesn't work since:
* The CC is arm-pokymllib32-linux-gnueabi-gcc
which doesn't exist, the patch for cross-canadian.bbclass
fixes problem.
* Need aarch64-poky-linux/usr/lib/arm-poky-linux-linux-gnueabi
which doesn't exist, the patch for libgcc-common.inc fixes the
problem.
[YOCTO #8616]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/cross-canadian.bbclass | 3 +++
meta/recipes-devtools/gcc/libgcc-common.inc | 24 +++++++++++++++++-------
meta/recipes-devtools/gcc/libgcc.inc | 2 +-
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index ea17f09..bf016de 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -18,6 +18,7 @@ PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
CANADIANEXTRAOS = "linux-uclibc linux-musl"
CANADIANEXTRAVENDOR = ""
MODIFYTOS ??= "1"
+GNUEABI_SUFFIX = ""
python () {
archs = d.getVar('PACKAGE_ARCHS', True).split()
sdkarchs = []
@@ -69,6 +70,7 @@ python () {
d.appendVar("CANADIANEXTRAOS", " linux-gnun32 linux-uclibcn32 linux-musln32")
if tarch == "arm" or tarch == "armeb":
d.setVar("TARGET_OS", "linux-gnueabi")
+ d.setVar("GNUEABI_SUFFIX", "-gnueabi")
else:
d.setVar("TARGET_OS", "linux")
@@ -167,6 +169,7 @@ SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2"
cross_canadian_bindirlinks () {
for i in linux ${CANADIANEXTRAOS}
do
+ i="$i${GNUEABI_SUFFIX}"
for v in ${CANADIANEXTRAVENDOR}
do
d=${D}${bindir}/../${TARGET_ARCH}$v-$i
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
index b09ea65..71e09d8 100644
--- a/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -134,11 +134,21 @@ BASETARGET_SYS = "${TARGET_ARCH}${ORIG_TARGET_VENDOROS}"
addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
fakeroot python do_extra_symlinks() {
- targetsys = d.getVar('BASETARGET_SYS', True)
-
- if targetsys != d.getVar('TARGET_SYS', True):
- dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + targetsys
- src = d.getVar('TARGET_SYS', True)
- if not os.path.lexists(dest) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
- os.symlink(src, dest)
+ base_targetsys = d.getVar('BASETARGET_SYS', True)
+ targetsys = d.getVar('TARGET_SYS', True)
+
+ if base_targetsys != targetsys:
+ dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + base_targetsys
+ dest_list = [dest]
+ # For multilib like aarch64 + arm, need 2 symlinks:
+ # 1) BASETARGET_SYS as usual
+ # 2) BASETARGET_SYS + "-gnueabi" for multilib
+ libce = d.getVar('LIBCEXTENSION', True)
+ abie = d.getVar('ABIEXTENSION', True)
+ if abie and libce and targetsys.endswith(libce + abie):
+ dest_list.append(dest + libce + abie)
+ src = targetsys
+ for dir in dest_list:
+ if not os.path.lexists(dir) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
+ os.symlink(src, dir)
}
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 95fa3f4..94cde2e 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -17,7 +17,7 @@ LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
FILES_${PN}-dev = "\
${base_libdir}/libgcc*.so \
- ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+ ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)}* \
${libdir}/${TARGET_SYS}/${BINV}* \
"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] cross-canadian/libgcc: fix aarch64's multilib SDK
2015-11-04 13:58 ` [PATCH 1/1] " Robert Yang
@ 2015-11-05 1:48 ` Robert Yang
2015-11-09 16:27 ` Burton, Ross
1 sibling, 0 replies; 7+ messages in thread
From: Robert Yang @ 2015-11-05 1:48 UTC (permalink / raw)
To: openembedded-core
On 11/04/2015 09:58 PM, Robert Yang wrote:
> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
> this makes multilib sdk doesn't work, for example:
>
> MACHINE = qemuarm64
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
>
> $ bitbake core-image-minimal -cpopulate_sdk
>
> Then extract SDK, the
> environment-setup-armv7a-vfp-neon-pokymllib32-linux-gnueabi
> doesn't work since:
> * The CC is arm-pokymllib32-linux-gnueabi-gcc
> which doesn't exist, the patch for cross-canadian.bbclass
> fixes problem.
> * Need aarch64-poky-linux/usr/lib/arm-poky-linux-linux-gnueabi
> which doesn't exist, the patch for libgcc-common.inc fixes the
> problem.
>
> [YOCTO #8616]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/classes/cross-canadian.bbclass | 3 +++
> meta/recipes-devtools/gcc/libgcc-common.inc | 24 +++++++++++++++++-------
> meta/recipes-devtools/gcc/libgcc.inc | 2 +-
> 3 files changed, 21 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
> index ea17f09..bf016de 100644
> --- a/meta/classes/cross-canadian.bbclass
> +++ b/meta/classes/cross-canadian.bbclass
> @@ -18,6 +18,7 @@ PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
> CANADIANEXTRAOS = "linux-uclibc linux-musl"
> CANADIANEXTRAVENDOR = ""
> MODIFYTOS ??= "1"
> +GNUEABI_SUFFIX = ""
> python () {
> archs = d.getVar('PACKAGE_ARCHS', True).split()
> sdkarchs = []
> @@ -69,6 +70,7 @@ python () {
> d.appendVar("CANADIANEXTRAOS", " linux-gnun32 linux-uclibcn32 linux-musln32")
> if tarch == "arm" or tarch == "armeb":
> d.setVar("TARGET_OS", "linux-gnueabi")
> + d.setVar("GNUEABI_SUFFIX", "-gnueabi")
> else:
> d.setVar("TARGET_OS", "linux")
>
> @@ -167,6 +169,7 @@ SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2"
> cross_canadian_bindirlinks () {
> for i in linux ${CANADIANEXTRAOS}
> do
> + i="$i${GNUEABI_SUFFIX}"
> for v in ${CANADIANEXTRAVENDOR}
> do
> d=${D}${bindir}/../${TARGET_ARCH}$v-$i
> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
> index b09ea65..71e09d8 100644
> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
> @@ -134,11 +134,21 @@ BASETARGET_SYS = "${TARGET_ARCH}${ORIG_TARGET_VENDOROS}"
>
> addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
> fakeroot python do_extra_symlinks() {
> - targetsys = d.getVar('BASETARGET_SYS', True)
> -
> - if targetsys != d.getVar('TARGET_SYS', True):
> - dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + targetsys
> - src = d.getVar('TARGET_SYS', True)
> - if not os.path.lexists(dest) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
> - os.symlink(src, dest)
> + base_targetsys = d.getVar('BASETARGET_SYS', True)
> + targetsys = d.getVar('TARGET_SYS', True)
> +
> + if base_targetsys != targetsys:
> + dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + base_targetsys
> + dest_list = [dest]
> + # For multilib like aarch64 + arm, need 2 symlinks:
> + # 1) BASETARGET_SYS as usual
> + # 2) BASETARGET_SYS + "-gnueabi" for multilib
> + libce = d.getVar('LIBCEXTENSION', True)
> + abie = d.getVar('ABIEXTENSION', True)
> + if abie and libce and targetsys.endswith(libce + abie):
> + dest_list.append(dest + libce + abie)
> + src = targetsys
> + for dir in dest_list:
> + if not os.path.lexists(dir) and os.path.lexists(d.getVar('D', True) + d.getVar('libdir', True)):
> + os.symlink(src, dir)
> }
> diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
> index 95fa3f4..94cde2e 100644
> --- a/meta/recipes-devtools/gcc/libgcc.inc
> +++ b/meta/recipes-devtools/gcc/libgcc.inc
> @@ -17,7 +17,7 @@ LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
>
> FILES_${PN}-dev = "\
> ${base_libdir}/libgcc*.so \
> - ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
> + ${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)}* \
The "*" should be after ${libdir}/${BASETARGET_SYS} rather than in the end,
I updated it in the repo.
// Robert
> ${libdir}/${TARGET_SYS}/${BINV}* \
> "
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] cross-canadian/libgcc: fix aarch64's multilib SDK
2015-11-04 13:58 ` [PATCH 1/1] " Robert Yang
2015-11-05 1:48 ` Robert Yang
@ 2015-11-09 16:27 ` Burton, Ross
2015-11-10 1:41 ` Robert Yang
2015-11-13 9:24 ` Robert Yang
1 sibling, 2 replies; 7+ messages in thread
From: Burton, Ross @ 2015-11-09 16:27 UTC (permalink / raw)
To: Robert Yang; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]
On 4 November 2015 at 13:58, Robert Yang <liezhi.yang@windriver.com> wrote:
> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
> this makes multilib sdk doesn't work, for example:
>
> MACHINE = qemuarm64
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
>
> $ bitbake core-image-minimal -cpopulate_sdk
>
> Then extract SDK, the
> environment-setup-armv7a-vfp-neon-pokymllib32-linux-gnueabi
> doesn't work since:
> * The CC is arm-pokymllib32-linux-gnueabi-gcc
> which doesn't exist, the patch for cross-canadian.bbclass
> fixes problem.
> * Need aarch64-poky-linux/usr/lib/arm-poky-linux-linux-gnueabi
> which doesn't exist, the patch for libgcc-common.inc fixes the
> problem.
>
> [YOCTO #8616]
>
This breaks the allarch sstate sanity test on the autobuilder which
verifies that allarch recipes don't have different hashes for a no-op
change to the machine.
https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/242/steps/Running%20oe-selftest/logs/stdio
Ross
[-- Attachment #2: Type: text/html, Size: 1943 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] cross-canadian/libgcc: fix aarch64's multilib SDK
2015-11-09 16:27 ` Burton, Ross
@ 2015-11-10 1:41 ` Robert Yang
2015-11-13 9:24 ` Robert Yang
1 sibling, 0 replies; 7+ messages in thread
From: Robert Yang @ 2015-11-10 1:41 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 11/10/2015 12:27 AM, Burton, Ross wrote:
>
> On 4 November 2015 at 13:58, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
> this makes multilib sdk doesn't work, for example:
>
> MACHINE = qemuarm64
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
>
> $ bitbake core-image-minimal -cpopulate_sdk
>
> Then extract SDK, the
> environment-setup-armv7a-vfp-neon-pokymllib32-linux-gnueabi
> doesn't work since:
> * The CC is arm-pokymllib32-linux-gnueabi-gcc
> which doesn't exist, the patch for cross-canadian.bbclass
> fixes problem.
> * Need aarch64-poky-linux/usr/lib/arm-poky-linux-linux-gnueabi
> which doesn't exist, the patch for libgcc-common.inc fixes the
> problem.
>
> [YOCTO #8616]
>
>
> This breaks the allarch sstate sanity test on the autobuilder which verifies
> that allarch recipes don't have different hashes for a no-op change to the machine.
Sorry, I will check and update it.
// Robert
>
> https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/242/steps/Running%20oe-selftest/logs/stdio
>
> Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] cross-canadian/libgcc: fix aarch64's multilib SDK
2015-11-09 16:27 ` Burton, Ross
2015-11-10 1:41 ` Robert Yang
@ 2015-11-13 9:24 ` Robert Yang
2016-01-04 2:28 ` ChenQi
1 sibling, 1 reply; 7+ messages in thread
From: Robert Yang @ 2015-11-13 9:24 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 11/10/2015 12:27 AM, Burton, Ross wrote:
>
> On 4 November 2015 at 13:58, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
> this makes multilib sdk doesn't work, for example:
>
> MACHINE = qemuarm64
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
>
> $ bitbake core-image-minimal -cpopulate_sdk
>
> Then extract SDK, the
> environment-setup-armv7a-vfp-neon-pokymllib32-linux-gnueabi
> doesn't work since:
> * The CC is arm-pokymllib32-linux-gnueabi-gcc
> which doesn't exist, the patch for cross-canadian.bbclass
> fixes problem.
> * Need aarch64-poky-linux/usr/lib/arm-poky-linux-linux-gnueabi
> which doesn't exist, the patch for libgcc-common.inc fixes the
> problem.
>
> [YOCTO #8616]
>
>
> This breaks the allarch sstate sanity test on the autobuilder which verifies
> that allarch recipes don't have different hashes for a no-op change to the machine.
Hi Ross,
After more investigations, the different between:
MACHINE=qemux86 bitbake -Snone meta-toolchain
MACHINE=qemuarm bitbake -Snone meta-toolchain
is do_extra_symlinks' checksum, there is an ABIEXTENSION for
nativesdk-libgcc-initial when qemuarm (eabi), and no "eabi" when
qemux86.
But as the commit said, the "eabi" is a must for qemuarm since its compiler
arm-pokymllib32-linux-gnueabi-gcc contains eabi, otherwise it doesn't work.
Maybe let the test case don't compare between qemuarm and qemux86 since
arm is special ? Or do you have any other suggestions, please ?
// Robert
>
> https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/242/steps/Running%20oe-selftest/logs/stdio
>
> Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] cross-canadian/libgcc: fix aarch64's multilib SDK
2015-11-13 9:24 ` Robert Yang
@ 2016-01-04 2:28 ` ChenQi
0 siblings, 0 replies; 7+ messages in thread
From: ChenQi @ 2016-01-04 2:28 UTC (permalink / raw)
To: Robert Yang, Burton, Ross; +Cc: OE-core
On 11/13/2015 05:24 PM, Robert Yang wrote:
>
>
> On 11/10/2015 12:27 AM, Burton, Ross wrote:
>>
>> On 4 November 2015 at 13:58, Robert Yang <liezhi.yang@windriver.com
>> <mailto:liezhi.yang@windriver.com>> wrote:
>>
>> The arm toolchain has a "-gnueabi" suffix, but aarch64 doesn't,
>> this makes multilib sdk doesn't work, for example:
>>
>> MACHINE = qemuarm64
>> require conf/multilib.conf
>> MULTILIBS = "multilib:lib32"
>> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
>>
>> $ bitbake core-image-minimal -cpopulate_sdk
>>
>> Then extract SDK, the
>> environment-setup-armv7a-vfp-neon-pokymllib32-linux-gnueabi
>> doesn't work since:
>> * The CC is arm-pokymllib32-linux-gnueabi-gcc
>> which doesn't exist, the patch for cross-canadian.bbclass
>> fixes problem.
>> * Need aarch64-poky-linux/usr/lib/arm-poky-linux-linux-gnueabi
>> which doesn't exist, the patch for libgcc-common.inc fixes the
>> problem.
>>
>> [YOCTO #8616]
>>
>>
>> This breaks the allarch sstate sanity test on the autobuilder which
>> verifies
>> that allarch recipes don't have different hashes for a no-op change
>> to the machine.
>
> Hi Ross,
>
> After more investigations, the different between:
> MACHINE=qemux86 bitbake -Snone meta-toolchain
> MACHINE=qemuarm bitbake -Snone meta-toolchain
>
> is do_extra_symlinks' checksum, there is an ABIEXTENSION for
> nativesdk-libgcc-initial when qemuarm (eabi), and no "eabi" when
> qemux86.
>
> But as the commit said, the "eabi" is a must for qemuarm since its
> compiler
> arm-pokymllib32-linux-gnueabi-gcc contains eabi, otherwise it doesn't
> work.
>
> Maybe let the test case don't compare between qemuarm and qemux86 since
> arm is special ? Or do you have any other suggestions, please ?
>
>
> // Robert
>
Ping ...
>>
>> https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/242/steps/Running%20oe-selftest/logs/stdio
>>
>>
>> Ross
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-01-04 2:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 13:58 [PATCH 0/1] cross-canadian/libgcc: fix aarch64's multilib SDK Robert Yang
2015-11-04 13:58 ` [PATCH 1/1] " Robert Yang
2015-11-05 1:48 ` Robert Yang
2015-11-09 16:27 ` Burton, Ross
2015-11-10 1:41 ` Robert Yang
2015-11-13 9:24 ` Robert Yang
2016-01-04 2:28 ` ChenQi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox