[Buildroot] [PATCH] pkgconf: make wrapper relocatable

Gustavo Zacarias gustavo at zacarias.com.ar
Wed Mar 9 14:28:09 UTC 2016


On 09/03/16 11:03, Thomas Petazzoni wrote:

> What about doing this relatively to the wrapper location?
>
> WRAPPER_DIR=$(dirname $0)
> STAGING_DIR=$(readlink -f ${WRAPPER_DIR}/../../../staging/)
>
> and there you are, it is both relocatable and doesn't rely on
> STAGING_DIR being defined in the environment.
>
> Thomas

Hi.
That won't work, since staging is an absolute symlink, so when moving 
the SDK around it will be broken and fail.
You need something like:

WRAPPER_DIR=$(dirname $0)
STAGING_DIR=$(readlink -f ${WRAPPER_DIR}/../@TUPLE@/sysroot)

And hardcode tuple which isn't likely to change.
Regards.



More information about the buildroot mailing list