summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJan Kircher <openembedded@hetsh.de>2023-01-10 17:11:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-13 07:44:09 +0000
commitc28f0905a267420a4444a5c28aab52862996cf45 (patch)
treec8e0755821d73f309fbe0e0330a679c9de4a0bf6 /meta
parenta8de3a223305e85ed6d24837fae469e9d582aecd (diff)
downloadpoky-c28f0905a267420a4444a5c28aab52862996cf45.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: 2c7309eea616ec88338d508bc9f284e3bd44f5a1) 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> (cherry picked from commit 85685370b0ad93291cda59fb091a15eeecf5e0d5) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/toolchain-scripts.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..9aa31dc6cd 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -29,7 +29,7 @@ toolchain_create_sdk_env_script () {
29 echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $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 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 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 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 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 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 35 echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script