diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-11-04 00:42:30 -0800 |
---|---|---|
committer | Chen Qi <Qi.Chen@windriver.com> | 2016-03-25 10:16:46 +0800 |
commit | a6bf8ae4700486a6068bd04ad1b3c92b96dc8698 (patch) | |
tree | b03a33ea64993a36e2f134dcde32477e92b670c2 /meta/recipes-devtools/gcc/libgcc-common.inc | |
parent | 34e7292fb40635cee1f1237ac3156530f8dfce37 (diff) | |
download | openembedded-core-contrib-a6bf8ae4700486a6068bd04ad1b3c92b96dc8698.tar.gz |
cross-canadian/libgcc: fix aarch64's multilib SDK
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>
Diffstat (limited to 'meta/recipes-devtools/gcc/libgcc-common.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/libgcc-common.inc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc index dae07e96da..30a0dbb52e 100644 --- a/meta/recipes-devtools/gcc/libgcc-common.inc +++ b/meta/recipes-devtools/gcc/libgcc-common.inc @@ -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) } |