summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Francois Dagenais <jeff.dagenais@gmail.com>2015-11-16 14:37:16 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-12 08:42:29 +0000
commitd2ea8f1041437043701d616cb9388affc2f4c512 (patch)
treeca27b538152441da35fa64ab56ba8c8049110443
parent02ef4376087015a8fb2b01f11700e591c3b1bcb4 (diff)
downloadpoky-d2ea8f1041437043701d616cb9388affc2f4c512.tar.gz
toolchain-shar-relocate: don't assume last state of env_setup_script is good
In the case where many environment-setup-* files exist, the incorrect filename might be lastly set in env_setup_script, which leads to incorrect behaviour for the initialization of native_sysroot. The scenario I had was that our custom meta-toolchain-*.bb, which inherits populate_sdk, defined another environment-setup-* file to dump variable information for qt-creator. The file is named like so in order for the sdk shell script to pick it up and fix the SDK paths in the file. Since it (coincidentally) alphabetically comes after ...-core2, it was last set in env_setup_script and the grep OECORE_NATIVE_SYSROOT would simply be blank. The apparent symptom was "...relocate_sdk.py: Argument list too long" since the find command would not be searching in the right path. (From OE-Core master rev: a36469c97c9cb335de1e95dea5141038f337df95) (From OE-Core rev: 2f04a9285cfabdb053dafacd17320f847ac6343f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/files/toolchain-shar-relocate.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index 4ef2927171..d58e4ed152 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -1,3 +1,5 @@
1#reset the env_setup_script value to the proper value
2env_setup_script=$target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@
1# fix dynamic loader paths in all ELF SDK binaries 3# fix dynamic loader paths in all ELF SDK binaries
2native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"') 4native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
3dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*") 5dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")