[oe] [OE][PATCH] pkgconfig.bbclass: Remove spurious rpaths and -isystem includes from pkgconfig files.

Ash Charles ashcharles at gmail.com
Sun Aug 8 03:14:49 UTC 2010


Hi,

I made the following change to my pkgconfig.bbclass to fix some
staging-qa.  Firstly, does this patch look good (I'm still learning
here)?  Secondly, should a change like this also be made so libraries
specified by pkgconfig files are actually available on the target?

--- a/classes/pkgconfig.bbclass
+++ b/classes/pkgconfig.bbclass
@@ -2,7 +2,7 @@ DEPENDS_prepend = "pkgconfig-native "

 do_install_prepend () {
        for i in `find ${S}/ -name "*.pc" -type f` ; do \
-               sed -i -e 's:-L${STAGING_LIBDIR}::g' \
+               sed -i -e 's:-L${STAGING_LIBDIR}:-L${prefix}/lib:g' \
...

Thanks,

Ash
>>>>>>
Signed-off-by: Ash Charles <ashcharles at gmail.com>
[PATCH] pkgconfig.bbclass: Remove spurious rpaths and -isystem
includes from pkgconfig files.

* Some build configurators such as cmake include -isystem paths to use
the staged system headers but these should not be included in
pkgconfig files.
* Likewise, pkgconfig.bbclass currently strips -R options from
pkgconfig files; this should likewise apply to -rpath-link options.
* Finally, we currently dispose of -I paths in our pkgconfig file that
point to the staging directory but we in fact want to modify the -I
paths to the correct location on the target.
---
 classes/pkgconfig.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
index cf37ca1..ae69258 100644
--- a/classes/pkgconfig.bbclass
+++ b/classes/pkgconfig.bbclass
@@ -4,7 +4,9 @@ do_install_prepend () {
        for i in `find ${S}/ -name "*.pc" -type f` ; do \
                sed -i -e 's:-L${STAGING_LIBDIR}::g' \
                        -e 's:-R${STAGING_LIBDIR}::g' \
-                       -e 's:-I${STAGING_INCDIR}::g' \
+                       -e 's:-rpath-link,${STAGING_LIBDIR}::g' \
+                       -e 's:-I${STAGING_INCDIR}:-I${prefix}/include:g' \
+                       -e 's:-isystem${STAGING_INCDIR}::g' \
                        $i
         done
 }
-- 
1.7.0.4




More information about the Openembedded-devel mailing list