[oe-commits] [openembedded-core] 01/07: bitbake.conf: re-order DEBUG_PREFIX_MAP

git at git.openembedded.org git at git.openembedded.org
Mon Apr 23 10:15:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit 593ffffc3baf064b982891d61dacebd08aed3e96
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Thu Apr 19 11:04:10 2018 -0700

    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.
    
    Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 92aa944..a21b728 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -600,9 +600,10 @@ EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
 ##################################################################
 # Optimization flags.
 ##################################################################
+# Beware: applied last to first
 DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
-                     -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
                      -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+                     -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
 "
 DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list