summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-31 11:28:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 07:34:05 +0100
commitd3f991a5392cc1ce9332fa8339cbf37228ab56a0 (patch)
treec0a69ba89d881d020597f84ecdd8df26826071b5
parentc1148330a141e05a522d6ebffd5ef91086b9400b (diff)
downloadpoky-d3f991a5392cc1ce9332fa8339cbf37228ab56a0.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. (From OE-Core rev: 753c98324ae82a67104eaf36e7ebf3553ee1dad7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/cross-canadian.bbclass31
1 files changed, 25 insertions, 6 deletions
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
16# 16#
17PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" 17PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
18CANADIANEXTRAOS = "linux-uclibc linux-musl" 18CANADIANEXTRAOS = "linux-uclibc linux-musl"
19CANADIANEXTRAVENDOR = ""
19MODIFYTOS ??= "1" 20MODIFYTOS ??= "1"
20python () { 21python () {
21 archs = d.getVar('PACKAGE_ARCHS', True).split() 22 archs = d.getVar('PACKAGE_ARCHS', True).split()
@@ -65,6 +66,17 @@ python () {
65 d.setVar("TARGET_OS", "linux-gnueabi") 66 d.setVar("TARGET_OS", "linux-gnueabi")
66 else: 67 else:
67 d.setVar("TARGET_OS", "linux") 68 d.setVar("TARGET_OS", "linux")
69
70 # Also need to handle multilib target vendors
71 vendors = d.getVar("CANADIANEXTRAVENDOR", True)
72 if not vendors:
73 vendors = all_multilib_tune_values(d, 'TARGET_VENDOR')
74 origvendor = d.getVar("TARGET_VENDOR_MULTILIB_ORIGINAL", True)
75 if origvendor:
76 d.setVar("TARGET_VENDOR", origvendor)
77 if origvendor not in vendors.split():
78 vendors = origvendor + " " + vendors
79 d.setVar("CANADIANEXTRAVENDOR", vendors)
68} 80}
69MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" 81MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
70 82
@@ -148,14 +160,21 @@ SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2"
148SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2" 160SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2"
149 161
150cross_canadian_bindirlinks () { 162cross_canadian_bindirlinks () {
151 for i in ${CANADIANEXTRAOS} 163 for i in linux ${CANADIANEXTRAOS}
152 do 164 do
153 d=${D}${bindir}/../${TARGET_ARCH}${TARGET_VENDOR}-$i 165 for v in ${CANADIANEXTRAVENDOR}
154 install -d $d
155 for j in `ls ${D}${bindir}`
156 do 166 do
157 p=${TARGET_ARCH}${TARGET_VENDOR}-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` 167 d=${D}${bindir}/../${TARGET_ARCH}$v-$i
158 ln -s ../${TARGET_SYS}/$j $d/$p 168 if [ -d $d ];
169 then
170 continue
171 fi
172 install -d $d
173 for j in `ls ${D}${bindir}`
174 do
175 p=${TARGET_ARCH}$v-$i-`echo $j | sed -e s,${TARGET_PREFIX},,`
176 ln -s ../${TARGET_SYS}/$j $d/$p
177 done
159 done 178 done
160 done 179 done
161} 180}