diff options
author | Julien Isorce <j.isorce@samsung.com> | 2016-08-24 16:06:54 +0100 |
---|---|---|
committer | Julien Isorce <j.isorce@samsung.com> | 2016-08-24 16:10:44 +0100 |
commit | a3b33f5dbe43d8b16b4ede2d459184ed693541b3 (patch) | |
tree | 5d28bdab761977beff5b5197693b422da76140c8 | |
parent | 418d3b60892c03e8f7454915247b0b5ce6ba7f0e (diff) | |
download | icecream-a3b33f5dbe43d8b16b4ede2d459184ed693541b3.tar.gz icecream-a3b33f5dbe43d8b16b4ede2d459184ed693541b3.tar.bz2 icecream-a3b33f5dbe43d8b16b4ede2d459184ed693541b3.zip |
icecc-create-env: execute ldd on original files
ldd /usr/bin/gcc works but /emul/usr/bin/gcc doesn't.
The right solution would be to append /emul/lib/ld-linux.so.2
to RTLDLIST in /usr/bin/ldd.
Or to play with patchelf --set-interpreter.
Change-Id: Id86c3cee8d162328c6685cfc633e65e2994eec76
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
-rwxr-xr-x | client/icecc-create-env | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/icecc-create-env b/client/icecc-create-env index e99338c..96ade91 100755 --- a/client/icecc-create-env +++ b/client/icecc-create-env @@ -42,6 +42,11 @@ add_file () # Only call ldd when it makes sense if file -L "$path" | grep 'ELF' > /dev/null 2>&1; then if ! file -L "$path" | grep 'static' > /dev/null 2>&1; then + # Tizen + binarypath=$path + if [[ $binarypath == /emul* ]]; then + binarypath=$name + fi # ldd now outputs ld as /lib/ld-linux.so.xx on current nptl based glibc # this regexp parse the outputs like: # ldd /usr/bin/gcc @@ -49,7 +54,7 @@ add_file () # libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000) # /lib/ld-linux.so.2 (0xb7fe8000) # covering both situations ( with => and without ) - for lib in `ldd "$path" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do + for lib in `ldd "$binarypath" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`; do test -f "$lib" || continue # Check wether the same library also exists in the parent directory, # and prefer that on the assumption that it is a more generic one. |