diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/bitbake.conf | 2 | ||||
-rw-r--r-- | meta/lib/oe/utils.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index faef77142a..dbadeb38aa 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -610,7 +610,7 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}" | |||
610 | # Disabled until the option works properly -feliminate-dwarf2-dups | 610 | # Disabled until the option works properly -feliminate-dwarf2-dups |
611 | FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" | 611 | FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" |
612 | DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" | 612 | DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" |
613 | SELECTED_OPTIMIZATION = "${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD') == '1'])}" | 613 | SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}" |
614 | SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION" | 614 | SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION" |
615 | BUILD_OPTIMIZATION = "-O2 -pipe" | 615 | BUILD_OPTIMIZATION = "-O2 -pipe" |
616 | 616 | ||
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index fbda7035f1..93b0763b0a 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -25,6 +25,13 @@ def conditional(variable, checkvalue, truevalue, falsevalue, d): | |||
25 | else: | 25 | else: |
26 | return falsevalue | 26 | return falsevalue |
27 | 27 | ||
28 | def vartrue(var, iftrue, iffalse, d): | ||
29 | import oe.types | ||
30 | if oe.types.boolean(d.getVar(var)): | ||
31 | return iftrue | ||
32 | else: | ||
33 | return iffalse | ||
34 | |||
28 | def less_or_equal(variable, checkvalue, truevalue, falsevalue, d): | 35 | def less_or_equal(variable, checkvalue, truevalue, falsevalue, d): |
29 | if float(d.getVar(variable)) <= float(checkvalue): | 36 | if float(d.getVar(variable)) <= float(checkvalue): |
30 | return truevalue | 37 | return truevalue |
@@ -467,3 +474,4 @@ class ImageQAFailed(bb.build.FuncFailed): | |||
467 | msg = msg + ' (%s)' % self.description | 474 | msg = msg + ' (%s)' % self.description |
468 | 475 | ||
469 | return msg | 476 | return msg |
477 | |||