|
@@ -1,10 +1,10 @@
|
|
|
#! /bin/sh
|
|
|
# Configuration validation subroutine script.
|
|
|
-# Copyright 1992-2022 Free Software Foundation, Inc.
|
|
|
+# Copyright 1992-2023 Free Software Foundation, Inc.
|
|
|
|
|
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
|
|
|
|
|
-timestamp='2022-01-03'
|
|
|
+timestamp='2023-07-31'
|
|
|
|
|
|
# This file is free software; you can redistribute it and/or modify it
|
|
|
# under the terms of the GNU General Public License as published by
|
|
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|
|
version="\
|
|
|
GNU config.sub ($timestamp)
|
|
|
|
|
|
-Copyright 1992-2022 Free Software Foundation, Inc.
|
|
|
+Copyright 1992-2023 Free Software Foundation, Inc.
|
|
|
|
|
|
This is free software; see the source for copying conditions. There is NO
|
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
|
|
|
|
help="
|
|
|
-Try \`$me --help' for more information."
|
|
|
+Try '$me --help' for more information."
|
|
|
|
|
|
# Parse command line
|
|
|
while test $# -gt 0 ; do
|
|
@@ -130,7 +130,7 @@ IFS=$saved_IFS
|
|
|
# Separate into logical components for further validation
|
|
|
case $1 in
|
|
|
*-*-*-*-*)
|
|
|
- echo Invalid configuration \`"$1"\': more than four components >&2
|
|
|
+ echo "Invalid configuration '$1': more than four components" >&2
|
|
|
exit 1
|
|
|
;;
|
|
|
*-*-*-*)
|
|
@@ -145,7 +145,8 @@ case $1 in
|
|
|
nto-qnx* | linux-* | uclinux-uclibc* \
|
|
|
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
|
|
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
|
|
- | storm-chaos* | os2-emx* | rtmk-nova*)
|
|
|
+ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
|
|
|
+ | windows-* )
|
|
|
basic_machine=$field1
|
|
|
basic_os=$maybe_os
|
|
|
;;
|
|
@@ -943,7 +944,7 @@ $basic_machine
|
|
|
EOF
|
|
|
IFS=$saved_IFS
|
|
|
;;
|
|
|
- # We use `pc' rather than `unknown'
|
|
|
+ # We use 'pc' rather than 'unknown'
|
|
|
# because (1) that's what they normally are, and
|
|
|
# (2) the word "unknown" tends to confuse beginning users.
|
|
|
i*86 | x86_64)
|
|
@@ -1205,39 +1206,16 @@ case $cpu-$vendor in
|
|
|
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
|
|
| ip2k | iq2000 \
|
|
|
| k1om \
|
|
|
+ | kvx \
|
|
|
| le32 | le64 \
|
|
|
| lm32 \
|
|
|
- | loongarch32 | loongarch64 | loongarchx32 \
|
|
|
+ | loongarch32 | loongarch64 \
|
|
|
| m32c | m32r | m32rle \
|
|
|
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
|
|
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
|
|
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
|
|
| microblaze | microblazeel \
|
|
|
- | mips | mipsbe | mipseb | mipsel | mipsle \
|
|
|
- | mips16 \
|
|
|
- | mips64 | mips64eb | mips64el \
|
|
|
- | mips64octeon | mips64octeonel \
|
|
|
- | mips64orion | mips64orionel \
|
|
|
- | mips64r5900 | mips64r5900el \
|
|
|
- | mips64vr | mips64vrel \
|
|
|
- | mips64vr4100 | mips64vr4100el \
|
|
|
- | mips64vr4300 | mips64vr4300el \
|
|
|
- | mips64vr5000 | mips64vr5000el \
|
|
|
- | mips64vr5900 | mips64vr5900el \
|
|
|
- | mipsisa32 | mipsisa32el \
|
|
|
- | mipsisa32r2 | mipsisa32r2el \
|
|
|
- | mipsisa32r3 | mipsisa32r3el \
|
|
|
- | mipsisa32r5 | mipsisa32r5el \
|
|
|
- | mipsisa32r6 | mipsisa32r6el \
|
|
|
- | mipsisa64 | mipsisa64el \
|
|
|
- | mipsisa64r2 | mipsisa64r2el \
|
|
|
- | mipsisa64r3 | mipsisa64r3el \
|
|
|
- | mipsisa64r5 | mipsisa64r5el \
|
|
|
- | mipsisa64r6 | mipsisa64r6el \
|
|
|
- | mipsisa64sb1 | mipsisa64sb1el \
|
|
|
- | mipsisa64sr71k | mipsisa64sr71kel \
|
|
|
- | mipsr5900 | mipsr5900el \
|
|
|
- | mipstx39 | mipstx39el \
|
|
|
+ | mips* \
|
|
|
| mmix \
|
|
|
| mn10200 | mn10300 \
|
|
|
| moxie \
|
|
@@ -1285,7 +1263,7 @@ case $cpu-$vendor in
|
|
|
;;
|
|
|
|
|
|
*)
|
|
|
- echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
|
|
|
+ echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
|
|
|
exit 1
|
|
|
;;
|
|
|
esac
|
|
@@ -1341,6 +1319,10 @@ EOF
|
|
|
kernel=linux
|
|
|
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
|
|
;;
|
|
|
+ managarm*)
|
|
|
+ kernel=managarm
|
|
|
+ os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
|
|
|
+ ;;
|
|
|
*)
|
|
|
kernel=
|
|
|
os=$basic_os
|
|
@@ -1728,7 +1710,7 @@ case $os in
|
|
|
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
|
|
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
|
|
| hiux* | abug | nacl* | netware* | windows* \
|
|
|
- | os9* | macos* | osx* | ios* \
|
|
|
+ | os9* | macos* | osx* | ios* | tvos* | watchos* \
|
|
|
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
|
|
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
|
|
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
|
@@ -1754,7 +1736,7 @@ case $os in
|
|
|
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
|
|
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
|
|
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
|
|
- | fiwix* )
|
|
|
+ | fiwix* | mlibc* | cos* | mbr* )
|
|
|
;;
|
|
|
# This one is extra strict with allowed versions
|
|
|
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
|
@@ -1762,8 +1744,11 @@ case $os in
|
|
|
;;
|
|
|
none)
|
|
|
;;
|
|
|
+ kernel* | msvc* )
|
|
|
+ # Restricted further below
|
|
|
+ ;;
|
|
|
*)
|
|
|
- echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
|
|
|
+ echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
|
|
|
exit 1
|
|
|
;;
|
|
|
esac
|
|
@@ -1772,14 +1757,30 @@ esac
|
|
|
# (given a valid OS), if there is a kernel.
|
|
|
case $kernel-$os in
|
|
|
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
|
|
- | linux-musl* | linux-relibc* | linux-uclibc* )
|
|
|
+ | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* )
|
|
|
;;
|
|
|
uclinux-uclibc* )
|
|
|
;;
|
|
|
- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
|
|
|
+ managarm-mlibc* | managarm-kernel* )
|
|
|
+ ;;
|
|
|
+ windows*-gnu* | windows*-msvc*)
|
|
|
+ ;;
|
|
|
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
|
|
|
# These are just libc implementations, not actual OSes, and thus
|
|
|
# require a kernel.
|
|
|
- echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
|
|
|
+ echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
|
|
|
+ exit 1
|
|
|
+ ;;
|
|
|
+ -kernel* )
|
|
|
+ echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
|
|
|
+ exit 1
|
|
|
+ ;;
|
|
|
+ *-kernel* )
|
|
|
+ echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
|
|
|
+ exit 1
|
|
|
+ ;;
|
|
|
+ *-msvc* )
|
|
|
+ echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
|
|
|
exit 1
|
|
|
;;
|
|
|
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
|
@@ -1792,11 +1793,15 @@ case $kernel-$os in
|
|
|
;;
|
|
|
*-eabi* | *-gnueabi*)
|
|
|
;;
|
|
|
+ none-coff* | none-elf*)
|
|
|
+ # None (no kernel, i.e. freestanding / bare metal),
|
|
|
+ # can be paired with an output format "OS"
|
|
|
+ ;;
|
|
|
-*)
|
|
|
# Blank kernel with real OS is always fine.
|
|
|
;;
|
|
|
*-*)
|
|
|
- echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
|
|
|
+ echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
|
|
|
exit 1
|
|
|
;;
|
|
|
esac
|