mirror of
https://git.yoctoproject.org/poky
synced 2026-02-15 05:03:03 +01:00
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] (From OE-Core rev: 0fe42caad8f7c142741a28b09458f4e2fdf289ff) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ef30119185
commit
7a11650ebc
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user