diff mbox series

toolchain-shar-relocate: allow 'find' access to libraries in symlinked directories

Message ID 20240201025621.1632547-3-maanyagoenka@linux.microsoft.com
State Accepted, archived
Commit 8468f24e3e81d5248eb1424e43accd2ea8bf0568
Headers show
Series toolchain-shar-relocate: allow 'find' access to libraries in symlinked directories | expand

Commit Message

Maanya Goenka Feb. 1, 2024, 2:56 a.m. UTC
From: Maanya Goenka <maanyagoenka@microsoft.com>

If the '/' is not added to the end of the dynamic loader path, only directories
that are not symlinks will be looked into for libraries such as ld-linux*,
so the slash is added to allow the 'find' command to have symlinked directory access too.

Signed-off-by: Maanya Goenka <maanyagoenka@microsoft.com>
Signed-off-by : Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
---
 meta/files/toolchain-shar-relocate.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index cee9adbf39..e8ab357717 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -4,8 +4,9 @@  if ! xargs --version > /dev/null 2>&1; then
 fi
 
 # fix dynamic loader paths in all ELF SDK binaries
+# allow symlinks to be accessed via the find command too
 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 -maxdepth 1 -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