debug_build: defer inherit bblcass debug_build when DEBUG_BUILD is true
PATCH v2 9/9 debug_build: defer inherit bblcass debug_build when DEBUG_BUILD is true
In reply to a message not in the archiveWhile setting DEBUG_BUILD = "1" in local.conf, the debug build is enabled globally. For the recipe (such as qemu) which doesn't work without optimization, we have to set DEBUG_BUILD = "0" in the recipe. In this situation, conf/distro/include/debug_build.inc is included, although set DEBUG_BUILD = "0" in qemu recipe, the debug build is still enabled for qemu and break qemu build.
This commit defer inherit bblcass debug_build when DEBUG_BUILD is true, then include_all so that debug_build.inc is only included if DEBUG_BUILD is actually set for a given recip
--- meta/classes-global/base.bbclass | 3 +++ meta/classes-recipe/debug_build.bbclass | 8 ++++++++ meta/conf/bitbake.conf | 2 -- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 meta/classes-recipe/debug_build.bbclass
meta/classes-global/base.bbclass +3 -0
@@ -35,6 +35,9 @@ TOOLCHAIN_NATIVE ??= "${PREFERRED_TOOLCHAIN_NATIVE}" inherit_defer toolchain/${TOOLCHAIN_NATIVE}-native inherit_defer toolchain/${TOOLCHAIN} +DEBUG_BUILD ??= "0" +inherit_defer ${@oe.utils.vartrue('DEBUG_BUILD', 'debug_build', '', d)} + def lsb_distro_identifier(d): adjust = d.getVar('LSB_DISTRO_ADJUST') adjust_func = None
meta/classes-recipe/debug_build.bbclass new file +8 -0
@@ -0,0 +1,8 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +# Allow other layers to add their own debug build configurations +include_all conf/distro/include/debug_build.inc
meta/conf/bitbake.conf +0 -2
@@ -830,8 +830,6 @@ include conf/licenses.conf require conf/sanity.conf include conf/bblock.conf -# Allow other layers to add their own debug build configurations -include_all ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)} ################################################################## # Weak variables (usually to retain backwards compatibility)
Signature · 1 line
2.34.1
Hi Mathieu,
Ping, or should I resend the whole series?
//Hongxu
Quoted 70 lines · hongxu via lists.openembedded.org
While setting
DEBUG_BUILD= "1" in local.conf, the debug build is enabled globally. For the recipe (such as qemu) which doesn't work without optimization, we have to setDEBUG_BUILD= "0" in the recipe. In this situation, conf/distro/include/debug_build.inc is included, although setDEBUG_BUILD= "0" in qemu recipe, the debug build is still enabled for qemu and break qemu build.This commit defer inherit bblcass
debug_buildwhenDEBUG_BUILDis true, theninclude_allso that debug_build.inc is only included ifDEBUG_BUILDis actually set for a given recipSuggested-by Peter Kjellerstedt <[email protected]>Signed-off-by Hongxu Jia <[email protected]>--- meta/classes-global/base.bbclass | 3 +++ meta/classes-recipe/debug_build.bbclass | 8 ++++++++ meta/conf/bitbake.conf | 2 -- 3 files changed, 11 insertions(+), 2 deletions(-)create mode 100644 meta/classes-recipe/debug_build.bbclass
meta/classes-global/base.bbclass +3
-0@@ -35,6 +35,9 @@ TOOLCHAIN_NATIVE ??= "${PREFERRED_TOOLCHAIN_NATIVE}" inherit_defer toolchain/${TOOLCHAIN_NATIVE}-native inherit_defer toolchain/${TOOLCHAIN} +DEBUG_BUILD ??= "0" +inherit_defer ${@oe.utils.vartrue('DEBUG_BUILD', 'debug_build', '', d)} + def lsb_distro_identifier(d): adjust = d.getVar('LSB_DISTRO_ADJUST') adjust_func = Nonemeta/classes-recipe/debug_build.bbclass new file +8
-0@@ -0,0 +1,8 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +# Allow other layers to add their own debug build configurations +include_all conf/distro/include/debug_build.incmeta/conf/bitbake.conf +0
-3@@ -830,8 +830,6 @@ include conf/licenses.conf require conf/sanity.conf include conf/bblock.conf -# Allow other layers to add their own debug build configurations -include_all ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)} ################################################################## # Weak variables (usually to retain backwards compatibility) -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#223806): https://lists.openembedded.org/g/openembedded-core/message/223806
Mute This Topic: https://lists.openembedded.org/mt/115371609/3617049
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 6 lines · hongxu via lists.openembedded.org
Hi Mathieu,
Ping, or should I resend the whole series?
//Hongxu
Hi Hongxu,
The other part of the series was discussed in the Thursday patch review meeting. As far as I remember, it was rejected because it complicates a bit the whole thing while it should be simplifying. I was not directly involved in the discussion, so I might miss a few points here. You should have got some feedback about it, but it looks like it was lost somehow.
You might want to resend the whole series to trigger discussion.
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com