* [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
2025-09-29 18:48 ` [OE-core] " Khem Raj
2025-09-16 4:09 ` [PATCH 3/8] harfbuzz: set FULL_OPTLEVEL for FULL_OPTIMIZATION Hongxu Jia
` (5 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
Add a new include file debug_build.inc to override SELECTED_OPTIMIZATION
and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled
Add separate variables FULL_OPTLEVEL, DEBUG_OPTLEVEL and BUILD_OPTLEVEL
for the optimization level, and override it for specific recipe other
than original remove and append DEBUG_OPTIMIZATION and BUILD_OPTIMIZATION
Update the documentation for FULL_OPTIMIZATION and DEBUG_OPTIMIZATION
Require the include file when DEBUG_BUILD is enabled
Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/conf/bitbake.conf | 13 +++++++------
meta/conf/distro/include/debug_build.inc | 7 +++++++
meta/conf/documentation.conf | 8 +++++---
3 files changed, 19 insertions(+), 9 deletions(-)
create mode 100644 meta/conf/distro/include/debug_build.inc
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 8e90c7bbc8..0e614c6b21 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -658,13 +658,12 @@ DEBUG_PREFIX_MAP ?= "\
"
DEBUG_LEVELFLAG ?= "-g"
-FULL_OPTIMIZATION = "-O2 ${DEBUG_LEVELFLAG}"
-DEBUG_OPTIMIZATION = "-Og ${DEBUG_LEVELFLAG}"
-SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
-SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
+FULL_OPTLEVEL ?= "-O2"
+FULL_OPTIMIZATION = "${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}"
+SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION}"
# compiler flags for native/nativesdk
-BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g', '-O2', d)}"
-BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
+BUILD_OPTLEVEL ?= "-O2"
+BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL}"
##################################################################
# Reproducibility
@@ -831,6 +830,8 @@ include conf/licenses.conf
require conf/sanity.conf
include conf/bblock.conf
+require ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
+
##################################################################
# Weak variables (usually to retain backwards compatibility)
##################################################################
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
new file mode 100644
index 0000000000..a9222a442a
--- /dev/null
+++ b/meta/conf/distro/include/debug_build.inc
@@ -0,0 +1,7 @@
+# Override SELECTED_OPTIMIZATION and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled.
+DEBUG_OPTLEVEL ?= "-Og"
+DEBUG_OPTIMIZATION = "${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}"
+SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
+# compiler flags for native/nativesdk
+BUILD_OPTLEVEL = "-Og"
+BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL} -g"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 741130a392..b643724e27 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -129,8 +129,9 @@ CVE_CHECK_LAYER_INCLUDELIST[doc] = "Defines which layers to include during cve-c
D[doc] = "The destination directory."
DATE[doc] = "The date the build was started using YMD format."
DATETIME[doc] = "The date and time the build was started."
-DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
-DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_LEVELFLAG}'."
+DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable and includes file conf/distro/include/debug_build.inc"
+DEBUG_OPTLEVEL[doc] = "The toolchain optimization level flags for debugging. This variable defaults to '-Og'"
+DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
@@ -178,7 +179,8 @@ FILESPATH[doc] = "The default set of directories the OpenEmbedded build system u
FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
-FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 ${DEBUG_LEVELFLAG}'."
+FULL_OPTLEVEL[doc] = "The toolchain optimization level flags. This variable defaults to '-O2'"
+FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
#G
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [OE-core] [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled
2025-09-16 4:09 ` [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled Hongxu Jia
@ 2025-09-29 18:48 ` Khem Raj
2025-09-29 22:52 ` Peter Kjellerstedt
0 siblings, 1 reply; 16+ messages in thread
From: Khem Raj @ 2025-09-29 18:48 UTC (permalink / raw)
To: hongxu.jia; +Cc: openembedded-core, randy.macleod, peter.kjellerstedt
On Mon, Sep 15, 2025 at 9:09 PM hongxu via lists.openembedded.org
<hongxu.jia=eng.windriver.com@lists.openembedded.org> wrote:
>
> Add a new include file debug_build.inc to override SELECTED_OPTIMIZATION
> and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled
>
> Add separate variables FULL_OPTLEVEL, DEBUG_OPTLEVEL and BUILD_OPTLEVEL
> for the optimization level, and override it for specific recipe other
> than original remove and append DEBUG_OPTIMIZATION and BUILD_OPTIMIZATION
>
> Update the documentation for FULL_OPTIMIZATION and DEBUG_OPTIMIZATION
>
> Require the include file when DEBUG_BUILD is enabled
>
I was hoping that adding DEBUG_BUILD would reduce number of global
variables to manage
but it seems to introduce another one in form of DEBUG_OPTLEVEL, this
makes the logic a bit complicated
I think it will be good to explore a bit more and see if we do not
have to do it.
> Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> meta/conf/bitbake.conf | 13 +++++++------
> meta/conf/distro/include/debug_build.inc | 7 +++++++
> meta/conf/documentation.conf | 8 +++++---
> 3 files changed, 19 insertions(+), 9 deletions(-)
> create mode 100644 meta/conf/distro/include/debug_build.inc
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 8e90c7bbc8..0e614c6b21 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -658,13 +658,12 @@ DEBUG_PREFIX_MAP ?= "\
> "
> DEBUG_LEVELFLAG ?= "-g"
>
> -FULL_OPTIMIZATION = "-O2 ${DEBUG_LEVELFLAG}"
> -DEBUG_OPTIMIZATION = "-Og ${DEBUG_LEVELFLAG}"
> -SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
> -SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
> +FULL_OPTLEVEL ?= "-O2"
> +FULL_OPTIMIZATION = "${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}"
> +SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION}"
> # compiler flags for native/nativesdk
> -BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g', '-O2', d)}"
> -BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
> +BUILD_OPTLEVEL ?= "-O2"
> +BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL}"
>
> ##################################################################
> # Reproducibility
> @@ -831,6 +830,8 @@ include conf/licenses.conf
> require conf/sanity.conf
> include conf/bblock.conf
>
> +require ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
> +
> ##################################################################
> # Weak variables (usually to retain backwards compatibility)
> ##################################################################
> diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
> new file mode 100644
> index 0000000000..a9222a442a
> --- /dev/null
> +++ b/meta/conf/distro/include/debug_build.inc
> @@ -0,0 +1,7 @@
> +# Override SELECTED_OPTIMIZATION and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled.
> +DEBUG_OPTLEVEL ?= "-Og"
> +DEBUG_OPTIMIZATION = "${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}"
> +SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
> +# compiler flags for native/nativesdk
> +BUILD_OPTLEVEL = "-Og"
> +BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL} -g"
> diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> index 741130a392..b643724e27 100644
> --- a/meta/conf/documentation.conf
> +++ b/meta/conf/documentation.conf
> @@ -129,8 +129,9 @@ CVE_CHECK_LAYER_INCLUDELIST[doc] = "Defines which layers to include during cve-c
> D[doc] = "The destination directory."
> DATE[doc] = "The date the build was started using YMD format."
> DATETIME[doc] = "The date and time the build was started."
> -DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
> -DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_LEVELFLAG}'."
> +DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable and includes file conf/distro/include/debug_build.inc"
> +DEBUG_OPTLEVEL[doc] = "The toolchain optimization level flags for debugging. This variable defaults to '-Og'"
> +DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
> DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
> DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
> DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
> @@ -178,7 +179,8 @@ FILESPATH[doc] = "The default set of directories the OpenEmbedded build system u
> FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
> FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
> FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
> -FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 ${DEBUG_LEVELFLAG}'."
> +FULL_OPTLEVEL[doc] = "The toolchain optimization level flags. This variable defaults to '-O2'"
> +FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
>
> #G
>
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#223516): https://lists.openembedded.org/g/openembedded-core/message/223516
> Mute This Topic: https://lists.openembedded.org/mt/115268057/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: [OE-core] [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled
2025-09-29 18:48 ` [OE-core] " Khem Raj
@ 2025-09-29 22:52 ` Peter Kjellerstedt
2025-10-10 7:37 ` Hongxu Jia
0 siblings, 1 reply; 16+ messages in thread
From: Peter Kjellerstedt @ 2025-09-29 22:52 UTC (permalink / raw)
To: Khem Raj, hongxu.jia@eng.windriver.com
Cc: openembedded-core@lists.openembedded.org,
randy.macleod@windriver.com
> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: den 29 september 2025 20:49
> To: hongxu.jia@eng.windriver.com
> Cc: openembedded-core@lists.openembedded.org; randy.macleod@windriver.com; Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Subject: Re: [OE-core] [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled
>
> On Mon, Sep 15, 2025 at 9:09 PM hongxu via lists.openembedded.org <hongxu.jia=eng.windriver.com@lists.openembedded.org> wrote:
> >
> > Add a new include file debug_build.inc to override SELECTED_OPTIMIZATION
> > and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled
> >
> > Add separate variables FULL_OPTLEVEL, DEBUG_OPTLEVEL and BUILD_OPTLEVEL
> > for the optimization level, and override it for specific recipe other
> > than original remove and append DEBUG_OPTIMIZATION and BUILD_OPTIMIZATION
> >
> > Update the documentation for FULL_OPTIMIZATION and DEBUG_OPTIMIZATION
> >
> > Require the include file when DEBUG_BUILD is enabled
> >
>
> I was hoping that adding DEBUG_BUILD would reduce number of global
> variables to manage
> but it seems to introduce another one in form of DEBUG_OPTLEVEL, this
> makes the logic a bit complicated
> I think it will be good to explore a bit more and see if we do not
> have to do it.
Well, adding the *_OPTLEVEL variables simplified the recipe specific
overrides a lot in the debug_build.inc file.
>
> > Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> > ---
> > meta/conf/bitbake.conf | 13 +++++++------
> > meta/conf/distro/include/debug_build.inc | 7 +++++++
> > meta/conf/documentation.conf | 8 +++++---
> > 3 files changed, 19 insertions(+), 9 deletions(-)
> > create mode 100644 meta/conf/distro/include/debug_build.inc
> >
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index 8e90c7bbc8..0e614c6b21 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -658,13 +658,12 @@ DEBUG_PREFIX_MAP ?= "\
> > "
> > DEBUG_LEVELFLAG ?= "-g"
> >
> > -FULL_OPTIMIZATION = "-O2 ${DEBUG_LEVELFLAG}"
> > -DEBUG_OPTIMIZATION = "-Og ${DEBUG_LEVELFLAG}"
> > -SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
> > -SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
> > +FULL_OPTLEVEL ?= "-O2"
> > +FULL_OPTIMIZATION = "${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}"
> > +SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION}"
> > # compiler flags for native/nativesdk
> > -BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g', '-O2', d)}"
> > -BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
> > +BUILD_OPTLEVEL ?= "-O2"
> > +BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL}"
> >
> > ##################################################################
> > # Reproducibility
> > @@ -831,6 +830,8 @@ include conf/licenses.conf
> > require conf/sanity.conf
> > include conf/bblock.conf
> >
> > +require ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
> > +
> > ##################################################################
> > # Weak variables (usually to retain backwards compatibility)
> > ##################################################################
> > diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
> > new file mode 100644
> > index 0000000000..a9222a442a
> > --- /dev/null
> > +++ b/meta/conf/distro/include/debug_build.inc
> > @@ -0,0 +1,7 @@
> > +# Override SELECTED_OPTIMIZATION and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled.
> > +DEBUG_OPTLEVEL ?= "-Og"
> > +DEBUG_OPTIMIZATION = "${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}"
> > +SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
> > +# compiler flags for native/nativesdk
> > +BUILD_OPTLEVEL = "-Og"
> > +BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL} -g"
> > diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> > index 741130a392..b643724e27 100644
> > --- a/meta/conf/documentation.conf
> > +++ b/meta/conf/documentation.conf
> > @@ -129,8 +129,9 @@ CVE_CHECK_LAYER_INCLUDELIST[doc] = "Defines which
> layers to include during cve-c
> > D[doc] = "The destination directory."
> > DATE[doc] = "The date the build was started using YMD format."
> > DATETIME[doc] = "The date and time the build was started."
> > -DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
> > -DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_LEVELFLAG}'."
> > +DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable and includes file conf/distro/include/debug_build.inc"
> > +DEBUG_OPTLEVEL[doc] = "The toolchain optimization level flags for debugging. This variable defaults to '-Og'"
> > +DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
> > DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
> > DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
> > DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
> > @@ -178,7 +179,8 @@ FILESPATH[doc] = "The default set of directories the OpenEmbedded build system u
> > FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
> > FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
> > FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
> > -FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 ${DEBUG_LEVELFLAG}'."
> > +FULL_OPTLEVEL[doc] = "The toolchain optimization level flags. This variable defaults to '-O2'"
> > +FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
> >
> > #G
> >
> > --
> > 2.34.1
//Peter
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [OE-core] [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled
2025-09-29 22:52 ` Peter Kjellerstedt
@ 2025-10-10 7:37 ` Hongxu Jia
0 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-10-10 7:37 UTC (permalink / raw)
To: peter.kjellerstedt, Khem Raj, hongxu.jia@eng.windriver.com
Cc: openembedded-core@lists.openembedded.org,
randy.macleod@windriver.com
On 9/30/25 06:52, Peter Kjellerstedt via lists.openembedded.org wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>> -----Original Message-----
>> From: Khem Raj <raj.khem@gmail.com>
>> Sent: den 29 september 2025 20:49
>> To: hongxu.jia@eng.windriver.com
>> Cc: openembedded-core@lists.openembedded.org; randy.macleod@windriver.com; Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>> Subject: Re: [OE-core] [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled
>>
>> On Mon, Sep 15, 2025 at 9:09 PM hongxu via lists.openembedded.org <hongxu.jia=eng.windriver.com@lists.openembedded.org> wrote:
>>> Add a new include file debug_build.inc to override SELECTED_OPTIMIZATION
>>> and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled
>>>
>>> Add separate variables FULL_OPTLEVEL, DEBUG_OPTLEVEL and BUILD_OPTLEVEL
>>> for the optimization level, and override it for specific recipe other
>>> than original remove and append DEBUG_OPTIMIZATION and BUILD_OPTIMIZATION
>>>
>>> Update the documentation for FULL_OPTIMIZATION and DEBUG_OPTIMIZATION
>>>
>>> Require the include file when DEBUG_BUILD is enabled
>>>
>> I was hoping that adding DEBUG_BUILD would reduce number of global
>> variables to manage
>> but it seems to introduce another one in form of DEBUG_OPTLEVEL, this
>> makes the logic a bit complicated
>> I think it will be good to explore a bit more and see if we do not
>> have to do it.
> Well, adding the *_OPTLEVEL variables simplified the recipe specific
> overrides a lot in the debug_build.inc file.
>
I will try to not introduce any new global variables for DEBUG_BUILD, by
overriding existed variables more precisely
I will resend the series for discussing, v4 incoming
//Hongxu
>>> Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>>> ---
>>> meta/conf/bitbake.conf | 13 +++++++------
>>> meta/conf/distro/include/debug_build.inc | 7 +++++++
>>> meta/conf/documentation.conf | 8 +++++---
>>> 3 files changed, 19 insertions(+), 9 deletions(-)
>>> create mode 100644 meta/conf/distro/include/debug_build.inc
>>>
>>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>>> index 8e90c7bbc8..0e614c6b21 100644
>>> --- a/meta/conf/bitbake.conf
>>> +++ b/meta/conf/bitbake.conf
>>> @@ -658,13 +658,12 @@ DEBUG_PREFIX_MAP ?= "\
>>> "
>>> DEBUG_LEVELFLAG ?= "-g"
>>>
>>> -FULL_OPTIMIZATION = "-O2 ${DEBUG_LEVELFLAG}"
>>> -DEBUG_OPTIMIZATION = "-Og ${DEBUG_LEVELFLAG}"
>>> -SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
>>> -SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
>>> +FULL_OPTLEVEL ?= "-O2"
>>> +FULL_OPTIMIZATION = "${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}"
>>> +SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION}"
>>> # compiler flags for native/nativesdk
>>> -BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-Og -g', '-O2', d)}"
>>> -BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
>>> +BUILD_OPTLEVEL ?= "-O2"
>>> +BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL}"
>>>
>>> ##################################################################
>>> # Reproducibility
>>> @@ -831,6 +830,8 @@ include conf/licenses.conf
>>> require conf/sanity.conf
>>> include conf/bblock.conf
>>>
>>> +require ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
>>> +
>>> ##################################################################
>>> # Weak variables (usually to retain backwards compatibility)
>>> ##################################################################
>>> diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
>>> new file mode 100644
>>> index 0000000000..a9222a442a
>>> --- /dev/null
>>> +++ b/meta/conf/distro/include/debug_build.inc
>>> @@ -0,0 +1,7 @@
>>> +# Override SELECTED_OPTIMIZATION and BUILD_OPTIMIZATION when DEBUG_BUILD is enabled.
>>> +DEBUG_OPTLEVEL ?= "-Og"
>>> +DEBUG_OPTIMIZATION = "${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}"
>>> +SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
>>> +# compiler flags for native/nativesdk
>>> +BUILD_OPTLEVEL = "-Og"
>>> +BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL} -g"
>>> diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
>>> index 741130a392..b643724e27 100644
>>> --- a/meta/conf/documentation.conf
>>> +++ b/meta/conf/documentation.conf
>>> @@ -129,8 +129,9 @@ CVE_CHECK_LAYER_INCLUDELIST[doc] = "Defines which
>> layers to include during cve-c
>>> D[doc] = "The destination directory."
>>> DATE[doc] = "The date the build was started using YMD format."
>>> DATETIME[doc] = "The date and time the build was started."
>>> -DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
>>> -DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-Og ${DEBUG_LEVELFLAG}'."
>>> +DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable and includes file conf/distro/include/debug_build.inc"
>>> +DEBUG_OPTLEVEL[doc] = "The toolchain optimization level flags for debugging. This variable defaults to '-Og'"
>>> +DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '${DEBUG_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
>>> DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
>>> DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
>>> DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
>>> @@ -178,7 +179,8 @@ FILESPATH[doc] = "The default set of directories the OpenEmbedded build system u
>>> FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
>>> FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
>>> FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
>>> -FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 ${DEBUG_LEVELFLAG}'."
>>> +FULL_OPTLEVEL[doc] = "The toolchain optimization level flags. This variable defaults to '-O2'"
>>> +FULL_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '${FULL_OPTLEVEL} ${DEBUG_LEVELFLAG}'."
>>>
>>> #G
>>>
>>> --
>>> 2.34.1
> //Peter
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#224170): https://lists.openembedded.org/g/openembedded-core/message/224170
> Mute This Topic: https://lists.openembedded.org/mt/115268057/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] 16+ messages in thread
* [PATCH 3/8] harfbuzz: set FULL_OPTLEVEL for FULL_OPTIMIZATION
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
2025-09-16 4:09 ` [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
2025-09-16 4:09 ` [PATCH 4/8] debug_build.inc: collect debug build tuning configuration Hongxu Jia
` (4 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
Due to commit [distro/include: Add debug_build.inc when DEBUG_BUILD is
enabled] applied, it adds a new variable FULL_OPTLEVEL for optimization level
of FULL_OPTIMIZATION.
Use FULL_OPTLEVEL to instead of FULL_OPTIMIZATION
Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-graphics/harfbuzz/harfbuzz_11.4.5.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_11.4.5.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_11.4.5.bb
index 9e0e42b717..9934ddcc5d 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_11.4.5.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_11.4.5.bb
@@ -21,7 +21,7 @@ GTKDOC_MESON_ENABLE_FLAG = 'enabled'
GTKDOC_MESON_DISABLE_FLAG = 'disabled'
# As per upstream CONFIG.md, it is recommended to always build with -Os.
-FULL_OPTIMIZATION = "-Os ${DEBUG_LEVELFLAG}"
+FULL_OPTLEVEL = "-Os"
EXTRA_OEMESON = "-Dtests=disabled"
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 4/8] debug_build.inc: collect debug build tuning configuration
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
2025-09-16 4:09 ` [PATCH v3 2/8] distro/include: Add debug_build.inc when DEBUG_BUILD is enabled Hongxu Jia
2025-09-16 4:09 ` [PATCH 3/8] harfbuzz: set FULL_OPTLEVEL for FULL_OPTIMIZATION Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
2025-09-17 11:24 ` [OE-core] " Mathieu Dubois-Briand
2025-09-16 4:09 ` [PATCH v3 5/8] debug_build.inc: allow other layers to add their own debug build configurations Hongxu Jia
` (3 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
The modern compilers and code seem to require extra steps to avoid DEBUG errors,
Move debug tuning configuration from recipes to an include file to address these
errors.
Introduce separate variables to avoid the :remove operations, such DEBUG_OPTLEVEL,
BUILD_OPTLEVEL and OECMAKE_WEBKIT_NO_INLINE_HINTS
Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/conf/distro/include/debug_build.inc | 37 +++++++++++++++++++
meta/recipes-connectivity/kea/kea_3.0.1.bb | 10 -----
.../debugedit/debugedit_5.2.bb | 2 -
meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 --
.../python/python3-lxml_6.0.1.bb | 12 ------
meta/recipes-extended/bash/bash_5.3.bb | 3 --
meta/recipes-extended/mdadm/mdadm_4.4.bb | 2 -
.../jpeg/libjpeg-turbo_3.1.2.bb | 3 --
.../vulkan-validation-layers_1.4.321.0.bb | 2 -
meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb | 1 -
meta/recipes-kernel/perf/perf.bb | 2 -
meta/recipes-sato/webkit/webkitgtk_2.48.5.bb | 3 +-
meta/recipes-support/vim/vim_9.1.bb | 2 +-
13 files changed, 40 insertions(+), 42 deletions(-)
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
index a9222a442a..ae6dc7f4c6 100644
--- a/meta/conf/distro/include/debug_build.inc
+++ b/meta/conf/distro/include/debug_build.inc
@@ -5,3 +5,40 @@ SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
# compiler flags for native/nativesdk
BUILD_OPTLEVEL = "-Og"
BUILD_OPTIMIZATION = "${BUILD_OPTLEVEL} -g"
+
+# The modern compilers and code seem to require extra steps to avoid DEBUG errors,
+# this file collects debug tuning configuration to address DEBUG errors.
+
+DEBUG_OPTIMIZATION:append:pn-perf = " -Wno-error=maybe-uninitialized"
+DEBUG_OPTIMIZATION:append:armv4:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION:append:armv5:pn-libjpeg-turbo = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION:append:armv4:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION:append:armv5:pn-bash = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
+DEBUG_OPTIMIZATION:append:pn-mdadm = " -Wno-error"
+DEBUG_OPTLEVEL:mips:pn-kea = "-O"
+DEBUG_OPTLEVEL:mipsel:pn-kea = "-O"
+# {standard input}: Assembler messages:
+# {standard input}:1488805: Error: branch out of range
+DEBUG_OPTLEVEL:mips:pn-python3-lxml = "-O"
+DEBUG_OPTLEVEL:mipsel:pn-python3-lxml = "-O"
+# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+DEBUG_OPTIMIZATION:append:pn-gcc-sanitizers = " -Wno-error"
+
+BUILD_OPTLEVEL:mips:pn-kea = "-O"
+BUILD_OPTLEVEL:mipsel:pn-kea = "-O"
+# {standard input}: Assembler messages:
+# {standard input}:1488805: Error: branch out of range
+BUILD_OPTLEVEL:mips:pn-python3-lxml = "-O"
+BUILD_OPTLEVEL:mipsel:pn-python3-lxml = "-O"
+
+CPPFLAGS:append:arm:pn-lttng-ust = " -DUATOMIC_NO_LINK_ERROR"
+
+OECMAKE_WEBKIT_NO_INLINE_HINTS:pn-webkitgtk = "-DWEBKIT_NO_INLINE_HINTS=ON"
+
+EXTRA_OECONF:append:pn-debugedit = " --disable-inlined-xxhash"
+EXTRA_OECONF:append:pn-debugedit-native = " --disable-inlined-xxhash"
+EXTRA_OECONF:append:pn-nativesdk-debugedit = " --disable-inlined-xxhash"
+
+lcl_maybe_fortify:pn-vim = ""
+
+CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1"
diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
index cc34c05093..ead4e98e70 100644
--- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
+++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
@@ -34,16 +34,6 @@ INITSCRIPT_PARAMS = "defaults 30"
SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
SYSTEMD_AUTO_ENABLE = "disable"
-DEBUG_OPTIMIZATION:remove:mips = " -Og"
-DEBUG_OPTIMIZATION:append:mips = " -O"
-BUILD_OPTIMIZATION:remove:mips = " -Og"
-BUILD_OPTIMIZATION:append:mips = " -O"
-
-DEBUG_OPTIMIZATION:remove:mipsel = " -Og"
-DEBUG_OPTIMIZATION:append:mipsel = " -O"
-BUILD_OPTIMIZATION:remove:mipsel = " -Og"
-BUILD_OPTIMIZATION:append:mipsel = " -O"
-
CXXFLAGS:remove = "-fvisibility-inlines-hidden"
do_configure:prepend() {
diff --git a/meta/recipes-devtools/debugedit/debugedit_5.2.bb b/meta/recipes-devtools/debugedit/debugedit_5.2.bb
index 76c54ba63d..4ac6cab559 100644
--- a/meta/recipes-devtools/debugedit/debugedit_5.2.bb
+++ b/meta/recipes-devtools/debugedit/debugedit_5.2.bb
@@ -22,8 +22,6 @@ inherit pkgconfig autotools multilib_script
RDEPENDS:${PN} += "bash elfutils-binutils"
-EXTRA_OECONF = "${@oe.utils.vartrue('DEBUG_BUILD', '--disable-inlined-xxhash', '', d)}"
-
BBCLASSEXTEND = "native nativesdk"
MULTILIB_SCRIPTS = "${PN}:${bindir}/find-debuginfo"
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 6c81d30243..f4727ee6db 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -54,9 +54,6 @@ INHIBIT_DEFAULT_DEPS = "1"
ALLOW_EMPTY:${PN} = "1"
DEPENDS = "virtual/crypt gcc-runtime virtual/cross-cc"
-# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
-DEBUG_OPTIMIZATION:append = " -Wno-error"
-
BBCLASSEXTEND = "nativesdk"
PACKAGES = "${PN} ${PN}-dbg"
diff --git a/meta/recipes-devtools/python/python3-lxml_6.0.1.bb b/meta/recipes-devtools/python/python3-lxml_6.0.1.bb
index 5d76641675..6bcd399da5 100644
--- a/meta/recipes-devtools/python/python3-lxml_6.0.1.bb
+++ b/meta/recipes-devtools/python/python3-lxml_6.0.1.bb
@@ -23,18 +23,6 @@ SRC_URI[sha256sum] = "2b3a882ebf27dd026df3801a87cf49ff791336e0f94b0fad195db77e01
SRC_URI += "${PYPI_SRC_URI}"
inherit pkgconfig pypi setuptools3
-# {standard input}: Assembler messages:
-# {standard input}:1488805: Error: branch out of range
-DEBUG_OPTIMIZATION:remove:mips = " -Og"
-DEBUG_OPTIMIZATION:append:mips = " -O"
-BUILD_OPTIMIZATION:remove:mips = " -Og"
-BUILD_OPTIMIZATION:append:mips = " -O"
-
-DEBUG_OPTIMIZATION:remove:mipsel = " -Og"
-DEBUG_OPTIMIZATION:append:mipsel = " -O"
-BUILD_OPTIMIZATION:remove:mipsel = " -Og"
-BUILD_OPTIMIZATION:append:mipsel = " -O"
-
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} += "libxml2 libxslt python3-compression"
diff --git a/meta/recipes-extended/bash/bash_5.3.bb b/meta/recipes-extended/bash/bash_5.3.bb
index b50a48d28c..74671f5a56 100644
--- a/meta/recipes-extended/bash/bash_5.3.bb
+++ b/meta/recipes-extended/bash/bash_5.3.bb
@@ -15,9 +15,6 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
SRC_URI[tarball.sha256sum] = "0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba"
-DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
-DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
-
CFLAGS += "-std=gnu17"
# mkbuiltins.c is built with native toolchain and needs gnu17 as well:
# http://errors.yoctoproject.org/Errors/Details/853016/
diff --git a/meta/recipes-extended/mdadm/mdadm_4.4.bb b/meta/recipes-extended/mdadm/mdadm_4.4.bb
index 26a60e4c1a..e81b8fdf3c 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.4.bb
@@ -39,8 +39,6 @@ EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${sys
BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}" \
SYSROOT="${STAGING_DIR_TARGET}" STRIP='
-DEBUG_OPTIMIZATION:append = " -Wno-error"
-
do_install() {
oe_runmake 'DESTDIR=${D}' install install-systemd
install -d ${D}/${sysconfdir}/
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb
index d4877bb92b..bc9d803f6b 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_3.1.2.bb
@@ -44,9 +44,6 @@ EXTRA_OECMAKE:append:class-target:powerpc = " ${@bb.utils.contains("TUNE_FEATURE
EXTRA_OECMAKE:append:class-target:powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
EXTRA_OECMAKE:append:class-target:powerpc64le = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "-DWITH_SIMD=False", d)}"
-DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
-DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
-
# libjpeg-turbo-2.0.2/simd/mips/jsimd_dspr2.S
# <instantiation>:13:5: error: invalid token in expression
# .if $17 != 0
diff --git a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.321.0.bb b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.321.0.bb
index 466e757a90..fa7873b62d 100644
--- a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.321.0.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.4.321.0.bb
@@ -26,8 +26,6 @@ EXTRA_OECMAKE = "\
-DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
"
-CXXFLAGS:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '-DXXH_NO_INLINE_HINTS=1', '', d)}"
-
PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb
index 1a15c5b420..0d4c67f0fa 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.14.0.bb
@@ -16,7 +16,6 @@ inherit autotools lib_package manpages python3native pkgconfig
include lttng-platforms.inc
EXTRA_OECONF = "--disable-numa"
-CPPFLAGS:append:arm = "${@oe.utils.vartrue('DEBUG_BUILD', '-DUATOMIC_NO_LINK_ERROR', '', d)}"
DEPENDS = "liburcu util-linux"
RDEPENDS:${PN}-bin = "python3-core"
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index e1915207ee..98dffd1cc9 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -415,8 +415,6 @@ FILES:${PN}-python = " \
"
FILES:${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
-DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized"
-
PACKAGESPLITFUNCS =+ "perf_fix_sources"
perf_fix_sources () {
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
index 46031322b9..ba08e8b925 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.48.5.bb
@@ -86,11 +86,12 @@ PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette"
PACKAGECONFIG[sysprof-capture] = "-DUSE_SYSTEM_SYSPROF_CAPTURE=YES,-DUSE_SYSTEM_SYSPROF_CAPTURE=NO,sysprof"
PACKAGECONFIG[speech] = "-DENABLE_SPEECH_SYNTHESIS=ON,-DENABLE_SPEECH_SYNTHESIS=OFF,flite"
+OECMAKE_WEBKIT_NO_INLINE_HINTS ??= "-DWEBKIT_NO_INLINE_HINTS=OFF"
EXTRA_OECMAKE = " \
-DPORT=GTK \
${@oe.utils.vartrue('GI_DATA_ENABLED', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
${@oe.utils.vartrue('GIDOCGEN_ENABLED', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \
- ${@oe.utils.vartrue('DEBUG_BUILD', '-DWEBKIT_NO_INLINE_HINTS=ON', '-DWEBKIT_NO_INLINE_HINTS=OFF', d)} \
+ ${OECMAKE_WEBKIT_NO_INLINE_HINTS} \
-DENABLE_MINIBROWSER=ON \
-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
-DUSE_GTK4=ON \
diff --git a/meta/recipes-support/vim/vim_9.1.bb b/meta/recipes-support/vim/vim_9.1.bb
index fee9f055e9..a24a863ba5 100644
--- a/meta/recipes-support/vim/vim_9.1.bb
+++ b/meta/recipes-support/vim/vim_9.1.bb
@@ -20,4 +20,4 @@ ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd"
# We override the default in security_flags.inc because vim (not vim-tiny!) will abort
# in many places for _FORTIFY_SOURCE=2. Security flags become part of CC.
#
-lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=1',d)}"
+lcl_maybe_fortify = "-D_FORTIFY_SOURCE=1"
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [OE-core] [PATCH 4/8] debug_build.inc: collect debug build tuning configuration
2025-09-16 4:09 ` [PATCH 4/8] debug_build.inc: collect debug build tuning configuration Hongxu Jia
@ 2025-09-17 11:24 ` Mathieu Dubois-Briand
2025-09-17 12:15 ` hongxu
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Mathieu Dubois-Briand @ 2025-09-17 11:24 UTC (permalink / raw)
To: hongxu.jia, openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
On Tue Sep 16, 2025 at 6:09 AM CEST, hongxu via lists.openembedded.org wrote:
> The modern compilers and code seem to require extra steps to avoid DEBUG errors,
> Move debug tuning configuration from recipes to an include file to address these
> errors.
>
> Introduce separate variables to avoid the :remove operations, such DEBUG_OPTLEVEL,
> BUILD_OPTLEVEL and OECMAKE_WEBKIT_NO_INLINE_HINTS
>
> Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
Just a note about this patches: I had perf reproducibility issues [1][2]
after taking this series and I believe this is linked with this patch. I
suspect this is not directly related with it, but more with the issue we
have had with perf reproducibility last week.
So I dropped this patch for now, but I will take it a bit later this
week and try to go further. I still wanted to provide some feedback
here. Also, if anyone believes this issue IS related with this series,
please share your thoughts.
[1] https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2505
[2] http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250916-0ss72vce/
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 4/8] debug_build.inc: collect debug build tuning configuration
2025-09-17 11:24 ` [OE-core] " Mathieu Dubois-Briand
@ 2025-09-17 12:15 ` hongxu
2025-09-19 3:08 ` [OE-core] " Hongxu Jia
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: hongxu @ 2025-09-17 12:15 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
On Wed, Sep 17, 2025 at 04:24 AM, Mathieu Dubois-Briand wrote:
>
> Just a note about this patches: I had perf reproducibility issues [1][2]
> after taking this series and I believe this is linked with this patch. I
> suspect this is not directly related with it, but more with the issue we
> have had with perf reproducibility last week.
>
> So I dropped this patch for now, but I will take it a bit later this
> week and try to go further. I still wanted to provide some feedback
> here.
Got it, I will have a look
//Hongxu
>
> Also, if anyone believes this issue IS related with this series,
> please share your thoughts.
>
> [1] https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2505
>
> [2] http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250916-0ss72vce/
>
>
> Thanks,
> Mathieu
[-- Attachment #2: Type: text/html, Size: 1198 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [OE-core] [PATCH 4/8] debug_build.inc: collect debug build tuning configuration
2025-09-17 11:24 ` [OE-core] " Mathieu Dubois-Briand
2025-09-17 12:15 ` hongxu
@ 2025-09-19 3:08 ` Hongxu Jia
[not found] ` <1866903FE1AA84E8.22280@lists.openembedded.org>
2025-09-21 6:30 ` Mathieu Dubois-Briand
3 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-19 3:08 UTC (permalink / raw)
To: mathieu.dubois-briand, hongxu.jia, openembedded-core
Cc: randy.macleod, peter.kjellerstedt
[-- Attachment #1: Type: text/plain, Size: 6786 bytes --]
On 9/17/25 19:24, Mathieu Dubois-Briand via lists.openembedded.org wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue Sep 16, 2025 at 6:09 AM CEST, hongxu via lists.openembedded.org wrote:
>> The modern compilers and code seem to require extra steps to avoid DEBUG errors,
>> Move debug tuning configuration from recipes to an include file to address these
>> errors.
>>
>> Introduce separate variables to avoid the :remove operations, such DEBUG_OPTLEVEL,
>> BUILD_OPTLEVEL and OECMAKE_WEBKIT_NO_INLINE_HINTS
>>
>> Suggested-by: Peter Kjellerstedt<peter.kjellerstedt@axis.com>
>> Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com>
>> ---
> Just a note about this patches: I had perf reproducibility issues [1][2]
> after taking this series and I believe this is linked with this patch. I
> suspect this is not directly related with it, but more with the issue we
> have had with perf reproducibility last week.
>
> So I dropped this patch for now, but I will take it a bit later this
> week and try to go further. I still wanted to provide some feedback
> here. Also, if anyone believes this issue IS related with this series,
> please share your thoughts.
>
> [1]https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2505
> [2]http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250916-0ss72vce/
Hi
I clone the branch of you on contrib
https://git.openembedded.org/openembedded-core-contrib/log/?h=mathieu/master-next-success
https://git.openembedded.org/bitbake-contrib/log/?h=mathieu/master-next-success
And do oe-selftest without the debug build patches, the issue we have
had with perf reproducibility still exist
$ oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds
...
2025-09-19 05:05:31,099 - oe-selftest - INFO -
======================================================================
2025-09-19 05:05:31,099 - oe-selftest - INFO - FAIL:
test_reproducible_builds (reproducible.ReproducibleTests)
2025-09-19 05:05:31,099 - oe-selftest - INFO -
----------------------------------------------------------------------
2025-09-19 05:05:31,099 - oe-selftest - INFO - Traceback (most recent
call last):
File
"/buildarea5/hjia/contrib/openembedded-core-contrib/meta/lib/oeqa/selftest/cases/reproducible.py",
line 406, in test_reproducible_builds
self.fail('\n'.join(fails))
AssertionError: Bitbake reproducibleA failure
Bitbake reproducibleB-extended failure
The following deb packages are different and not in exclusion list:
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf-dbg_6.16.7-r0_amd64.deb
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf-python_6.16.7-r0_amd64.deb
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf-src_6.16.7-r0_amd64.deb
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf_6.16.7-r0_amd64.deb
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/apt-dbg_3.0.3-r0_amd64.deb
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/apt_3.0.3-r0_amd64.deb
The following ipk packages are different and not in exclusion list:
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf-dbg_6.16.7-r0_qemux86_64.ipk
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf-python_6.16.7-r0_qemux86_64.ipk
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf-src_6.16.7-r0_qemux86_64.ipk
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf_6.16.7-r0_qemux86_64.ipk
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/apt-dbg_3.0.3-r0_x86-64-v3.ipk
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/apt_3.0.3-r0_x86-64-v3.ipk
The following rpm packages are different and not in exclusion list:
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-6.16.7-r0.qemux86_64.rpm
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-dbg-6.16.7-r0.qemux86_64.rpm
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-python-6.16.7-r0.qemux86_64.rpm
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-src-6.16.7-r0.qemux86_64.rpm
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/apt-3.0.3-r0.x86_64_v3.rpm
/buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/apt-dbg-3.0.3-r0.x86_64_v3.rpm
2025-09-19 05:05:31,099 - oe-selftest - INFO -
----------------------------------------------------------------------
2025-09-19 05:05:31,099 - oe-selftest - INFO - Ran 1 test in 32633.939s
2025-09-19 05:05:31,099 - oe-selftest - INFO - FAILED
2025-09-19 05:05:31,099 - oe-selftest - INFO - (failures=1)
2025-09-19 05:05:34,691 - oe-selftest - INFO - RESULTS:
2025-09-19 05:05:34,691 - oe-selftest - INFO - RESULTS -
reproducible.ReproducibleTests.test_reproducible_builds: FAILED (32633.79s)
2025-09-19 05:05:34,736 - oe-selftest - INFO - SUMMARY:
2025-09-19 05:05:34,736 - oe-selftest - INFO - oe-selftest () - Ran 1
test in 32633.939s
2025-09-19 05:05:34,736 - oe-selftest - INFO - oe-selftest - FAIL -
Required tests failed (successes=0, skipped=0, failures=1, errors=0)
...
//Hongxu
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#223592):https://lists.openembedded.org/g/openembedded-core/message/223592
> Mute This Topic:https://lists.openembedded.org/mt/115268059/3617049
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [hongxu.jia@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: Type: text/html, Size: 9165 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread[parent not found: <1866903FE1AA84E8.22280@lists.openembedded.org>]
* Re: [OE-core] [PATCH 4/8] debug_build.inc: collect debug build tuning configuration
[not found] ` <1866903FE1AA84E8.22280@lists.openembedded.org>
@ 2025-09-19 8:34 ` Hongxu Jia
0 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-19 8:34 UTC (permalink / raw)
To: hongxu.jia, mathieu.dubois-briand, openembedded-core
Cc: randy.macleod, peter.kjellerstedt, Richard Purdie
[-- Attachment #1: Type: text/plain, Size: 9379 bytes --]
On 9/19/25 11:08, hongxu via lists.openembedded.org wrote:
> On 9/17/25 19:24, Mathieu Dubois-Briand via lists.openembedded.org wrote:
>> CAUTION: This email comes from a non Wind River email account!
>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On Tue Sep 16, 2025 at 6:09 AM CEST, hongxu via lists.openembedded.org wrote:
>>> The modern compilers and code seem to require extra steps to avoid DEBUG errors,
>>> Move debug tuning configuration from recipes to an include file to address these
>>> errors.
>>>
>>> Introduce separate variables to avoid the :remove operations, such DEBUG_OPTLEVEL,
>>> BUILD_OPTLEVEL and OECMAKE_WEBKIT_NO_INLINE_HINTS
>>>
>>> Suggested-by: Peter Kjellerstedt<peter.kjellerstedt@axis.com>
>>> Signed-off-by: Hongxu Jia<hongxu.jia@windriver.com>
>>> ---
>> Just a note about this patches: I had perf reproducibility issues [1][2]
>> after taking this series and I believe this is linked with this patch. I
>> suspect this is not directly related with it, but more with the issue we
>> have had with perf reproducibility last week.
>>
>> So I dropped this patch for now, but I will take it a bit later this
>> week and try to go further. I still wanted to provide some feedback
>> here. Also, if anyone believes this issue IS related with this series,
>> please share your thoughts.
>>
>> [1]https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2505
>> [2]http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250916-0ss72vce/
I am digging in the issue, and found the issue only happen on world
build of reproducible, have different debuginfo data.
I found the commit [1] to fix reproducibility issue for perf, but it
seems the issue still existed,
...
perf: Fix reproducibility issue
Perf's build process generates two copies of its internal headers,
one at tools/lib/perf/include/internal and one at
libperf/include/internal
with files like xyarray.h. Although the files are identical, the
binaries including
them would see them at different paths and have different debuginfo
data.
To avoid this, build libperf.a first, which will ensure the libperf
headers directory exists. This is used in preference to the other by
the build process and results in consistent binaries.
...
[1]
https://git.openembedded.org/openembedded-core/commit/?id=0a886fcacaab0fbce1306c0f99d482f940a8f705
oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds
$ recipe-sysroot-native/usr/bin/dwarfsrcfiles
sources/perf-1.0/libperf/core.o
/usr/src/debug/perf/1.0/tools/lib/perf/core.c
...
/usr/src/debug/perf/1.0/tools/lib/perf/include/perf/core.h
/usr/src/debug/perf/1.0/tools/lib/perf/include/internal/lib.h
...
$ recipe-sysroot-native/usr/bin/dwarfsrcfiles
sources/perf-1.0/libperf/core.o
/usr/src/debug/perf/1.0/tools/lib/perf/core.c
...
/usr/src/debug/perf/1.0/libperf/include/perf/core.h
/usr/src/debug/perf/1.0/libperf/include/internal/lib.h
...
If specify perf of reproducible for oe selftest, the issue was not found
$ echo 'OEQA_REPRODUCIBLE_TEST_TARGET = "perf"' >> conf/local.conf
$ oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds
$ recipe-sysroot-native/usr/bin/dwarfsrcfiles
sources/perf-1.0/libperf/core.o
/usr/src/debug/perf/1.0/tools/lib/perf/core.c
...
/usr/src/debug/perf/1.0/libperf/include/perf/core.h
/usr/src/debug/perf/1.0/libperf/include/internal/lib.h
...
$ recipe-sysroot-native/usr/bin/dwarfsrcfiles
sources/perf-1.0/libperf/core.o
/usr/src/debug/perf/1.0/tools/lib/perf/core.c
...
/usr/src/debug/perf/1.0/libperf/include/perf/core.h
/usr/src/debug/perf/1.0/libperf/include/internal/lib.h
...
//Hongxu
> Hi
>
> I clone the branch of you on contrib
>
> https://git.openembedded.org/openembedded-core-contrib/log/?h=mathieu/master-next-success
>
> https://git.openembedded.org/bitbake-contrib/log/?h=mathieu/master-next-success
>
> And do oe-selftest without the debug build patches, the issue we have
> had with perf reproducibility still exist
>
> $ oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds
>
> ...
>
> 2025-09-19 05:05:31,099 - oe-selftest - INFO -
> ======================================================================
> 2025-09-19 05:05:31,099 - oe-selftest - INFO - FAIL:
> test_reproducible_builds (reproducible.ReproducibleTests)
> 2025-09-19 05:05:31,099 - oe-selftest - INFO -
> ----------------------------------------------------------------------
> 2025-09-19 05:05:31,099 - oe-selftest - INFO - Traceback (most recent
> call last):
> File
> "/buildarea5/hjia/contrib/openembedded-core-contrib/meta/lib/oeqa/selftest/cases/reproducible.py",
> line 406, in test_reproducible_builds
> self.fail('\n'.join(fails))
> AssertionError: Bitbake reproducibleA failure
> Bitbake reproducibleB-extended failure
> The following deb packages are different and not in exclusion list:
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf-dbg_6.16.7-r0_amd64.deb
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf-python_6.16.7-r0_amd64.deb
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf-src_6.16.7-r0_amd64.deb
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./qemux86_64/perf_6.16.7-r0_amd64.deb
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/apt-dbg_3.0.3-r0_amd64.deb
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/apt_3.0.3-r0_amd64.deb
> The following ipk packages are different and not in exclusion list:
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf-dbg_6.16.7-r0_qemux86_64.ipk
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf-python_6.16.7-r0_qemux86_64.ipk
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf-src_6.16.7-r0_qemux86_64.ipk
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./qemux86_64/perf_6.16.7-r0_qemux86_64.ipk
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/apt-dbg_3.0.3-r0_x86-64-v3.ipk
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/apt_3.0.3-r0_x86-64-v3.ipk
> The following rpm packages are different and not in exclusion list:
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-6.16.7-r0.qemux86_64.rpm
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-dbg-6.16.7-r0.qemux86_64.rpm
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-python-6.16.7-r0.qemux86_64.rpm
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./qemux86_64/perf-src-6.16.7-r0.qemux86_64.rpm
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/apt-3.0.3-r0.x86_64_v3.rpm
> /buildarea5/hjia/contrib/openembedded-core-contrib/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/apt-dbg-3.0.3-r0.x86_64_v3.rpm
>
> 2025-09-19 05:05:31,099 - oe-selftest - INFO -
> ----------------------------------------------------------------------
> 2025-09-19 05:05:31,099 - oe-selftest - INFO - Ran 1 test in 32633.939s
> 2025-09-19 05:05:31,099 - oe-selftest - INFO - FAILED
> 2025-09-19 05:05:31,099 - oe-selftest - INFO - (failures=1)
> 2025-09-19 05:05:34,691 - oe-selftest - INFO - RESULTS:
> 2025-09-19 05:05:34,691 - oe-selftest - INFO - RESULTS -
> reproducible.ReproducibleTests.test_reproducible_builds: FAILED
> (32633.79s)
> 2025-09-19 05:05:34,736 - oe-selftest - INFO - SUMMARY:
> 2025-09-19 05:05:34,736 - oe-selftest - INFO - oe-selftest () - Ran 1
> test in 32633.939s
> 2025-09-19 05:05:34,736 - oe-selftest - INFO - oe-selftest - FAIL -
> Required tests failed (successes=0, skipped=0, failures=1, errors=0)
>
> ...
>
> //Hongxu
>
>> Thanks,
>> Mathieu
>>
>> --
>> Mathieu Dubois-Briand, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
>>
>>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#223719):https://lists.openembedded.org/g/openembedded-core/message/223719
> Mute This Topic:https://lists.openembedded.org/mt/115268059/3617049
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [hongxu.jia@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: Type: text/html, Size: 13455 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH 4/8] debug_build.inc: collect debug build tuning configuration
2025-09-17 11:24 ` [OE-core] " Mathieu Dubois-Briand
` (2 preceding siblings ...)
[not found] ` <1866903FE1AA84E8.22280@lists.openembedded.org>
@ 2025-09-21 6:30 ` Mathieu Dubois-Briand
3 siblings, 0 replies; 16+ messages in thread
From: Mathieu Dubois-Briand @ 2025-09-21 6:30 UTC (permalink / raw)
To: hongxu.jia, openembedded-core, Bruce Ashfield
Cc: randy.macleod, peter.kjellerstedt
On Wed Sep 17, 2025 at 1:24 PM CEST, Mathieu Dubois-Briand wrote:
> On Tue Sep 16, 2025 at 6:09 AM CEST, hongxu via lists.openembedded.org wrote:
>> The modern compilers and code seem to require extra steps to avoid DEBUG errors,
>> Move debug tuning configuration from recipes to an include file to address these
>> errors.
>>
>> Introduce separate variables to avoid the :remove operations, such DEBUG_OPTLEVEL,
>> BUILD_OPTLEVEL and OECMAKE_WEBKIT_NO_INLINE_HINTS
>>
>> Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> ---
>
> Just a note about this patches: I had perf reproducibility issues [1][2]
> after taking this series and I believe this is linked with this patch. I
> suspect this is not directly related with it, but more with the issue we
> have had with perf reproducibility last week.
>
> So I dropped this patch for now, but I will take it a bit later this
> week and try to go further. I still wanted to provide some feedback
> here. Also, if anyone believes this issue IS related with this series,
> please share your thoughts.
>
> [1] https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2505
> [2] http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250916-0ss72vce/
>
OK, I took again the series, and now the issue is gone. So clearly the
AB-INT is still present.
Bruce, I've been told you are the one to contact here. Do you have any
opinion on this?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 5/8] debug_build.inc: allow other layers to add their own debug build configurations
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
` (2 preceding siblings ...)
2025-09-16 4:09 ` [PATCH 4/8] debug_build.inc: collect debug build tuning configuration Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
2025-09-16 4:09 ` [PATCH 6/8] debug_build.inc: override INHIBIT_SYSROOT_STRIP for cross and native Hongxu Jia
` (2 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
When DEBUG_BUILD is enabled, allow other layers to add their own
debug build configurations
NOTE: this patch depends on bitbake commit [parse: Make include_all
support empty variable expansions] [1]
[1] https://lists.openembedded.org/g/bitbake-devel/message/18037?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2C%2C20%2C2%2C0%2C115265193%2Cd%253D3&d=3
Suggested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/conf/bitbake.conf | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 0e614c6b21..c21bda8cce 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -830,7 +830,8 @@ include conf/licenses.conf
require conf/sanity.conf
include conf/bblock.conf
-require ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
+# 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] 16+ messages in thread* [PATCH 6/8] debug_build.inc: override INHIBIT_SYSROOT_STRIP for cross and native
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
` (3 preceding siblings ...)
2025-09-16 4:09 ` [PATCH v3 5/8] debug_build.inc: allow other layers to add their own debug build configurations Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
2025-09-16 4:09 ` [PATCH 7/8] debug_build.inc: override MESON_BUILDTYPE for meson.bbclass Hongxu Jia
2025-09-16 4:09 ` [PATCH v3 8/8] debug_build.inc: override BUILD_MODE and BUILD_DIR for cargo.bbclass Hongxu Jia
6 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
The debug_build.inc is used to collect debug build configuration,
override INHIBIT_SYSROOT_STRIP for cross and native bbclass when DEBUG_BUILD
is enabled
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes-recipe/cross.bbclass | 3 +--
meta/classes-recipe/native.bbclass | 3 +--
meta/conf/distro/include/debug_build.inc | 4 ++++
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/classes-recipe/cross.bbclass b/meta/classes-recipe/cross.bbclass
index 9abf166e50..ede04950b5 100644
--- a/meta/classes-recipe/cross.bbclass
+++ b/meta/classes-recipe/cross.bbclass
@@ -23,8 +23,7 @@ HOST_CC_ARCH = "${BUILD_CC_ARCH}"
HOST_LD_ARCH = "${BUILD_LD_ARCH}"
HOST_AS_ARCH = "${BUILD_AS_ARCH}"
-# No strip sysroot when DEBUG_BUILD is enabled
-INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}"
+INHIBIT_SYSROOT_STRIP ??= ""
export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass
index 7d1fe343fa..b3411d20ca 100644
--- a/meta/classes-recipe/native.bbclass
+++ b/meta/classes-recipe/native.bbclass
@@ -118,8 +118,7 @@ PATH:prepend = "${COREBASE}/scripts/native-intercept:"
# reused if we manipulate the paths.
SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
-# No strip sysroot when DEBUG_BUILD is enabled
-INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}"
+INHIBIT_SYSROOT_STRIP ??= ""
python native_virtclass_handler () {
import re
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
index ae6dc7f4c6..6e28e76b44 100644
--- a/meta/conf/distro/include/debug_build.inc
+++ b/meta/conf/distro/include/debug_build.inc
@@ -42,3 +42,7 @@ EXTRA_OECONF:append:pn-nativesdk-debugedit = " --disable-inlined-xxhash"
lcl_maybe_fortify:pn-vim = ""
CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1"
+
+# No strip sysroot for cross and native
+INHIBIT_SYSROOT_STRIP:class-cross ?= "1"
+INHIBIT_SYSROOT_STRIP:class-native ?= "1"
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 7/8] debug_build.inc: override MESON_BUILDTYPE for meson.bbclass
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
` (4 preceding siblings ...)
2025-09-16 4:09 ` [PATCH 6/8] debug_build.inc: override INHIBIT_SYSROOT_STRIP for cross and native Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
2025-09-16 4:09 ` [PATCH v3 8/8] debug_build.inc: override BUILD_MODE and BUILD_DIR for cargo.bbclass Hongxu Jia
6 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
The debug_build.inc is used to collect debug build configuration,
override MESON_BUILDTYPE for meson.bbclass when DEBUG_BUILD is enabled
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes-recipe/meson.bbclass | 3 +--
meta/conf/distro/include/debug_build.inc | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
index c8b3e1ec29..0944ea03cc 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -28,8 +28,7 @@ MESON_INSTALL_TAGS ?= ""
def noprefix(var, d):
return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
-MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}"
-MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD"
+MESON_BUILDTYPE ??= "plain"
MESONOPTS = " --prefix ${prefix} \
--buildtype ${MESON_BUILDTYPE} \
--bindir ${@noprefix('bindir', d)} \
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
index 6e28e76b44..33fd92e005 100644
--- a/meta/conf/distro/include/debug_build.inc
+++ b/meta/conf/distro/include/debug_build.inc
@@ -46,3 +46,6 @@ CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1"
# No strip sysroot for cross and native
INHIBIT_SYSROOT_STRIP:class-cross ?= "1"
INHIBIT_SYSROOT_STRIP:class-native ?= "1"
+
+# For meson.bbclass
+MESON_BUILDTYPE ?= "debug"
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v3 8/8] debug_build.inc: override BUILD_MODE and BUILD_DIR for cargo.bbclass
2025-09-16 4:09 [PATCH 1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk Hongxu Jia
` (5 preceding siblings ...)
2025-09-16 4:09 ` [PATCH 7/8] debug_build.inc: override MESON_BUILDTYPE for meson.bbclass Hongxu Jia
@ 2025-09-16 4:09 ` Hongxu Jia
6 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2025-09-16 4:09 UTC (permalink / raw)
To: openembedded-core; +Cc: randy.macleod, peter.kjellerstedt
The debug_build.inc is used to collect debug build configuration,
override BUILD_MODE and BUILD_DIR for cargo.bbclass when DEBUG_BUILD is enabled
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes-recipe/cargo.bbclass | 4 ++--
meta/conf/distro/include/debug_build.inc | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass
index 2dd28e95d3..c90b8c18f0 100644
--- a/meta/classes-recipe/cargo.bbclass
+++ b/meta/classes-recipe/cargo.bbclass
@@ -31,7 +31,7 @@ B = "${WORKDIR}/build"
export RUST_BACKTRACE = "1"
RUSTFLAGS ??= ""
-BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
+BUILD_MODE ??= "--release"
# --frozen flag will prevent network access (which is required since only
# the do_fetch step is authorized to access network)
# and will require an up to date Cargo.lock file.
@@ -41,7 +41,7 @@ CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manif
# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
# change if CARGO_BUILD_FLAGS changes.
-BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}"
+BUILD_DIR ??= "release"
CARGO_TARGET_SUBDIR = "${RUST_HOST_SYS}/${BUILD_DIR}"
oe_cargo_build () {
export RUSTFLAGS="${RUSTFLAGS}"
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
index 33fd92e005..81b6a5f234 100644
--- a/meta/conf/distro/include/debug_build.inc
+++ b/meta/conf/distro/include/debug_build.inc
@@ -49,3 +49,7 @@ INHIBIT_SYSROOT_STRIP:class-native ?= "1"
# For meson.bbclass
MESON_BUILDTYPE ?= "debug"
+
+# For cargo.bbclass
+BUILD_MODE ?= ""
+BUILD_DIR ?= "debug"
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread