Skip to contentSkip to conversation

libcomps & librepo: fix buildpaths qa warnings

PATCH In review [email protected] 3 participants 5 messages Jan 15, 2019 – Jan 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libcomps & librepo: fix buildpaths qa warnings

From: Kai Kang <[email protected]>

Add preprocess option '-fmacro-prefix-map' to TARGET_CPPFLAGS to fix buildpaths qa warnings of libcomps and librepo.

---
 meta/recipes-devtools/libcomps/libcomps_git.bb | 2 ++
 meta/recipes-devtools/librepo/librepo_1.9.3.bb | 2 ++
 2 files changed, 4 insertions(+)
meta/recipes-devtools/libcomps/libcomps_git.bb +2 -0
index 500d412340..421b8173bb 100644
@@ -18,6 +18,8 @@ inherit cmake distutils3-base
 
 DEPENDS += "libxml2 expat libcheck"
 
+TARGET_CPPFLAGS += "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
 OECMAKE_SOURCEPATH = "${S}/libcomps"
 
meta/recipes-devtools/librepo/librepo_1.9.3.bb +2 -0
index abfed798f3..4f468b198a 100644
@@ -15,6 +15,8 @@ DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2"
 
 inherit cmake distutils3-base pkgconfig
 
+TARGET_CPPFLAGS += "-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DWITH_ZCHUNK=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.20.0
#1 lore raw
Quoted 2 lines · On Tue, 15 Jan 2019 at 07:46, <[email protected]> wrote:

Add preprocess option '-fmacro-prefix-map' to TARGET_CPPFLAGS to fix buildpaths qa warnings of libcomps and librepo.

These warnings are not happening on the AB or on my local setup. Could they be happening due to something in your local config? Can you try with plain poky master please?

Alex

author
#2 lore raw
Quoted 5 lines · Alexander Kanavin
Quoted 2 lines · On Tue, 15 Jan 2019 at 07:46, <[email protected]> wrote:

Add preprocess option '-fmacro-prefix-map' to TARGET_CPPFLAGS to fix buildpaths qa warnings of libcomps and librepo.

These warnings are not happening on the AB or on my local setup. Could they be happening due to something in your local config?

Hi Alex,

I just enabled buildpaths check in local.conf:

WARN_QA_append = " buildpaths"

Regards,
Kai

Quoted 5 lines

Can you try
with plain poky master please?

Alex

Signature · 1 line
Kai Kang
#3 lore raw
In reply to [email protected]
Quoted 2 lines · On Tue, 15 Jan 2019 at 06:46, <[email protected]> wrote:

Add preprocess option '-fmacro-prefix-map' to TARGET_CPPFLAGS to fix buildpaths qa warnings of libcomps and librepo.

This is something we should be doing globally, not in a specific recipe.

We pass -fdebug-prefix-map already in bitbake.conf (remap debug paths), and macro-prefix-map is the same but for __FILE__. This is good, because we've a few patches to remove __FILE__ already and this means we can drop it.

Digging further reveals that there's also -ffile-prefix-map, which sets debug-prefix-map and macro-prefix-map at once. We should just change bitbake.conf to use that instead of debug-prefix-map.

Ross

author
#4 lore raw
Quoted 5 lines · Ross
Quoted 2 lines · On Tue, 15 Jan 2019 at 06:46, <[email protected]> wrote:

Add preprocess option '-fmacro-prefix-map' to TARGET_CPPFLAGS to fix buildpaths qa warnings of libcomps and librepo.

This is something we should be doing globally, not in a specific recipe.

Quoted 8 lines

We pass -fdebug-prefix-map already in bitbake.conf (remap debug paths), and macro-prefix-map is the same but for __FILE__. This is good, because we've a few patches to remove __FILE__ already and this means we can drop it.

Digging further reveals that there's also -ffile-prefix-map, which sets debug-prefix-map and macro-prefix-map at once. We should just change bitbake.conf to use that instead of debug-prefix-map.

OK.

--Kai

Quoted 3 lines

Ross

Signature · 1 line
Kai Kang