summaryrefslogtreecommitdiffstats
path: root/meta/classes/utils.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-02 08:59:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-02 21:37:47 +0100
commit29353297b508881451b8e97f7d1db2eadaa653f6 (patch)
treecd91b4639d4f16381b27aac4cb31f98b1b083009 /meta/classes/utils.bbclass
parentf1079cd1935e625c6acba3f3a2b2d493fbadddef (diff)
downloadpoky-29353297b508881451b8e97f7d1db2eadaa653f6.tar.gz
classes/utils: Improve all_multilib_tune_values
Currently there is duplication in the code, we can clean this up by extending the multilib variants list. This code also currently fails its its called from an existing multilib context since its assumes the data store passed in is the non-multilib case. When building an image, say lib32-core-image-sato, this leads to incorrect PATH values. To fix this, we also request a data store for the "" variant allowing this corner case to be fixed and for the function to correctly return values for each multilib even when a multilib is already selected. (From OE-Core rev: cc1c481560b81c223170230430308c7e2f08c812) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/utils.bbclass')
-rw-r--r--meta/classes/utils.bbclass11
1 files changed, 2 insertions, 9 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 3f4f51b56b..7035f9da25 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -328,15 +328,8 @@ def get_multilib_datastore(variant, d):
328def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '): 328def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
329 """Return a string of all ${var} in all multilib tune configuration""" 329 """Return a string of all ${var} in all multilib tune configuration"""
330 values = [] 330 values = []
331 value = d.getVar(var) or "" 331 variants = (d.getVar("MULTILIB_VARIANTS") or "").split() + ['']
332 if value != "": 332 for item in variants:
333 if need_split:
334 for item in value.split(delim):
335 values.append(item)
336 else:
337 values.append(value)
338 variants = d.getVar("MULTILIB_VARIANTS") or ""
339 for item in variants.split():
340 localdata = get_multilib_datastore(item, d) 333 localdata = get_multilib_datastore(item, d)
341 # We need WORKDIR to be consistent with the original datastore 334 # We need WORKDIR to be consistent with the original datastore
342 localdata.setVar("WORKDIR", d.getVar("WORKDIR")) 335 localdata.setVar("WORKDIR", d.getVar("WORKDIR"))