A number of scripts use features from bash such as `local` which are not
in the POSIX spec. This breaks on systems where sh is not symlinked to
bash.
This patch changes the interpreter indicated by the hashbang to bash for
those scripts
Use riscv-none-elf instead of legacy riscv-none-embed as target triplet for
RISC-V development. However, if ricsv-none-elf is not present, try
riscv64-unknown-elf and riscv-none-embed instead. If the legacy riscv-none-embed
is used, a warning is printed.
Not all operating systems name the GNU Make `make`. FreeBSD e.g. uses a
different dialect of Make, that seems to be incompatible with GNU make.
(I wasn't able to get `make` run, but `gmake` works).
This allows our test scripts to be configured via the environment
variable `MAKE` to point to a different make command.
Some systems use dash as system shell, others use bash. The shell used
by make can also be different, and unrelated to the system shell.
Differences in this variable can cause problems when testing PRs and
reporting bugs.
The default shell is important system information that should be reported.
If the flake8 executable is not found, the static test script reports
the tool as missing. It may happen that the flake8 module is installed,
but the console entry point is not.
In the flake8 shell script, flake is invoked via `python -m`. The result
is a confusing error message where static-test reports the tools as missing,
yet the flake8 tests are run.
This patch makes the toolchain version script use the same command as the
flake8 script.
Detect command line tool versions without using "command".
Command may be a builting in some shells, leading to unportability.
The new version uses the status code to correctly detect a non-existent
command. This allows it to differentiate between error in the tool and
not-found errors.
It also works with compound commands, for example `python -m callable_module".
Currently version information of commands and tools is only parsed
from STDOUT, however some tools like openocd print version info
to STDERR only. This commits adds parsing of STDERR for version
infos if STDOUT does not contain such info.