]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
toolchain-shar-relocate: allow 'find' access to libraries in symlinked directories
authorMaanya Goenka <maanyagoenka@microsoft.com>
Thu, 1 Feb 2024 02:56:24 +0000 (02:56 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 Feb 2024 10:53:03 +0000 (10:53 +0000)
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/files/toolchain-shar-relocate.sh

index cee9adbf399cea8dae64a5916eaab8611a5a5135..e8ab357717f3235a02ac939567223c5c7253c54e 100644 (file)
@@ -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