summaryrefslogtreecommitdiff
path: root/meta/conf/bitbake.conf
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-02-16 04:14:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-18 07:39:20 +0000
commit0fe42caad8f7c142741a28b09458f4e2fdf289ff (patch)
tree3613c9f337ce178cae4151f789d5678312de7147 /meta/conf/bitbake.conf
parent3f454361fc323119c2850aeb239171e40d085161 (diff)
downloadopenembedded-core-0fe42caad8f7c142741a28b09458f4e2fdf289ff.tar.gz
openembedded-core-0fe42caad8f7c142741a28b09458f4e2fdf289ff.tar.bz2
openembedded-core-0fe42caad8f7c142741a28b09458f4e2fdf289ff.zip
bitbake.conf: use target path as compile dir in debugging info
In debugging information, it uses target paths rather than build ones as compile dir. ... -fdebug-prefix-map=old=new When compiling files in directory old, record debugging information describing them as in new instead. ... Compile without this fix: objdump -g git/test.o ... The Directory Table (offset 0x1b): | 1 /buildarea/raid0/hjia/build-20160119-yocto-buildpath/tmp/sysroots/x86_64-linux/usr/lib/ i686-pokymllib32-linux.lib32-gcc-cross-initial-i686/gcc/i686-pokymllib32-linux/5.3.0/include | 2 /buildarea/raid0/hjia/build-20160119-yocto-buildpath/tmp/sysroots/lib32-qemux86-64/usr/include/bits | 3 /buildarea/raid0/hjia/build-20160119-yocto-buildpath/tmp/sysroots/lib32-qemux86-64/usr/include ... Compile with this fix: objdump -g git/test.o ... The Directory Table (offset 0x1b): | 1 /usr/lib/i686-pokymllib32-linux.lib32-gcc-cross-initial-i686/gcc/i686-pokymllib32-linux/ 5.3.0/include | 2 /usr/include/bits | 3 /usr/include ... [YOCTO #7058] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r--meta/conf/bitbake.conf8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index a75bb8b7d4..631b759349 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -544,7 +544,13 @@ EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
##################################################################
# Optimization flags.
##################################################################
-DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types"
+DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types \
+ -fdebug-prefix-map=${B}=/usr/src/${BPN} \
+ -fdebug-prefix-map=${S}=/usr/src/${BPN} \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+ -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+"
+
# Disabled until the option works properly -feliminate-dwarf2-dups
FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"