summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@arri.de>2022-02-14 11:50:20 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2022-02-15 12:29:06 +0800
commitd57b748ef22d75b863356a97bfc585e1e967a44a (patch)
treefd13a64ece70629d92a6628e41ab579210356646
parenta32cee6c9e1ff53e424b8386c36555e6cf3bf3af (diff)
downloadopenembedded-core-contrib-d57b748ef22d75b863356a97bfc585e1e967a44a.tar.gz
sdk: fix search for dynamic loader
if the package "nativesdk-glibc-dbg" is installed as part of the SDK, the existing search expression finds two files: $OECORE_NATIVE_SYSROOT/lib/.debug/ld-linux-x86-64.so.2 $OECORE_NATIVE_SYSROOT/lib/ld-linux-x86-64.so.2 The generated relocate_sdk.sh shell script contains then an extra newline and segfaults during SDK relocation. Limit the search depth to 1, to avoid finding the file in the .debug directory. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/files/toolchain-shar-relocate.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index 3ece04db0a..cee9adbf39 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -5,7 +5,7 @@ fi
# fix dynamic loader paths in all ELF SDK binaries
native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
-dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
+dl_path=$($SUDO_EXEC find $native_sysroot/lib -maxdepth 1 -name "ld-linux*")
if [ "$dl_path" = "" ] ; then
echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
exit 1