summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2018-04-19 11:04:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-23 17:26:04 +0100
commit9da1b6e59a4d4234a276bb2ffd37fdb7d9b3183c (patch)
tree0d89a8a13f93922cc01d23c858ea37a26fe2985e /meta/conf
parent71b4ae25612d6dd3687fdd583ed0077e744899cb (diff)
downloadpoky-9da1b6e59a4d4234a276bb2ffd37fdb7d9b3183c.tar.gz
bitbake.conf: re-order DEBUG_PREFIX_MAP
When specifying several -fdebug-prefix-map command line options to gcc, they are evaluated right to left (last one first). Normally, the order is irrelevant. However, when we try to map both: recipe-sysroot-native recipe-sysroot the order matters. With the original order most of our debug packages contain incorrect debug symbols. Take for example /usr/bin/.debug/setfacl from acl-dbg: $ strings setfacl | grep native ... -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include -native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include Reordering the fdebug-prefix-map arguments will give us the correct paths: /usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include Note there may be additional an incorrect paths, such as: /usr/src/debug/glibc/2.27-r0/recipe-sysroot-native/usr/lib/x86_64-poky-linux.gcc-cross-initial-x86_64/gcc/x86_64-poky-linux/7.3.0/include But that one needs to be fixed in the recipe for glibc. (From OE-Core rev: 593ffffc3baf064b982891d61dacebd08aed3e96) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/bitbake.conf3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 92aa944b91..a21b7282fb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -600,9 +600,10 @@ EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
600################################################################## 600##################################################################
601# Optimization flags. 601# Optimization flags.
602################################################################## 602##################################################################
603# Beware: applied last to first
603DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ 604DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
604 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
605 -fdebug-prefix-map=${STAGING_DIR_HOST}= \ 605 -fdebug-prefix-map=${STAGING_DIR_HOST}= \
606 -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
606" 607"
607DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}" 608DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
608 609