summaryrefslogtreecommitdiffstats
path: root/meta/files/toolchain-shar-relocate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/files/toolchain-shar-relocate.sh')
-rw-r--r--meta/files/toolchain-shar-relocate.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index 5433741296..cee9adbf39 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -5,7 +5,7 @@ fi
5 5
6# fix dynamic loader paths in all ELF SDK binaries 6# fix dynamic loader paths in all ELF SDK binaries
7native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"') 7native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
8dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*") 8dl_path=$($SUDO_EXEC find $native_sysroot/lib -maxdepth 1 -name "ld-linux*")
9if [ "$dl_path" = "" ] ; then 9if [ "$dl_path" = "" ] ; then
10 echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!" 10 echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
11 exit 1 11 exit 1
@@ -61,7 +61,7 @@ done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
61 -e "$target_sdk_dir/post-relocate-setup" \ 61 -e "$target_sdk_dir/post-relocate-setup" \
62 -e "$target_sdk_dir/${0##*/}" | \ 62 -e "$target_sdk_dir/${0##*/}" | \
63 xargs -n100 $SUDO_EXEC sed -i \ 63 xargs -n100 $SUDO_EXEC sed -i \
64 -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \ 64 -e "s:$SDK_BUILD_PATH:$target_sdk_dir:g" \
65 -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \ 65 -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \
66 -e "s: /usr/bin/perl: /usr/bin/env perl:g" 66 -e "s: /usr/bin/perl: /usr/bin/env perl:g"
67 67
@@ -72,7 +72,7 @@ fi
72 72
73# change all symlinks pointing to @SDKPATH@ 73# change all symlinks pointing to @SDKPATH@
74for l in $($SUDO_EXEC find $native_sysroot -type l); do 74for l in $($SUDO_EXEC find $native_sysroot -type l); do
75 $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l 75 $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l
76 if [ $? -ne 0 ]; then 76 if [ $? -ne 0 ]; then
77 echo "Failed to setup symlinks. Relocate script failed. Abort!" 77 echo "Failed to setup symlinks. Relocate script failed. Abort!"
78 exit 1 78 exit 1