diff options
Diffstat (limited to 'meta/classes/utils.bbclass')
-rw-r--r-- | meta/classes/utils.bbclass | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index c66c18449a..56abdd844c 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass | |||
@@ -352,12 +352,16 @@ def extend_variants(d, var, extend, delim=':'): | |||
352 | variants.append(eext[1]) | 352 | variants.append(eext[1]) |
353 | return " ".join(variants) | 353 | return " ".join(variants) |
354 | 354 | ||
355 | def all_multilib_tune_values(d, var, unique=True): | 355 | def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '): |
356 | """Return a string of all ${var} in all multilib tune configuration""" | 356 | """Return a string of all ${var} in all multilib tune configuration""" |
357 | values = [] | 357 | values = [] |
358 | value = d.getVar(var, True) or "" | 358 | value = d.getVar(var, True) or "" |
359 | if value != "": | 359 | if value != "": |
360 | values.append(value) | 360 | if need_split: |
361 | for item in value.split(delim): | ||
362 | values.append(item) | ||
363 | else: | ||
364 | values.append(value) | ||
361 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" | 365 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" |
362 | for item in variants.split(): | 366 | for item in variants.split(): |
363 | localdata = bb.data.createCopy(d) | 367 | localdata = bb.data.createCopy(d) |
@@ -366,7 +370,17 @@ def all_multilib_tune_values(d, var, unique=True): | |||
366 | bb.data.update_data(localdata) | 370 | bb.data.update_data(localdata) |
367 | value = localdata.getVar(var, True) or "" | 371 | value = localdata.getVar(var, True) or "" |
368 | if value != "": | 372 | if value != "": |
369 | values.append(value) | 373 | if need_split: |
374 | for item in value.split(delim): | ||
375 | values.append(item) | ||
376 | else: | ||
377 | values.append(value) | ||
370 | if unique: | 378 | if unique: |
371 | values = set(values) | 379 | #we do this to keep order as much as possible |
372 | return " ".join(values) | 380 | ret = [] |
381 | for value in values: | ||
382 | if not value in ret: | ||
383 | ret.append(value) | ||
384 | else: | ||
385 | ret = values | ||
386 | return " ".join(ret) | ||