summaryrefslogtreecommitdiffstats
path: root/meta
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:58:07 +0100
commitbeb38c111735ff710a9cd3b00ce06548600d0d8b (patch)
treeb9e168e9a5b28120a07bced5ba062155559cf86b /meta
parent57ca83dac13c3dbac734fcd8c20fec222c5cb70f (diff)
downloadpoky-beb38c111735ff710a9cd3b00ce06548600d0d8b.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. (From OE-Core rev: d1e88ad01df9b6419e02f632b1ba288d4cc3b2bf) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 ()
42 if ! is_dynamic_elf "$path"; then 42 if ! is_dynamic_elf "$path"; then
43 return 43 return
44 fi 44 fi
45 local new_rpath="`readelf -w -d "$path" | grep RPATH | \ 45 local old_rpath="`$PATCHELF --print-rpath "$path"`"
46 local new_rpath="`echo "$old_rpath" | \
46 sed 's/.*\[\(.*\)\]/\1/g' | \ 47 sed 's/.*\[\(.*\)\]/\1/g' | \
47 sed "s,\\\$ORIGIN,/$origin,g"`" 48 sed "s,\\\$ORIGIN,/$origin,g"`"
48 49
49 if test -n "$new_rpath"; then 50 if test -n "$new_rpath"; then
51 print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
50 $PATCHELF --set-rpath "$new_rpath" "$path" 52 $PATCHELF --set-rpath "$new_rpath" "$path"
51 fi 53 fi
52} 54}