summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 801896a5b9..f254306d3b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -334,6 +334,38 @@ do_build () {
334 : 334 :
335} 335}
336 336
337def set_packagetriplet(d):
338 archs = []
339 tos = []
340 tvs = []
341
342 archs.append(d.getVar("PACKAGE_ARCHS", True).split())
343 tos.append(d.getVar("TARGET_OS", True))
344 tvs.append(d.getVar("TARGET_VENDOR", True))
345
346 def settriplet(d, varname, archs, tos, tvs):
347 triplets = []
348 for i in range(len(archs)):
349 for arch in archs[i]:
350 triplets.append(arch + tvs[i] + "-" + tos[i])
351 triplets.reverse()
352 d.setVar(varname, " ".join(triplets))
353
354 settriplet(d, "PKGTRIPLETS", archs, tos, tvs)
355
356 variants = d.getVar("MULTILIB_VARIANTS", True) or ""
357 for item in variants.split():
358 localdata = bb.data.createCopy(d)
359 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
360 localdata.setVar("OVERRIDES", overrides)
361 bb.data.update_data(localdata)
362
363 archs.append(localdata.getVar("PACKAGE_ARCHS", True).split())
364 tos.append(localdata.getVar("TARGET_OS", True))
365 tvs.append(localdata.getVar("TARGET_VENDOR", True))
366
367 settriplet(d, "PKGMLTRIPLETS", archs, tos, tvs)
368
337python () { 369python () {
338 import exceptions, string, re 370 import exceptions, string, re
339 371
@@ -521,6 +553,8 @@ python () {
521 if ".zip" in srcuri: 553 if ".zip" in srcuri:
522 d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot') 554 d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
523 555
556 set_packagetriplet(d)
557
524 # 'multimachine' handling 558 # 'multimachine' handling
525 mach_arch = d.getVar('MACHINE_ARCH', True) 559 mach_arch = d.getVar('MACHINE_ARCH', True)
526 pkg_arch = d.getVar('PACKAGE_ARCH', True) 560 pkg_arch = d.getVar('PACKAGE_ARCH', True)