[Buildroot] [PATCH] pkgconf: make wrapper relocatable

Gustavo Zacarias gustavo at zacarias.com.ar
Wed Mar 9 14:04:51 UTC 2016


On 09/03/16 11:00, Peter Korsgaard wrote:

> Well, we cannot really break existing features to add new ones. The
> relative location between the pkg-config wrapper script and the staging
> directory is constant (or rather known at build time), so I guess we can
> do something with /proc/self/exe. We might need to implement the wrapper
> in C instead for that to work as /proc/self/exe for a shell script seems
> to return /bin/dash here.

That's overly complicated for no value at all.
You know the sysroot is in the host directory as well, so you just need 
to filter out /usr/bin from $0 and hardcode the tuple in the wrapper - 
that's guaranteed to not change, otherwise you're in serious trouble.
Regards.



More information about the buildroot mailing list