Fix aarch64 multilib SDK problems
cover Fix aarch64 multilib SDK problems
The following changes since commit 34e7292fb40635cee1f1237ac3156530f8dfce37:
parselogs: add new whitelist entries to address 4.4.3 issues (2016-03-22 08:53:49 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib ChenQi/aarch64-multilib
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/aarch64-multilib
Chen Qi (1):
libgcc: ensure gnueabi suffix is added when necessary
Robert Yang (1):
cross-canadian/libgcc: fix aarch64's multilib SDK
meta/classes/cross-canadian.bbclass | 3 +++ meta/recipes-devtools/gcc/libgcc-common.inc | 35 ++++++++++++++++++++++------- meta/recipes-devtools/gcc/libgcc.inc | 2 +- 3 files changed, 31 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 cross-canadian/libgcc: fix aarch64's multilib SDK
From: Robert Yang <[email protected]>
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]
--- 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(-)
meta/classes/cross-canadian.bbclass +3 -0
@@ -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")
@@ -164,6 +166,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
meta/recipes-devtools/gcc/libgcc-common.inc +17 -7
@@ -135,11 +135,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) }
meta/recipes-devtools/gcc/libgcc.inc +1 -1
@@ -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}* \ "
Signature · 1 line
1.9.1
PATCH 2/2 libgcc: ensure gnueabi suffix is added when necessary
In reply to Chen QiThe '32' symlink in aarch64 multilib is broken. An example configuration to reproduce the bug is as follows.
MACHINE = qemuarm64
require conf/multilib.conf
MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
Build and install SDK, then we would find the following symlink is broken.
./sysroots/aarch64-poky-linux/usr/lib64/aarch64-poky-linux/5.3.0/32
The patch fixes the above problem.
[YOCTO #8642]
--- meta/recipes-devtools/gcc/libgcc-common.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/libgcc-common.inc +10 -1
@@ -111,9 +111,18 @@ fakeroot python do_multilib_install() { if not tune_bitness: tune_bitness = '32' # /lib => 32bit lib + suffix = "" + localdata = bb.data.createCopy(d) + override = ":virtclass-multilib-" + ml + localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override) + bb.data.update_data(localdata) + tarch = localdata.getVar('TARGET_ARCH', True) + if tarch == "arm" or tarch == "armeb": + suffix = "-gnueabi" + src = '../../../' + tune_baselib + '/' + \ tune_arch + d.getVar('TARGET_VENDOR', True) + 'ml' + ml + \ - '-' + d.getVar('TARGET_OS', True) + '/' + binv + '/' + '-' + d.getVar('TARGET_OS', True) + suffix + '/' + binv + '/' dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \ d.getVar('TARGET_SYS', True) + '/' + binv + '/' + tune_bitness
Signature · 1 line
1.9.1
ping
Quoted 20 lines · Chen Qi
The following changes since commit
34e7292fb40635cee1f1237ac3156530f8dfce37:parselogs: add new whitelist entries to address 4.4.3 issues (2016-03-22 08:53:49 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribChenQi/aarch64-multilib
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/aarch64-multilibChen Qi (1):
libgcc: ensure gnueabi suffix is added when necessaryRobert Yang (1):
cross-canadian/libgcc: fix aarch64's multilib SDKmeta/classes/cross-canadian.bbclass | 3 +++ meta/recipes-devtools/gcc/libgcc-common.inc | 35 ++++++++++++++++++++++------- meta/recipes-devtools/gcc/libgcc.inc | 2 +- 3 files changed, 31 insertions(+), 9 deletions(-)