This is in line with the recent config.guess change in commit
d70c4fa934de164178054c3a60aaa0024ed07c91.
The patch was generated using patch-6.gawk script introduced in that
commit.
* config.sub: Revert POSIX command substitutions to classic form.
Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Complement binutils commit ae52f4830604 ("Add MIPS r3 and r5 support.")
and recognize MIPS CPU patterns for the R3 and R5 ISA levels, used by
GAS to set defaults.
* config.sub (mipsisa32r3, mipsisa32r3el, mipsisa32r5, mipsisa32r5el,
mipsisa64r3, mipsisa64r3el, mipsisa64r5, mipsisa64r5el): Recognize.
* doc/config.sub.1: Regenerate.
* testsuite/config-sub.data: Add test cases.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Commit 5e531d391852 broke powerpc-eabivle:
$ ./config.sub powerpc-eabivle
Invalid configuration `powerpc-eabivle': OS `eabivle' not recognized
Also powerpc-eabisim and probably some arm configurations.
* config.sub: Accept OS of eabi* and gnueabi*.
* testsuite/config-sub.data: Add powerpc-eabisim and powerpc-eabivle.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Recently RISC-V community got patches big-endian support for binutils,
and we'd like to accept that, however before accepting that I think it
would be better to upstream config.sub and config.guess change here :)
It's my check result on Ubuntu 18.04:
$ make check
cd testsuite && bash config-guess.sh && rm uname
PASS: config.guess checks (131 tests)
cd testsuite && bash config-sub.sh
PASS: config.sub checks (830 tests)
PASS: config.sub idempotency checks (767 tests)
PASS: config.sub canonicalise each config.guess testcase (131 tests)
* config.guess (riscv32be:Linux:*:*, riscv64be:Linux:*:*): Recognize.
* config.sub (riscv32be, riscv64be): Likewise.
* doc/config.guess.1: Regenerate.
* doc/config.sub.1: Likewise.
* testsuite/config-guess.data: Add test cases for riscv32be, and riscv64be.
* testsuite/config-sub.data (riscv32be, riscv64be): Add test cases.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
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>