@@ -140,6 +140,46 @@ fakeroot python do_multilib_install() {
os.symlink(src, dest)
}
+# this makes multilib gcc files findable for nativesdk gcc
+# to link multilib nativesdk gcc library
+# e.g.
+# For x86_64 nativesdk-libgcc
+# sysroots/x86_64-pokysdk-linux/usr/lib/i686-pokysdk-linux/14.2.0
+# by creating this symlink to it
+# sysroots/x86_64-pokysdk-linux/usr/lib64/x86_64-pokysdk-linux/14.2.0/32
+#
+# For i686 nativesdk-libgcc
+# sysroots/i686-pokysdk-linux/usr/lib64/x86_64-pokysdk-linux/14.2.0
+# by creating this symlink to it
+# sysroots/i686-pokysdk-linux/usr/lib/i686-pokysdk-linux/14.2.0/64
+
+fakeroot python do_multilib_install:class-nativesdk() {
+ sdk_arch = d.getVar('SDK_ARCH')
+ if sdk_arch not in ['x86_64', 'i686']:
+ return
+
+ binv = d.getVar('BINV')
+ if d.getVar('SDK_ARCH') == 'x86_64':
+ tune_arch = 'i686'
+ tune_bitness = '32'
+ tune_baselib = 'lib'
+ elif d.getVar('SDK_ARCH') in ['i686', 'i586']:
+ tune_arch = 'x86_64'
+ tune_bitness = '64'
+ tune_baselib = 'lib64'
+
+ src = '../../../' + tune_baselib + '/' + \
+ tune_arch + d.getVar('SDK_VENDOR') + \
+ '-' + d.getVar('SDK_OS') + '/' + binv + '/'
+
+ dest = d.getVar('D') + d.getVar('libdir') + '/' + \
+ d.getVar('SDK_SYS') + '/' + binv + '/' + tune_bitness
+
+ if os.path.lexists(dest):
+ os.unlink(dest)
+ os.symlink(src, dest)
+}
+
def get_original_os(d):
vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}')
for suffix in [d.getVar('ABIEXTENSION'), d.getVar('LIBCEXTENSION')]:
Due to the supported SDKMACHINE includes: aarch64, i586, i686, loongarch64, ppc64, ppc64le, riscv64, x86_64 Only i586 and x86_64, i686 and x86_64 have multilib relationship, so create multilib symlinks for i686,i586,x86_64 nativesdk. It will have no regression when nativesdk-gcc disable multilib support in which the symlinks is broken [ YOCTO #15722 ] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- meta/recipes-devtools/gcc/libgcc-common.inc | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+)