diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-31 11:28:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-01 07:34:05 +0100 |
commit | d3f991a5392cc1ce9332fa8339cbf37228ab56a0 (patch) | |
tree | c0a69ba89d881d020597f84ecdd8df26826071b5 | |
parent | c1148330a141e05a522d6ebffd5ef91086b9400b (diff) | |
download | poky-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.bbclass | 31 |
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 | # |
17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" | 17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
18 | CANADIANEXTRAOS = "linux-uclibc linux-musl" | 18 | CANADIANEXTRAOS = "linux-uclibc linux-musl" |
19 | CANADIANEXTRAVENDOR = "" | ||
19 | MODIFYTOS ??= "1" | 20 | MODIFYTOS ??= "1" |
20 | python () { | 21 | python () { |
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 | } |
69 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" | 81 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" |
70 | 82 | ||
@@ -148,14 +160,21 @@ SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs2" | |||
148 | SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2" | 160 | SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs2" |
149 | 161 | ||
150 | cross_canadian_bindirlinks () { | 162 | cross_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 | } |