Skip to contentSkip to conversation

Fixes for DEBUG_BUILD

PATCH New Robert Yang 1 participant 3 messages Jan 24, 2019

lore
Share & tools
lore
#0 lore raw

cover Fixes for DEBUG_BUILD

The following changes since commit a4edfa4cf451bf412525887b5b24b9db6486ae97:

remove unused distutils-tools.bbclass (2019-01-23 07:57:02 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/debug
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/debug

Robert Yang (2):
native.bbclass/cross.bbclass: No strip sysroot when DEBUG_BUILD bitbake.conf: Add DEBUG_BUILD to vardeps

 meta/classes/cross.bbclass  | 3 +++
 meta/classes/native.bbclass | 3 +++
 meta/conf/bitbake.conf      | 3 ++-
 3 files changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/2 native.bbclass/cross.bbclass: No strip sysroot when DEBUG_BUILD

This makes dbg work for native tools, and makes debug native tools problem easier, otherwise, there is no symbol since trippped.

---
 meta/classes/cross.bbclass  | 3 +++
 meta/classes/native.bbclass | 3 +++
 2 files changed, 6 insertions(+)
meta/classes/cross.bbclass +3 -0
index 34d7951..f832561 100644
@@ -17,6 +17,9 @@ 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)}"
+
 export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
 
 STAGING_DIR_HOST = "${RECIPE_SYSROOT_NATIVE}"
meta/classes/native.bbclass +3 -0
index ddccfe2e1..30a30f9 100644
@@ -119,6 +119,9 @@ 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)}"
+
 python native_virtclass_handler () {
     pn = e.data.getVar("PN")
     if not pn.endswith("-native"):
Signature · 1 line
2.10.2
#2 lore raw

PATCH 2/2 bitbake.conf: Add DEBUG_BUILD to vardeps

In reply to Robert Yang

Otherwise the recipe would not be rebuilt when enable/disable DEBUG_BUILD.

---
 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +2 -1
index 0bdcd04..b00a52b 100644
@@ -609,8 +609,9 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
 FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
 DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
 SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
-SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION"
+SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
 BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-O -g -feliminate-unused-debug-types -fno-omit-frame-pointer', '-O2', d)} -pipe"
+BUILD_OPTIMIZATION[vardeps] += "DEBUG_BUILD"
 
 ##################################################################
 # Settings used by bitbake-layers.
Signature · 1 line
2.10.2