]> code.ossystems Code Review - openembedded-core.git/commit
icecc-create-env: Fix executable rpaths
authorJoshua Watt <jpewhacker@gmail.com>
Mon, 12 Feb 2018 16:52:04 +0000 (10:52 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Feb 2018 13:20:27 +0000 (13:20 +0000)
commitcfe98765b40c28a132b5a4bce39f71f06b4eb0bc
treeadc3bb367595fe4c021e904a99c54d92bf368153
parent122d6a5bdcbc494bba0fa2b213d730500f6f7dbc
icecc-create-env: Fix executable rpaths

Executables in the toolchain archive occasionally contain runtime
library search paths (RPATH) that use the $ORIGIN placeholder. However,
in order for that placeholder to work, /proc must be mounted. When
iceccd executes the toolchain in the chroot environment, it doesn't
mount /proc, so it is unable to resolve $ORIGIN resulting in a failure
to find dynamic libraries.

The fix is to replace $ORIGIN in executable RPATH entries with the known
chroot executable path. In order for this to work, the actual real path
to the executable must be resolved to remove any symlinks, otherwise the
calculate $ORIGIN replacement will be wrong. This is done by using
"readlink -f", which is an acceptable dependency because Yocto already
requires it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env