[Buildroot] [PATCH] pkgconf: make wrapper relocatable

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Mar 9 14:50:41 UTC 2016


Dear Peter Korsgaard,

On Wed, 09 Mar 2016 15:30:18 +0100, Peter Korsgaard wrote:

>  > WRAPPER_DIR=$(dirname $0)
> 
> That relies on argv[0] containing the full path, which it normally will
> do when you run it from the shell, but isn't guaranteed to work. If we
> want to support that then we should use /proc/self/exe

Well, OK.

> > STAGING_DIR=$(readlink -f ${WRAPPER_DIR}/../../../staging/)
> 
> This will only work if you keep the entire buildroot output around (or
> rather output/staging) and don't customize the BR2_HOST_DIR.

Indeed, so we need to do like Arnout suggests, hardcoding the tuple
inside the script, so that we really only on the contents of host/, and
not on the staging symlink.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list