summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-04-10 21:21:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-13 16:55:25 +0100
commitd1e88ad01df9b6419e02f632b1ba288d4cc3b2bf (patch)
tree8c6dc6b953f09d8d38c918f6ec1d6e30b7172135
parent3d0bd786fd79967cf8754d022044df311dd8ad3e (diff)
downloadopenembedded-core-d1e88ad01df9b6419e02f632b1ba288d4cc3b2bf.tar.gz
icecc-create-env: Fix RUNPATH files
Some newer libraries and programs use RUNPATH to specify the library search path. These executables were being skipped by the rpath fixup code because it was grepping the ELF header for RPATH only. A more correct solution is to ask patchelf to report the rpath, as that tool will properly report either RPATH or RUNPATH as appropriate. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xmeta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 074c7675c0..3015f4e215 100755
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -42,11 +42,13 @@ fix_rpath ()
if ! is_dynamic_elf "$path"; then
return
fi
- local new_rpath="`readelf -w -d "$path" | grep RPATH | \
+ local old_rpath="`$PATCHELF --print-rpath "$path"`"
+ local new_rpath="`echo "$old_rpath" | \
sed 's/.*\[\(.*\)\]/\1/g' | \
sed "s,\\\$ORIGIN,/$origin,g"`"
if test -n "$new_rpath"; then
+ print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
$PATCHELF --set-rpath "$new_rpath" "$path"
fi
}