Apparently, this is needed to correctly detect musl libc in different
versions of Alpine Linux.
According to
https://lists.gnu.org/archive/html/config-patches/2020-09/msg00002.html,
the ldd based check does not work for some old versions of the Alpine Linux,
and, according to
https://lists.gnu.org/archive/html/config-patches/2020-11/msg00002.html,
the compiler may not be available in a fresh Alpine container.
The ldd based check is essentially the same as the check that was
introduced by commit 3d00f60242f1726fc6eaa38e09435a969ee7ebe5, it is
performed iff the compiler based check could not give a definitive
answer.
Reported-by: Cheng XU <xucheng@me.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
I previously refactored config.sub to parse 'basic_machine' into
separate 'cpu' and 'vendor' variables. This is a kindred refactor
where 'basic_os' (a rename of 'os' when used early on) is now parsed
into 'kernel' and 'os'.
Like the previous refactoring, this does make things a bit longer. I
think the change makes the code easier to understand and more robust,
so it is worth the cost of a longer script.
Signed-off-by: Ben Elliston <bje@gnu.org>
overrides.
Previously, 'ibm' was forced, which caused problems when someone
wanted to use 'busybox' as a vendor and cross-compile with a slightly
different toolchain. The fix changed behaviour such that without any
vendor, it would use to 'unknown' rather than 'ibm' as before.
This patch aims to compromise between the old and new behaviour by
making 'ibm' a default for those CPUs when no vendor is specified, but
if the user explicitly provides a vendor that is used instead. This
sort of "vendor defaulting" has plenty of precedent in config.sub, so
it seemed like a good approach.
Signed-off-by: Ben Elliston <bje@gnu.org>
config.guess expected triplet through config.sub so that we can check
that it is properly recognised. Sometimes, new triplets have been
added to config.guess without updating config.sub accordingly (eg,
Harris NightHawk machines running PowerUnix from the mid-1990s!)
* config.sub (case $os): Match nsk* and powerunix. Don't later
match nsk* and set os=nsk which removes the OS version number.
* testsuite/config-guess.data: Tweak Unleashed test case.
* testsuite/config-sub.sh (run_config_sub_with_guess_triplets):
New test.
* testsuite/config-sub.data: Add test cases for wasm (Web Assembly) and
wasi (Web Assembly System Interface).
Signed-off-by: Ben Elliston <bje@gnu.org>
$basic_machine in`. The second case only needs to handle patterns
of the form *-*. We can drop some patterns without a change in
functionality.
Signed-off-by: Ben Elliston <bje@gnu.org>
in` arms. These patterns whitelist canonical CPU types that are
allowed with any vendor. The former arm accepts a provided vendor,
and the latter arm defaults a vendor when none is provided. Split
`case $basic_machine in` in to two, and then pre-default the
missing vendor so that only the explicit-vendor rules are needed.
Signed-off-by: Ben Elliston <bje@gnu.org>