diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2025-02-07 13:27:46 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-11 11:44:19 +0000 |
commit | 4ed99ca9b4a9fa634bcf637fcaaacad4f0c59c0d (patch) | |
tree | 0fddfb7d6aae1596a37e8b7fa043722be82da298 | |
parent | 5c8705b483486d371539973b2fc4a22d044df18a (diff) | |
download | poky-4ed99ca9b4a9fa634bcf637fcaaacad4f0c59c0d.tar.gz |
toolchain-shar-relocate.sh: support multiple dynamic loaders for multilib
While nativesdk support multilib, there are two dynamic loaders,
$OECORE_NATIVE_SYSROOT/lib64/ld-linux-x86-64.so.2
$OECORE_NATIVE_SYSROOT/lib/ld-linux.so.2
Search them with wildcard and call relocate_sdk.py separately
[ YOCTO #15722 ]
(From OE-Core rev: 703187755244b1a45dd9f90aeaf620d4c92a6757)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/files/toolchain-shar-relocate.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh index 69ea063c8c..c7170349db 100644 --- a/meta/files/toolchain-shar-relocate.sh +++ b/meta/files/toolchain-shar-relocate.sh | |||
@@ -8,8 +8,8 @@ done | |||
8 | # fix dynamic loader paths in all ELF SDK binaries | 8 | # fix dynamic loader paths in all ELF SDK binaries |
9 | # allow symlinks to be accessed via the find command too | 9 | # allow symlinks to be accessed via the find command too |
10 | native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"') | 10 | native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"') |
11 | dl_path=$($SUDO_EXEC find $native_sysroot/lib/ -maxdepth 1 -name "ld-linux*") | 11 | dl_paths=$($SUDO_EXEC find $native_sysroot/lib*/ -maxdepth 1 -name "ld-linux*") |
12 | if [ "$dl_path" = "" ] ; then | 12 | if [ "$dl_paths" = "" ] ; then |
13 | echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!" | 13 | echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!" |
14 | exit 1 | 14 | exit 1 |
15 | fi | 15 | fi |
@@ -39,7 +39,9 @@ if [ x\${PYTHON} = "x" ]; then | |||
39 | echo "SDK could not be relocated. No python found." | 39 | echo "SDK could not be relocated. No python found." |
40 | exit 1 | 40 | exit 1 |
41 | fi | 41 | fi |
42 | \${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files | 42 | for dl_path in \$(echo "$dl_paths"); do |
43 | \${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir \$dl_path $executable_files | ||
44 | done | ||
43 | EOF | 45 | EOF |
44 | 46 | ||
45 | $SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh | 47 | $SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh |