[OE-core] [PATCH 2/2] libtool: normalize link paths before considering for RPATH

Richard Purdie richard.purdie at linuxfoundation.org
Mon Aug 20 21:55:43 UTC 2012


On Mon, 2012-08-20 at 09:59 -0700, Andy Ross wrote:
> On 08/19/2012 03:06 AM, Richard Purdie wrote:
> > On Fri, 2012-08-17 at 08:53 -0700, Andy Ross wrote:
> >> ++                libdir_norm=`echo $libdir \
> >> ++                  | sed 's/\/\+\.\(\/\+\|$\)/\//g' \
> >> ++                  | sed 's/[^\/]\+\/\+\.\.\(\/\+\|$\)//g' \
> >> ++                  | sed 's/\/\+/\//g' \
> >> ++                  | sed 's/\(.\)\/$/\1/g'`
> >
> > Can't we use func_norm_abspath here?
> 
> I have to admit I got a little confused reading that code (not that my
> sed mess is significantly better, but at least I trust it because I
> wrote it); but it looks to me like it's an abspath implementation on
> the host filesystem (not the use of `pwd` in a few places).  That will
> work for pruning in this case, since the problem case is already an
> absolute path to a host directory.  But I don't see how it won't in
> principle break things by expanding host paths.

As I read it, it will only use pwd if the path is relative or empty. I
can't think of a case where you'd encode something like that into an
rpath...

Libtool can't expect the directory to exist on the filesystem when it
makes these calls so we should be safe from that perspective.

Cheers,

Richard





More information about the Openembedded-core mailing list