This version fixes a race condition in the build, which in most
cases was benign but in rare cases could successfully build a Python
that would crash at runtime.
While $HOST-clang is more specific for the use in llvm-mingw,
using the form $HOST-gcc would allow using the same script in
GCC based environments too.
This command isn't a standard tool; different distributions have
different implementations, and e.g. Fedora doesn't ship it by
default.
Settle on using "command -v $tool >/dev/null" for tests about whether
a tool is available. (We could also use "hash $tool 2>/dev/null" as we
already had in build-all.sh, but settling on using "command -v"
everywhere, for consistency and simplicity.)
Even if we don't patch cpython-mingw any longer, we still run
autoreconf on it (and libffi), which can cause changes to
committed files. If trying to check out a different version of
the source, this would fail unless the local changes have been
discarded.