All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 9/9] debug_build: defer inherit bblcass debug_build when DEBUG_BUILD is true
       [not found] <18669FECD58FB457.22280@lists.openembedded.org>
@ 2025-09-22  6:54 ` Hongxu Jia
       [not found] ` <18678856A5E59549.12551@lists.openembedded.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Hongxu Jia @ 2025-09-22  6:54 UTC (permalink / raw)
  To: openembedded-core, peter.kjellerstedt; +Cc: mathieu.dubois-briand

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 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

Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 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

diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 6de17d1bb5..0f4398e26f 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -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
diff --git a/meta/classes-recipe/debug_build.bbclass b/meta/classes-recipe/debug_build.bbclass
new file mode 100644
index 0000000000..a917e9cbc9
--- /dev/null
+++ b/meta/classes-recipe/debug_build.bbclass
@@ -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
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index f9818d2a06..93fd57548d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2 9/9] debug_build: defer inherit bblcass debug_build when DEBUG_BUILD is true
       [not found] ` <18678856A5E59549.12551@lists.openembedded.org>
@ 2025-09-26  1:04   ` Hongxu Jia
  2025-09-29  8:31     ` Mathieu Dubois-Briand
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2025-09-26  1:04 UTC (permalink / raw)
  To: hongxu.jia, openembedded-core, peter.kjellerstedt; +Cc: mathieu.dubois-briand

Hi Mathieu,

Ping, or should I resend the whole series?

//Hongxu

On 9/22/25 14:54, hongxu via lists.openembedded.org wrote:
> 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 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
>
> Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>   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
>
> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
> index 6de17d1bb5..0f4398e26f 100644
> --- a/meta/classes-global/base.bbclass
> +++ b/meta/classes-global/base.bbclass
> @@ -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
> diff --git a/meta/classes-recipe/debug_build.bbclass b/meta/classes-recipe/debug_build.bbclass
> new file mode 100644
> index 0000000000..a917e9cbc9
> --- /dev/null
> +++ b/meta/classes-recipe/debug_build.bbclass
> @@ -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
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index f9818d2a06..93fd57548d 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [hongxu.jia@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2 9/9] debug_build: defer inherit bblcass debug_build when DEBUG_BUILD is true
  2025-09-26  1:04   ` [OE-core] " Hongxu Jia
@ 2025-09-29  8:31     ` Mathieu Dubois-Briand
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Dubois-Briand @ 2025-09-29  8:31 UTC (permalink / raw)
  To: hongxu.jia, openembedded-core, peter.kjellerstedt

On Fri Sep 26, 2025 at 3:04 AM CEST, hongxu via lists.openembedded.org wrote:
> 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

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-29  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <18669FECD58FB457.22280@lists.openembedded.org>
2025-09-22  6:54 ` [PATCH v2 9/9] debug_build: defer inherit bblcass debug_build when DEBUG_BUILD is true Hongxu Jia
     [not found] ` <18678856A5E59549.12551@lists.openembedded.org>
2025-09-26  1:04   ` [OE-core] " Hongxu Jia
2025-09-29  8:31     ` Mathieu Dubois-Briand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.