summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/utils.bbclass20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index d834a8a277..549e4b82f5 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -349,6 +349,14 @@ def multilib_pkg_extend(d, pkg):
349 pkgs = pkgs + " " + v + "-" + pkg 349 pkgs = pkgs + " " + v + "-" + pkg
350 return pkgs 350 return pkgs
351 351
352def get_multilib_datastore(variant, d):
353 localdata = bb.data.createCopy(d)
354 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
355 localdata.setVar("OVERRIDES", overrides)
356 localdata.setVar("MLPREFIX", variant + "-")
357 bb.data.update_data(localdata)
358 return localdata
359
352def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '): 360def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
353 """Return a string of all ${var} in all multilib tune configuration""" 361 """Return a string of all ${var} in all multilib tune configuration"""
354 values = [] 362 values = []
@@ -361,11 +369,7 @@ def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = '
361 values.append(value) 369 values.append(value)
362 variants = d.getVar("MULTILIB_VARIANTS") or "" 370 variants = d.getVar("MULTILIB_VARIANTS") or ""
363 for item in variants.split(): 371 for item in variants.split():
364 localdata = bb.data.createCopy(d) 372 localdata = get_multilib_datastore(item, d)
365 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
366 localdata.setVar("OVERRIDES", overrides)
367 localdata.setVar("MLPREFIX", item + "-")
368 bb.data.update_data(localdata)
369 value = localdata.getVar(var) or "" 373 value = localdata.getVar(var) or ""
370 if value != "": 374 if value != "":
371 if need_split: 375 if need_split:
@@ -411,11 +415,7 @@ def all_multilib_tune_list(vars, d):
411 values[v].append(localdata.getVar(v)) 415 values[v].append(localdata.getVar(v))
412 variants = d.getVar("MULTILIB_VARIANTS") or "" 416 variants = d.getVar("MULTILIB_VARIANTS") or ""
413 for item in variants.split(): 417 for item in variants.split():
414 localdata = bb.data.createCopy(d) 418 localdata = get_multilib_datastore(item, d)
415 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
416 localdata.setVar("OVERRIDES", overrides)
417 localdata.setVar("MLPREFIX", item + "-")
418 bb.data.update_data(localdata)
419 values[v].append(localdata.getVar(v)) 419 values[v].append(localdata.getVar(v))
420 values['ml'].append(item) 420 values['ml'].append(item)
421 return values 421 return values