bitbake.conf: DEBUG_PREFIX_MAP: add -fmacro-prefix-map for STAGING_DIR_NATIVE
* the default STAGING_DIR_NATIVE starts with STAGING_DIR_HOST and the only difference is '-native' suffix at the end * this can lead into replacing STAGING_DIR_NATIVE path with just "-native" in FILE macros * I've noticed this by accident in python3-matplotlib where buildpaths QA warning was triggered only for lib32-python3-matplotlib and it was because pybind11 path to STAGING_DIR_NATIVE was mapped to only '-native/<path>' in python3-matplotlib build (which doesn't trigger buildpaths QA and lib32-python3-matplotlib the macro path wasn't replaced at all, because of 'lib32-' prefix in: -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \ -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \ -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native= \ * more details in meta-python fix for lib32-python3-matplotlib: https://lists.openembedded.org/g/openembedded-devel/message/112074 * the order of *-prefix-map options still seems to be that the last one matching wins and this works with gcc and clang, see: https://reviews.llvm.org/D148975?id=516863 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109591 * some components might sometimes be built with -coverage and could use -fcoverage-prefix-map: https://reviews.llvm.org/D148757 or -fprofile-prefix-map: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-prefix-map but will leave that to recipes which actually use -coverage for now Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Please register or sign in to comment