diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2019-02-20 15:08:52 -0600 |
---|---|---|
committer | Joshua Watt <JPEWhacker@gmail.com> | 2019-02-20 15:10:06 -0600 |
commit | 750706a3501ec9f5e3fa6dcbfb13a9027b6a875e (patch) | |
tree | 7403e3ea4130bdd423e1a8ed32e4ad4b320f9bb8 | |
parent | 6ae8836b39d925b357934dd73562c319ad6200ac (diff) | |
download | meta-mingw-750706a3501ec9f5e3fa6dcbfb13a9027b6a875e.tar.gz |
classes/toolchain-scripts-mingw32: Fix bad cmd flag2.7_M3
The command to properly set the exit code at the end of the toolchain
environment was using the correct flag delimiter '/', but the code to
coerce all the unix-style paths to windows paths was incorrectly
changing this to a '\'. This worked find in wines cmd, but on an actual
Windows host, this caused cmd to wait indefinitely. Fix this by
appending the command after the path separators are coerced.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-rw-r--r-- | classes/toolchain-scripts-mingw32.bbclass | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/classes/toolchain-scripts-mingw32.bbclass b/classes/toolchain-scripts-mingw32.bbclass index 32493d7..0afbf7d 100644 --- a/classes/toolchain-scripts-mingw32.bbclass +++ b/classes/toolchain-scripts-mingw32.bbclass | |||
@@ -38,6 +38,17 @@ toolchain_create_sdk_env_script_sdkmingw32 () { | |||
38 | # Change unix '/' to Win32 '\' | 38 | # Change unix '/' to Win32 '\' |
39 | sed -e 's,/,\\,g' -i $script | 39 | sed -e 's,/,\\,g' -i $script |
40 | 40 | ||
41 | # set has some annoying properties: | ||
42 | # 1) If it is successful %ERRORLEVEL% is unchanged (as opposed to being set | ||
43 | # to 0 to indicate success) | ||
44 | # 2) Making an assignment like "set A=" is considered an error and sets | ||
45 | # %ERRORLEVEL% to 1. | ||
46 | # | ||
47 | # Practically, this means that if any of the set calls make an empty | ||
48 | # assignment that error will be propagated. To prevent this, a command is | ||
49 | # run to ensure that the "exit code" of this script is 0 | ||
50 | echo "@%COMSPEC% /C exit 0 > NUL" >> $script | ||
51 | |||
41 | # Make the file windows friendly... | 52 | # Make the file windows friendly... |
42 | awk 'sub("$", "\r")' $script > $script.new | 53 | awk 'sub("$", "\r")' $script > $script.new |
43 | mv $script.new $script | 54 | mv $script.new $script |
@@ -81,17 +92,6 @@ toolchain_shared_env_script_sdkmingw32 () { | |||
81 | FOR %%x IN (%OECORE_NATIVE_SYSROOT%\\environment-setup.d\\*.bat) DO call "%%x" | 92 | FOR %%x IN (%OECORE_NATIVE_SYSROOT%\\environment-setup.d\\*.bat) DO call "%%x" |
82 | ) | 93 | ) |
83 | EOF | 94 | EOF |
84 | |||
85 | # set has some annoying properties: | ||
86 | # 1) If it is successful %ERRORLEVEL% is unchanged (as opposed to being set | ||
87 | # to 0 to indicate success) | ||
88 | # 2) Making an assignment like "set A=" is considered an error and sets | ||
89 | # %ERRORLEVEL% to 1. | ||
90 | # | ||
91 | # Practically, this means that if any of the set calls make an empty | ||
92 | # assignment that error will be propagated. To prevent this, a command is | ||
93 | # run to ensure that the "exit code" of this script is 0 | ||
94 | echo "@%COMSPEC% /C exit 0 > NUL" >> $script | ||
95 | } | 95 | } |
96 | 96 | ||
97 | toolchain_create_sdk_siteconfig_append_sdkmingw32 () { | 97 | toolchain_create_sdk_siteconfig_append_sdkmingw32 () { |