From d3f991a5392cc1ce9332fa8339cbf37228ab56a0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 31 Jul 2015 11:28:56 +0100 Subject: cross-canadian: Add symlinks for multilib cases In the same way we map various TARGET_OS options back to the single cross-canadian compiler, add mappings for the TARGET_VENDOR cases we know about in the multilib case. (From OE-Core rev: 753c98324ae82a67104eaf36e7ebf3553ee1dad7) Signed-off-by: Richard Purdie --- meta/classes/cross-canadian.bbclass | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'meta/classes/cross-canadian.bbclass') diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index a4ce5c7b98..dca0b38d2b 100644 --- a/meta/classes/cross-canadian.bbclass +++ b/meta/classes/cross-canadian.bbclass @@ -16,6 +16,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S # PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" CANADIANEXTRAOS = "linux-uclibc linux-musl" +CANADIANEXTRAVENDOR = "" MODIFYTOS ??= "1" python () { archs = d.getVar('PACKAGE_ARCHS', True).split() @@ -65,6 +66,17 @@ python () { d.setVar("TARGET_OS", "linux-gnueabi") else: d.setVar("TARGET_OS", "linux") + + # Also need to handle multilib target vendors + vendors = d.getVar("CANADIANEXTRAVENDOR", True) + if not vendors: + vendors = all_multilib_tune_values(d, 'TARGET_VENDOR') + origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL", True) + if origvendor: + d.setVar("TARGET_VENDOR", origvendor) + if origvendor not in vendors.split(): + vendors = origvendor + " " + vendors + d.setVar("CANADIANEXTRAVENDOR", vendors) } MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" @@ -148,14 +160,21 @@ SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2" SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2" cross_canadian_bindirlinks () { - for i in ${CANADIANEXTRAOS} + for i in linux ${CANADIANEXTRAOS} do - d=${D}${bindir}/../${TARGET_ARCH}${TARGET_VENDOR}-$i - install -d $d - for j in `ls ${D}${bindir}` + for v in ${CANADIANEXTRAVENDOR} do - p=${TARGET_ARCH}${TARGET_VENDOR}-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` - ln -s ../${TARGET_SYS}/$j $d/$p + d=${D}${bindir}/../${TARGET_ARCH}$v-$i + if [ -d $d ]; + then + continue + fi + install -d $d + for j in `ls ${D}${bindir}` + do + p=${TARGET_ARCH}$v-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` + ln -s ../${TARGET_SYS}/$j $d/$p + done done done } -- cgit v1.2.3-54-g00ecf