summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2017-06-15 15:09:49 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-28 15:52:17 +0100
commit3c2cd780f83b74b86ca0fbf2b628319b0060c94f (patch)
tree1fd8f97c0faa06fa144871ff370f61297f9c849f /meta/classes
parent14cea1a05fce23f00a98411951a855e075cbaec3 (diff)
downloadpoky-3c2cd780f83b74b86ca0fbf2b628319b0060c94f.tar.gz
toolchain-scripts: add check for LD_LIBRARY_PATH in the SDK env setup script
Provide a descriptive error message and exit the environment-setup script, when LD_LIBRARY_PATH is set on the host system. (From OE-Core rev: 2ad6c563828e70728eb48095b2326b52342df37c) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/toolchain-scripts.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 0ee0ec53f5..9bcfe708c7 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -24,6 +24,21 @@ toolchain_create_sdk_env_script () {
24 script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-$multimach_target_sys} 24 script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-$multimach_target_sys}
25 rm -f $script 25 rm -f $script
26 touch $script 26 touch $script
27
28 echo '# Check for LD_LIBRARY_PATH being set, which can break SDK and generally is a bad practice' >> $script
29 echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script
30 echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script
31 echo '# Only disable this check if you are absolutely know what you are doing!' >> $script
32 echo 'if [ ! -z "$LD_LIBRARY_PATH" ]; then' >> $script
33 echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script
34 echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script
35 echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script
36 echo ' echo "For more references see:"' >> $script
37 echo ' echo " http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80"' >> $script
38 echo ' echo " http://xahlee.info/UnixResource_dir/_/ldpath.html"' >> $script
39 echo ' return 1' >> $script
40 echo 'fi' >> $script
41
27 echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script 42 echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
28 EXTRAPATH="" 43 EXTRAPATH=""
29 for i in ${CANADIANEXTRAOS}; do 44 for i in ${CANADIANEXTRAOS}; do