diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-31 11:28:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-31 15:15:12 +0100 |
commit | 753c98324ae82a67104eaf36e7ebf3553ee1dad7 (patch) | |
tree | e2e0c7beeb3eee4dbfd0f4d6ef362a80d57f523f /meta/classes | |
parent | 89cd6c244b6bc0a8cb52ec84d378d5b305df030f (diff) | |
download | openembedded-core-contrib-753c98324ae82a67104eaf36e7ebf3553ee1dad7.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index a4ce5c7b98e..dca0b38d2be 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 } |