diff options
author | Jan Kircher <openembedded@hetsh.de> | 2023-01-10 17:11:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-26 23:37:05 +0000 |
commit | 7b199d5083043fb43b14b8ace61d1cf97d240a1f (patch) | |
tree | eb4f92b732caa06697054077b3a5c32af43851a7 | |
parent | 82bd71e1cbb39f1301a457664af99270237eb038 (diff) | |
download | poky-7b199d5083043fb43b14b8ace61d1cf97d240a1f.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: ad2b7b4d4138ac5f6f74f69d9d6d88a592b14c6f)
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>
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 1d7c703748..d2562b5d38 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass | |||
@@ -31,7 +31,7 @@ toolchain_create_sdk_env_script () { | |||
31 | echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script | 31 | echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script |
32 | echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script | 32 | echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script |
33 | echo '# Only disable this check if you are absolutely know what you are doing!' >> $script | 33 | echo '# Only disable this check if you are absolutely know what you are doing!' >> $script |
34 | echo 'if [ ! -z "$LD_LIBRARY_PATH" ]; then' >> $script | 34 | echo 'if [ ! -z "${LD_LIBRARY_PATH:-}" ]; then' >> $script |
35 | echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script | 35 | echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script |
36 | echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script | 36 | echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script |
37 | echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script | 37 | echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script |