diff mbox series

[3/3] bitbake.conf/webkitgtk: Rename DEBUG_FLAGS to DEBUG_LEVELFLAG

Message ID 20240712064726.1448710-3-richard.purdie@linuxfoundation.org
State New
Headers show
Series [1/3] bitbake.conf: Drop obsolete debug compiler options | expand

Commit Message

Richard Purdie July 12, 2024, 6:47 a.m. UTC
Allow the "-g" option in DEBUG_FLAGS to be controlled directly with
a specific DEBUG_LEVELFLAG variable.

We can then use this in the webkitgtk recipe for finer grained flag
control and it allows the flag to be unset easily.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/bitbake.conf                            | 6 +++---
 meta/conf/documentation.conf                      | 4 ++--
 meta/recipes-devtools/valgrind/valgrind_3.23.0.bb | 2 +-
 meta/recipes-sato/webkit/webkitgtk_2.44.1.bb      | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index aba560dd292..1939e26ec59 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -663,10 +663,10 @@  DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \
  -fmacro-prefix-map=${STAGING_DIR_HOST}= \
  -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
 "
-DEBUG_FLAGS ?= "-g"
+DEBUG_LEVELFLAG ?= "-g"
 
-FULL_OPTIMIZATION = "-O2 ${DEBUG_FLAGS}"
-DEBUG_OPTIMIZATION = "-Og ${DEBUG_FLAGS}
+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"
 # compiler flags for native/nativesdk
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 53170fd34e3..155353eafc2 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -132,7 +132,7 @@  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_FLAGS}'."
+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}'."
 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."
@@ -180,7 +180,7 @@  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_FLAGS}'."
+FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 ${DEBUG_LEVELFLAG}'."
 
 #G
 
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.23.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.23.0.bb
index ad9e26cb6ba..494a3c0df91 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.23.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.23.0.bb
@@ -88,7 +88,7 @@  CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
 # to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
 # (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
 # which fixes build path issue in DWARF.
-SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
+SELECTED_OPTIMIZATION = "${DEBUG_LEVELFLAG}"
 
 # Split out various helper scripts to separate packages to avoid the
 # main package depending on perl and python.
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb b/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb
index 29e12bb8c5a..d927d81a436 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb
@@ -93,7 +93,7 @@  EXTRA_OECMAKE = " \
 
 # Unless DEBUG_BUILD is enabled, pass -g1 to massively reduce the size of the
 # debug symbols (4.3GB to 700M at time of writing)
-DEBUG_FLAGS:append = "${@oe.utils.vartrue('DEBUG_BUILD', '', ' -g1', d)}"
+DEBUG_LEVELFLAG = "-g1"
 
 # Javascript JIT is not supported on ARC
 EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF "