1
1
#! /bin/sh
2
2
# Configuration validation subroutine script.
3
- # Copyright 1992-2021 Free Software Foundation, Inc.
3
+ # Copyright 1992-2023 Free Software Foundation, Inc.
4
4
5
5
# shellcheck disable=SC2006,SC2268 # see below for rationale
6
6
7
- timestamp=' 2021-08-14 '
7
+ timestamp=' 2023-06-26 '
8
8
9
9
# This file is free software; you can redistribute it and/or modify it
10
10
# under the terms of the GNU General Public License as published by
11
- # the Free Software Foundation; either version 3 of the License, or
11
+ # the Free Software Foundation, either version 3 of the License, or
12
12
# (at your option) any later version.
13
13
#
14
14
# This program is distributed in the hope that it will be useful, but
76
76
version=" \
77
77
GNU config.sub ($timestamp )
78
78
79
- Copyright 1992-2021 Free Software Foundation, Inc.
79
+ Copyright 1992-2023 Free Software Foundation, Inc.
80
80
81
81
This is free software; see the source for copying conditions. There is NO
82
82
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83
83
84
84
help="
85
- Try \` $me --help' for more information."
85
+ Try ' $me --help' for more information."
86
86
87
87
# Parse command line
88
88
while test $# -gt 0 ; do
@@ -130,7 +130,7 @@ IFS=$saved_IFS
130
130
# Separate into logical components for further validation
131
131
case $1 in
132
132
* -* -* -* -* )
133
- echo Invalid configuration \` " $1 " \ ' : more than four components >&2
133
+ echo " Invalid configuration ' $1 ': more than four components" >&2
134
134
exit 1
135
135
;;
136
136
* -* -* -* )
@@ -145,7 +145,8 @@ case $1 in
145
145
nto-qnx* | linux-* | uclinux-uclibc* \
146
146
| uclinux-gnu* | kfreebsd* -gnu* | knetbsd* -gnu* | netbsd* -gnu* \
147
147
| netbsd* -eabi* | kopensolaris* -gnu* | cloudabi* -eabi* \
148
- | storm-chaos* | os2-emx* | rtmk-nova* )
148
+ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
149
+ | windows-* )
149
150
basic_machine=$field1
150
151
basic_os=$maybe_os
151
152
;;
@@ -943,7 +944,7 @@ $basic_machine
943
944
EOF
944
945
IFS=$saved_IFS
945
946
;;
946
- # We use ` pc' rather than ` unknown'
947
+ # We use ' pc' rather than ' unknown'
947
948
# because (1) that's what they normally are, and
948
949
# (2) the word "unknown" tends to confuse beginning users.
949
950
i* 86 | x86_64)
@@ -1020,6 +1021,11 @@ case $cpu-$vendor in
1020
1021
;;
1021
1022
1022
1023
# Here we normalize CPU types with a missing or matching vendor
1024
+ armh-unknown | armh-alt)
1025
+ cpu=armv7l
1026
+ vendor=alt
1027
+ basic_os=${basic_os:- linux-gnueabihf}
1028
+ ;;
1023
1029
dpx20-unknown | dpx20-bull)
1024
1030
cpu=rs6000
1025
1031
vendor=bull
@@ -1070,7 +1076,7 @@ case $cpu-$vendor in
1070
1076
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-* )
1071
1077
cpu=i586
1072
1078
;;
1073
- pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_ * -* )
1079
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_ * -* )
1074
1080
cpu=i686
1075
1081
;;
1076
1082
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-* )
@@ -1121,7 +1127,7 @@ case $cpu-$vendor in
1121
1127
xscale-* | xscalee[bl]-* )
1122
1128
cpu=` echo " $cpu " | sed ' s/^xscale/arm/' `
1123
1129
;;
1124
- arm64-* )
1130
+ arm64-* | aarch64le- * )
1125
1131
cpu=aarch64
1126
1132
;;
1127
1133
@@ -1202,7 +1208,7 @@ case $cpu-$vendor in
1202
1208
| k1om \
1203
1209
| le32 | le64 \
1204
1210
| lm32 \
1205
- | loongarch32 | loongarch64 | loongarchx32 \
1211
+ | loongarch32 | loongarch64 \
1206
1212
| m32c | m32r | m32rle \
1207
1213
| m5200 | m68000 | m680[012346]0 | m68360 | m683? 2 | m68k \
1208
1214
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1280,7 +1286,7 @@ case $cpu-$vendor in
1280
1286
;;
1281
1287
1282
1288
* )
1283
- echo Invalid configuration \` " $1 " \ ' : machine \` " $cpu -$vendor " \ ' not recognized 1>&2
1289
+ echo " Invalid configuration ' $1 ': machine ' $cpu -$vendor ' not recognized" 1>&2
1284
1290
exit 1
1285
1291
;;
1286
1292
esac
@@ -1304,7 +1310,7 @@ esac
1304
1310
if test x$basic_os ! = x
1305
1311
then
1306
1312
1307
- # First recognize some ad-hoc caes , or perhaps split kernel-os, or else just
1313
+ # First recognize some ad-hoc cases , or perhaps split kernel-os, or else just
1308
1314
# set os.
1309
1315
case $basic_os in
1310
1316
gnu/linux* )
@@ -1336,6 +1342,10 @@ EOF
1336
1342
kernel=linux
1337
1343
os=` echo " $basic_os " | sed -e ' s|linux|gnu|' `
1338
1344
;;
1345
+ managarm* )
1346
+ kernel=managarm
1347
+ os=` echo " $basic_os " | sed -e ' s|managarm|mlibc|' `
1348
+ ;;
1339
1349
* )
1340
1350
kernel=
1341
1351
os=$basic_os
@@ -1748,16 +1758,20 @@ case $os in
1748
1758
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
1749
1759
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1750
1760
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1751
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* )
1761
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
1762
+ | fiwix* | mlibc* )
1752
1763
;;
1753
1764
# This one is extra strict with allowed versions
1754
1765
sco3.2v2 | sco3.2v[4-9]* | sco5v6* )
1755
1766
# Don't forget version if it is 3.2v4 or newer.
1756
1767
;;
1757
1768
none)
1758
1769
;;
1770
+ kernel* | msvc* )
1771
+ # Restricted further below
1772
+ ;;
1759
1773
* )
1760
- echo Invalid configuration \` " $1 " \ ' : OS \` " $os " \ ' not recognized 1>&2
1774
+ echo " Invalid configuration ' $1 ': OS ' $os ' not recognized" 1>&2
1761
1775
exit 1
1762
1776
;;
1763
1777
esac
@@ -1766,14 +1780,30 @@ esac
1766
1780
# (given a valid OS), if there is a kernel.
1767
1781
case $kernel -$os in
1768
1782
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
1769
- | linux-musl* | linux-relibc* | linux-uclibc* )
1783
+ | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc * )
1770
1784
;;
1771
1785
uclinux-uclibc* )
1772
1786
;;
1773
- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
1787
+ managarm-mlibc* | managarm-kernel* )
1788
+ ;;
1789
+ windows* -gnu* | windows* -msvc* )
1790
+ ;;
1791
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* )
1774
1792
# These are just libc implementations, not actual OSes, and thus
1775
1793
# require a kernel.
1776
- echo " Invalid configuration \` $1 ': libc \` $os ' needs explicit kernel." 1>&2
1794
+ echo " Invalid configuration '$1 ': libc '$os ' needs explicit kernel." 1>&2
1795
+ exit 1
1796
+ ;;
1797
+ -kernel* )
1798
+ echo " Invalid configuration '$1 ': '$os ' needs explicit kernel." 1>&2
1799
+ exit 1
1800
+ ;;
1801
+ * -kernel* )
1802
+ echo " Invalid configuration '$1 ': '$kernel ' does not support '$os '." 1>&2
1803
+ exit 1
1804
+ ;;
1805
+ * -msvc* )
1806
+ echo " Invalid configuration '$1 ': '$os ' needs 'windows'." 1>&2
1777
1807
exit 1
1778
1808
;;
1779
1809
kfreebsd* -gnu* | kopensolaris* -gnu* )
@@ -1790,7 +1820,7 @@ case $kernel-$os in
1790
1820
# Blank kernel with real OS is always fine.
1791
1821
;;
1792
1822
* -* )
1793
- echo " Invalid configuration \` $1 ': Kernel \` $kernel ' not known to work with OS \` $os '." 1>&2
1823
+ echo " Invalid configuration ' $1 ': Kernel ' $kernel ' not known to work with OS ' $os '." 1>&2
1794
1824
exit 1
1795
1825
;;
1796
1826
esac
0 commit comments