summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/toolchain-scripts.bbclass
diff options
context:
space:
mode:
authorJan Kircher <openembedded@hetsh.de>2023-01-10 17:11:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-12 23:08:59 +0000
commitb1a12a5bbdc1e47aa2a493cff8d190fae87eb541 (patch)
tree9e0f06af18010d89484c648679dbe06d3c0ef338 /meta/classes-recipe/toolchain-scripts.bbclass
parentc48d92e080bcddfb78da40e69e61fa0d44c5d24c (diff)
downloadpoky-b1a12a5bbdc1e47aa2a493cff8d190fae87eb541.tar.gz
toolchain-scripts: compatibility with unbound variable protection
Fixed an error when Bash's unbound variable protection is enabled (set -u) and variable "LD_LIBRARY_PATH" does not exist. (From OE-Core rev: 85685370b0ad93291cda59fb091a15eeecf5e0d5) Signed-off-by: Jan Kircher <openembedded@hetsh.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/toolchain-scripts.bbclass')
-rw-r--r--meta/classes-recipe/toolchain-scripts.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass
index 3cc823fe63..fa658a6596 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -37,7 +37,7 @@ toolchain_create_sdk_env_script () {
37 echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script 37 echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script
38 echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script 38 echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script
39 echo '# Only disable this check if you are absolutely know what you are doing!' >> $script 39 echo '# Only disable this check if you are absolutely know what you are doing!' >> $script
40 echo 'if [ ! -z "$LD_LIBRARY_PATH" ]; then' >> $script 40 echo 'if [ ! -z "${LD_LIBRARY_PATH:-}" ]; then' >> $script
41 echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script 41 echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script
42 echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script 42 echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script
43 echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script 43 echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script