[oe] = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?

Richard Purdie rpurdie at rpsys.net
Mon Feb 15 09:44:21 UTC 2010


On Sun, 2010-02-14 at 21:25 +0000, Phil Blundell wrote:
> On Sun, 2010-02-14 at 21:38 +0100, bernhard.guillon at opensimpad.org
> wrote:
> >  for i in `find ${S}/ -name "*.pc" -type f` ; do 
> > -            sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
> > +            sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' -e 's:-rpath-link,${STAGING_LIBDIR}::g' $i
> >          done
> 
> That probably is a reasonable thing to do, but you might want to filter
> out the preceding "-Wl," as well.

Note its pkgconfig we're talking about here which should never be
putting this stuff in its .pc files in the first place as it has some
understanding of sysroots. Usually if these things are creeping in, its
due to dependencies being added as via its expanded cflags/libs lines
rather than as a true dependency.

I'm not sure how it copes with --rpath-link though. If that is breaking,
we should consider fixing pkgconfig itself.

Cheers,

Richard





More information about the Openembedded-devel mailing list