Fossil SCM

Latest upstream autosetup (supports more environments).

stephan 2024-09-24 21:21 trunk
Commit 921edd2e51aca6aacdcc2a9b4291a499ccd17cbffe7f639f1bed7ba3fe85f35c
--- autosetup/autosetup-config.guess
+++ autosetup/autosetup-config.guess
@@ -1,16 +1,16 @@
11
#! /bin/sh
22
# Attempt to guess a canonical system name.
3
-# Copyright 1992-2021 Free Software Foundation, Inc.
3
+# Copyright 1992-2024 Free Software Foundation, Inc.
44
55
# shellcheck disable=SC2006,SC2268 # see below for rationale
66
7
-timestamp='2021-06-03'
7
+timestamp='2024-07-27'
88
99
# This file is free software; you can redistribute it and/or modify it
1010
# 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
1212
# (at your option) any later version.
1313
#
1414
# This program is distributed in the hope that it will be useful, but
1515
# WITHOUT ANY WARRANTY; without even the implied warranty of
1616
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,11 +45,11 @@
4545
me=`echo "$0" | sed -e 's,.*/,,'`
4646
4747
usage="\
4848
Usage: $0 [OPTION]
4949
50
-Output the configuration name of the system \`$me' is run on.
50
+Output the configuration name of the system '$me' is run on.
5151
5252
Options:
5353
-h, --help print this help, then exit
5454
-t, --time-stamp print date of last modification, then exit
5555
-v, --version print version number, then exit
@@ -58,17 +58,17 @@
5858
5959
version="\
6060
GNU config.guess ($timestamp)
6161
6262
Originally written by Per Bothner.
63
-Copyright 1992-2021 Free Software Foundation, Inc.
63
+Copyright 1992-2024 Free Software Foundation, Inc.
6464
6565
This is free software; see the source for copying conditions. There is NO
6666
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6767
6868
help="
69
-Try \`$me --help' for more information."
69
+Try '$me --help' for more information."
7070
7171
# Parse command line
7272
while test $# -gt 0 ; do
7373
case $1 in
7474
--time-stamp | --time* | -t )
@@ -100,12 +100,12 @@
100100
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
101101
# compiler to aid in system detection is discouraged as it requires
102102
# temporary files to be created and, as you can see below, it is a
103103
# headache to deal with in a portable fashion.
104104
105
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
106
-# use `HOST_CC' if defined, but it is deprecated.
105
+# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
106
+# use 'HOST_CC' if defined, but it is deprecated.
107107
108108
# Portable tmp directory creation inspired by the Autoconf team.
109109
110110
tmp=
111111
# shellcheck disable=SC2172
@@ -121,11 +121,11 @@
121121
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122122
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123123
dummy=$tmp/dummy
124124
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125125
,,) echo "int x;" > "$dummy.c"
126
- for driver in cc gcc c89 c99 ; do
126
+ for driver in cc gcc c17 c99 c89 ; do
127127
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128128
CC_FOR_BUILD=$driver
129129
break
130130
fi
131131
done
@@ -153,22 +153,28 @@
153153
Linux|GNU|GNU/*)
154154
LIBC=unknown
155155
156156
set_cc_for_build
157157
cat <<-EOF > "$dummy.c"
158
+ #if defined(__ANDROID__)
159
+ LIBC=android
160
+ #else
158161
#include <features.h>
159162
#if defined(__UCLIBC__)
160163
LIBC=uclibc
161164
#elif defined(__dietlibc__)
162165
LIBC=dietlibc
163166
#elif defined(__GLIBC__)
164167
LIBC=gnu
168
+ #elif defined(__LLVM_LIBC__)
169
+ LIBC=llvm
165170
#else
166171
#include <stdarg.h>
167172
/* First heuristic to detect musl libc. */
168173
#ifdef __DEFINED_va_list
169174
LIBC=musl
175
+ #endif
170176
#endif
171177
#endif
172178
EOF
173179
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174180
eval "$cc_set_libc"
@@ -435,11 +441,11 @@
435441
# If there is a compiler, see if it is configured for 64-bit objects.
436442
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
437443
# This test works for both compilers.
438444
if test "$CC_FOR_BUILD" != no_compiler_found; then
439445
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
446
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
441447
grep IS_64BIT_ARCH >/dev/null
442448
then
443449
SUN_ARCH=x86_64
444450
fi
445451
fi
@@ -457,11 +463,11 @@
457463
case `/usr/bin/arch -k` in
458464
Series*|S4*)
459465
UNAME_RELEASE=`uname -v`
460466
;;
461467
esac
462
- # Japanese Language versions have a version number like `4.1.3-JL'.
468
+ # Japanese Language versions have a version number like '4.1.3-JL'.
463469
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464470
GUESS=sparc-sun-sunos$SUN_REL
465471
;;
466472
sun3*:SunOS:*:*)
467473
GUESS=m68k-sun-sunos$UNAME_RELEASE
@@ -626,11 +632,12 @@
626632
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
627633
set_cc_for_build
628634
sed 's/^ //' << EOF > "$dummy.c"
629635
#include <sys/systemcfg.h>
630636
631
- main()
637
+ int
638
+ main ()
632639
{
633640
if (!__power_pc())
634641
exit(1);
635642
puts("powerpc-ibm-aix3.2.5");
636643
exit(0);
@@ -710,11 +717,12 @@
710717
711718
#define _HPUX_SOURCE
712719
#include <stdlib.h>
713720
#include <unistd.h>
714721
715
- int main ()
722
+ int
723
+ main ()
716724
{
717725
#if defined(_SC_KERNEL_BITS)
718726
long bits = sysconf(_SC_KERNEL_BITS);
719727
#endif
720728
long cpu = sysconf (_SC_CPU_VERSION);
@@ -902,11 +910,11 @@
902910
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
903911
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
904912
fi
905913
;;
906914
*:FreeBSD:*:*)
907
- UNAME_PROCESSOR=`/usr/bin/uname -p`
915
+ UNAME_PROCESSOR=`uname -p`
908916
case $UNAME_PROCESSOR in
909917
amd64)
910918
UNAME_PROCESSOR=x86_64 ;;
911919
i386)
912920
UNAME_PROCESSOR=i586 ;;
@@ -927,10 +935,13 @@
927935
GUESS=$UNAME_MACHINE-pc-msys
928936
;;
929937
i*:PW*:*)
930938
GUESS=$UNAME_MACHINE-pc-pw32
931939
;;
940
+ *:SerenityOS:*:*)
941
+ GUESS=$UNAME_MACHINE-pc-serenity
942
+ ;;
932943
*:Interix*:*)
933944
case $UNAME_MACHINE in
934945
x86)
935946
GUESS=i586-pc-interix$UNAME_RELEASE
936947
;;
@@ -961,15 +972,41 @@
961972
# other systems with GNU libc and userland
962973
GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
963974
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964975
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965976
;;
977
+ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
978
+ GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
979
+ ;;
980
+ *:[Mm]anagarm:*:*)
981
+ GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
982
+ ;;
966983
*:Minix:*:*)
967984
GUESS=$UNAME_MACHINE-unknown-minix
968985
;;
969986
aarch64:Linux:*:*)
970
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
987
+ set_cc_for_build
988
+ CPU=$UNAME_MACHINE
989
+ LIBCABI=$LIBC
990
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
991
+ ABI=64
992
+ sed 's/^ //' << EOF > "$dummy.c"
993
+ #ifdef __ARM_EABI__
994
+ #ifdef __ARM_PCS_VFP
995
+ ABI=eabihf
996
+ #else
997
+ ABI=eabi
998
+ #endif
999
+ #endif
1000
+EOF
1001
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1002
+ eval "$cc_set_abi"
1003
+ case $ABI in
1004
+ eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
1005
+ esac
1006
+ fi
1007
+ GUESS=$CPU-unknown-linux-$LIBCABI
9711008
;;
9721009
aarch64_be:Linux:*:*)
9731010
UNAME_MACHINE=aarch64_be
9741011
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
9751012
;;
@@ -1031,11 +1068,20 @@
10311068
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10321069
;;
10331070
k1om:Linux:*:*)
10341071
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10351072
;;
1036
- loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
1073
+ kvx:Linux:*:*)
1074
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1075
+ ;;
1076
+ kvx:cos:*:*)
1077
+ GUESS=$UNAME_MACHINE-unknown-cos
1078
+ ;;
1079
+ kvx:mbr:*:*)
1080
+ GUESS=$UNAME_MACHINE-unknown-mbr
1081
+ ;;
1082
+ loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10371083
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10381084
;;
10391085
m32r*:Linux:*:*)
10401086
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10411087
;;
@@ -1146,20 +1192,31 @@
11461192
vax:Linux:*:*)
11471193
GUESS=$UNAME_MACHINE-dec-linux-$LIBC
11481194
;;
11491195
x86_64:Linux:*:*)
11501196
set_cc_for_build
1197
+ CPU=$UNAME_MACHINE
11511198
LIBCABI=$LIBC
11521199
if test "$CC_FOR_BUILD" != no_compiler_found; then
1153
- if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1154
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1155
- grep IS_X32 >/dev/null
1156
- then
1157
- LIBCABI=${LIBC}x32
1158
- fi
1159
- fi
1160
- GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
1200
+ ABI=64
1201
+ sed 's/^ //' << EOF > "$dummy.c"
1202
+ #ifdef __i386__
1203
+ ABI=x86
1204
+ #else
1205
+ #ifdef __ILP32__
1206
+ ABI=x32
1207
+ #endif
1208
+ #endif
1209
+EOF
1210
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1211
+ eval "$cc_set_abi"
1212
+ case $ABI in
1213
+ x86) CPU=i686 ;;
1214
+ x32) LIBCABI=${LIBC}x32 ;;
1215
+ esac
1216
+ fi
1217
+ GUESS=$CPU-pc-linux-$LIBCABI
11611218
;;
11621219
xtensa*:Linux:*:*)
11631220
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11641221
;;
11651222
i*86:DYNIX/ptx:4*:*)
@@ -1175,11 +1232,11 @@
11751232
# I just have to hope. -- rms.
11761233
# Use sysv4.2uw... so that sysv4* matches it.
11771234
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11781235
;;
11791236
i*86:OS/2:*:*)
1180
- # If we were able to find `uname', then EMX Unix compatibility
1237
+ # If we were able to find 'uname', then EMX Unix compatibility
11811238
# is probably installed.
11821239
GUESS=$UNAME_MACHINE-pc-os2-emx
11831240
;;
11841241
i*86:XTS-300:*:STOP)
11851242
GUESS=$UNAME_MACHINE-unknown-stop
@@ -1316,11 +1373,11 @@
13161373
GUESS=$UNAME_MACHINE-sni-sysv4
13171374
else
13181375
GUESS=ns32k-sni-sysv
13191376
fi
13201377
;;
1321
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1378
+ PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
13221379
# says <[email protected]>
13231380
GUESS=i586-unisys-sysv4
13241381
;;
13251382
*:UNIX_System_V:4*:FTX*)
13261383
# From Gerald Hewes <[email protected]>.
@@ -1362,12 +1419,15 @@
13621419
GUESS=i586-pc-beos
13631420
;;
13641421
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
13651422
GUESS=i586-pc-haiku
13661423
;;
1367
- x86_64:Haiku:*:*)
1368
- GUESS=x86_64-unknown-haiku
1424
+ ppc:Haiku:*:*) # Haiku running on Apple PowerPC
1425
+ GUESS=powerpc-apple-haiku
1426
+ ;;
1427
+ *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
1428
+ GUESS=$UNAME_MACHINE-unknown-haiku
13691429
;;
13701430
SX-4:SUPER-UX:*:*)
13711431
GUESS=sx4-nec-superux$UNAME_RELEASE
13721432
;;
13731433
SX-5:SUPER-UX:*:*)
@@ -1520,10 +1580,13 @@
15201580
GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
15211581
;;
15221582
i*86:rdos:*:*)
15231583
GUESS=$UNAME_MACHINE-pc-rdos
15241584
;;
1585
+ i*86:Fiwix:*:*)
1586
+ GUESS=$UNAME_MACHINE-pc-fiwix
1587
+ ;;
15251588
*:AROS:*:*)
15261589
GUESS=$UNAME_MACHINE-unknown-aros
15271590
;;
15281591
x86_64:VMkernel:*:*)
15291592
GUESS=$UNAME_MACHINE-unknown-esx
@@ -1532,10 +1595,13 @@
15321595
GUESS=x86_64-unknown-onefs
15331596
;;
15341597
*:Unleashed:*:*)
15351598
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
15361599
;;
1600
+ *:Ironclad:*:*)
1601
+ GUESS=$UNAME_MACHINE-unknown-ironclad
1602
+ ;;
15371603
esac
15381604
15391605
# Do we have a guess based on uname results?
15401606
if test "x$GUESS" != x; then
15411607
echo "$GUESS"
@@ -1555,10 +1621,11 @@
15551621
#if defined(_SIZE_T_) || defined(SIGLOST)
15561622
#include <sys/utsname.h>
15571623
#endif
15581624
#endif
15591625
#endif
1626
+int
15601627
main ()
15611628
{
15621629
#if defined (sony)
15631630
#if defined (MIPSEB)
15641631
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
15651632
--- autosetup/autosetup-config.guess
+++ autosetup/autosetup-config.guess
@@ -1,16 +1,16 @@
1 #! /bin/sh
2 # Attempt to guess a canonical system name.
3 # Copyright 1992-2021 Free Software Foundation, Inc.
4
5 # shellcheck disable=SC2006,SC2268 # see below for rationale
6
7 timestamp='2021-06-03'
8
9 # This file is free software; you can redistribute it and/or modify it
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
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,11 +45,11 @@
45 me=`echo "$0" | sed -e 's,.*/,,'`
46
47 usage="\
48 Usage: $0 [OPTION]
49
50 Output the configuration name of the system \`$me' is run on.
51
52 Options:
53 -h, --help print this help, then exit
54 -t, --time-stamp print date of last modification, then exit
55 -v, --version print version number, then exit
@@ -58,17 +58,17 @@
58
59 version="\
60 GNU config.guess ($timestamp)
61
62 Originally written by Per Bothner.
63 Copyright 1992-2021 Free Software Foundation, Inc.
64
65 This is free software; see the source for copying conditions. There is NO
66 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
67
68 help="
69 Try \`$me --help' for more information."
70
71 # Parse command line
72 while test $# -gt 0 ; do
73 case $1 in
74 --time-stamp | --time* | -t )
@@ -100,12 +100,12 @@
100 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
101 # compiler to aid in system detection is discouraged as it requires
102 # temporary files to be created and, as you can see below, it is a
103 # headache to deal with in a portable fashion.
104
105 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
106 # use `HOST_CC' if defined, but it is deprecated.
107
108 # Portable tmp directory creation inspired by the Autoconf team.
109
110 tmp=
111 # shellcheck disable=SC2172
@@ -121,11 +121,11 @@
121 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123 dummy=$tmp/dummy
124 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125 ,,) echo "int x;" > "$dummy.c"
126 for driver in cc gcc c89 c99 ; do
127 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128 CC_FOR_BUILD=$driver
129 break
130 fi
131 done
@@ -153,22 +153,28 @@
153 Linux|GNU|GNU/*)
154 LIBC=unknown
155
156 set_cc_for_build
157 cat <<-EOF > "$dummy.c"
 
 
 
158 #include <features.h>
159 #if defined(__UCLIBC__)
160 LIBC=uclibc
161 #elif defined(__dietlibc__)
162 LIBC=dietlibc
163 #elif defined(__GLIBC__)
164 LIBC=gnu
 
 
165 #else
166 #include <stdarg.h>
167 /* First heuristic to detect musl libc. */
168 #ifdef __DEFINED_va_list
169 LIBC=musl
 
170 #endif
171 #endif
172 EOF
173 cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
174 eval "$cc_set_libc"
@@ -435,11 +441,11 @@
435 # If there is a compiler, see if it is configured for 64-bit objects.
436 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
437 # This test works for both compilers.
438 if test "$CC_FOR_BUILD" != no_compiler_found; then
439 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
440 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
441 grep IS_64BIT_ARCH >/dev/null
442 then
443 SUN_ARCH=x86_64
444 fi
445 fi
@@ -457,11 +463,11 @@
457 case `/usr/bin/arch -k` in
458 Series*|S4*)
459 UNAME_RELEASE=`uname -v`
460 ;;
461 esac
462 # Japanese Language versions have a version number like `4.1.3-JL'.
463 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
464 GUESS=sparc-sun-sunos$SUN_REL
465 ;;
466 sun3*:SunOS:*:*)
467 GUESS=m68k-sun-sunos$UNAME_RELEASE
@@ -626,11 +632,12 @@
626 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
627 set_cc_for_build
628 sed 's/^ //' << EOF > "$dummy.c"
629 #include <sys/systemcfg.h>
630
631 main()
 
632 {
633 if (!__power_pc())
634 exit(1);
635 puts("powerpc-ibm-aix3.2.5");
636 exit(0);
@@ -710,11 +717,12 @@
710
711 #define _HPUX_SOURCE
712 #include <stdlib.h>
713 #include <unistd.h>
714
715 int main ()
 
716 {
717 #if defined(_SC_KERNEL_BITS)
718 long bits = sysconf(_SC_KERNEL_BITS);
719 #endif
720 long cpu = sysconf (_SC_CPU_VERSION);
@@ -902,11 +910,11 @@
902 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
903 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
904 fi
905 ;;
906 *:FreeBSD:*:*)
907 UNAME_PROCESSOR=`/usr/bin/uname -p`
908 case $UNAME_PROCESSOR in
909 amd64)
910 UNAME_PROCESSOR=x86_64 ;;
911 i386)
912 UNAME_PROCESSOR=i586 ;;
@@ -927,10 +935,13 @@
927 GUESS=$UNAME_MACHINE-pc-msys
928 ;;
929 i*:PW*:*)
930 GUESS=$UNAME_MACHINE-pc-pw32
931 ;;
 
 
 
932 *:Interix*:*)
933 case $UNAME_MACHINE in
934 x86)
935 GUESS=i586-pc-interix$UNAME_RELEASE
936 ;;
@@ -961,15 +972,41 @@
961 # other systems with GNU libc and userland
962 GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
963 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
964 GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
965 ;;
 
 
 
 
 
 
966 *:Minix:*:*)
967 GUESS=$UNAME_MACHINE-unknown-minix
968 ;;
969 aarch64:Linux:*:*)
970 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
971 ;;
972 aarch64_be:Linux:*:*)
973 UNAME_MACHINE=aarch64_be
974 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
975 ;;
@@ -1031,11 +1068,20 @@
1031 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1032 ;;
1033 k1om:Linux:*:*)
1034 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1035 ;;
1036 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
 
 
 
 
 
 
 
 
 
1037 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1038 ;;
1039 m32r*:Linux:*:*)
1040 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1041 ;;
@@ -1146,20 +1192,31 @@
1146 vax:Linux:*:*)
1147 GUESS=$UNAME_MACHINE-dec-linux-$LIBC
1148 ;;
1149 x86_64:Linux:*:*)
1150 set_cc_for_build
 
1151 LIBCABI=$LIBC
1152 if test "$CC_FOR_BUILD" != no_compiler_found; then
1153 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
1154 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1155 grep IS_X32 >/dev/null
1156 then
1157 LIBCABI=${LIBC}x32
1158 fi
1159 fi
1160 GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
 
 
 
 
 
 
 
 
 
 
1161 ;;
1162 xtensa*:Linux:*:*)
1163 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1164 ;;
1165 i*86:DYNIX/ptx:4*:*)
@@ -1175,11 +1232,11 @@
1175 # I just have to hope. -- rms.
1176 # Use sysv4.2uw... so that sysv4* matches it.
1177 GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
1178 ;;
1179 i*86:OS/2:*:*)
1180 # If we were able to find `uname', then EMX Unix compatibility
1181 # is probably installed.
1182 GUESS=$UNAME_MACHINE-pc-os2-emx
1183 ;;
1184 i*86:XTS-300:*:STOP)
1185 GUESS=$UNAME_MACHINE-unknown-stop
@@ -1316,11 +1373,11 @@
1316 GUESS=$UNAME_MACHINE-sni-sysv4
1317 else
1318 GUESS=ns32k-sni-sysv
1319 fi
1320 ;;
1321 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1322 # says <[email protected]>
1323 GUESS=i586-unisys-sysv4
1324 ;;
1325 *:UNIX_System_V:4*:FTX*)
1326 # From Gerald Hewes <[email protected]>.
@@ -1362,12 +1419,15 @@
1362 GUESS=i586-pc-beos
1363 ;;
1364 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1365 GUESS=i586-pc-haiku
1366 ;;
1367 x86_64:Haiku:*:*)
1368 GUESS=x86_64-unknown-haiku
 
 
 
1369 ;;
1370 SX-4:SUPER-UX:*:*)
1371 GUESS=sx4-nec-superux$UNAME_RELEASE
1372 ;;
1373 SX-5:SUPER-UX:*:*)
@@ -1520,10 +1580,13 @@
1520 GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
1521 ;;
1522 i*86:rdos:*:*)
1523 GUESS=$UNAME_MACHINE-pc-rdos
1524 ;;
 
 
 
1525 *:AROS:*:*)
1526 GUESS=$UNAME_MACHINE-unknown-aros
1527 ;;
1528 x86_64:VMkernel:*:*)
1529 GUESS=$UNAME_MACHINE-unknown-esx
@@ -1532,10 +1595,13 @@
1532 GUESS=x86_64-unknown-onefs
1533 ;;
1534 *:Unleashed:*:*)
1535 GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
1536 ;;
 
 
 
1537 esac
1538
1539 # Do we have a guess based on uname results?
1540 if test "x$GUESS" != x; then
1541 echo "$GUESS"
@@ -1555,10 +1621,11 @@
1555 #if defined(_SIZE_T_) || defined(SIGLOST)
1556 #include <sys/utsname.h>
1557 #endif
1558 #endif
1559 #endif
 
1560 main ()
1561 {
1562 #if defined (sony)
1563 #if defined (MIPSEB)
1564 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1565
--- autosetup/autosetup-config.guess
+++ autosetup/autosetup-config.guess
@@ -1,16 +1,16 @@
1 #! /bin/sh
2 # Attempt to guess a canonical system name.
3 # Copyright 1992-2024 Free Software Foundation, Inc.
4
5 # shellcheck disable=SC2006,SC2268 # see below for rationale
6
7 timestamp='2024-07-27'
8
9 # This file is free software; you can redistribute it and/or modify it
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
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,11 +45,11 @@
45 me=`echo "$0" | sed -e 's,.*/,,'`
46
47 usage="\
48 Usage: $0 [OPTION]
49
50 Output the configuration name of the system '$me' is run on.
51
52 Options:
53 -h, --help print this help, then exit
54 -t, --time-stamp print date of last modification, then exit
55 -v, --version print version number, then exit
@@ -58,17 +58,17 @@
58
59 version="\
60 GNU config.guess ($timestamp)
61
62 Originally written by Per Bothner.
63 Copyright 1992-2024 Free Software Foundation, Inc.
64
65 This is free software; see the source for copying conditions. There is NO
66 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
67
68 help="
69 Try '$me --help' for more information."
70
71 # Parse command line
72 while test $# -gt 0 ; do
73 case $1 in
74 --time-stamp | --time* | -t )
@@ -100,12 +100,12 @@
100 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
101 # compiler to aid in system detection is discouraged as it requires
102 # temporary files to be created and, as you can see below, it is a
103 # headache to deal with in a portable fashion.
104
105 # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
106 # use 'HOST_CC' if defined, but it is deprecated.
107
108 # Portable tmp directory creation inspired by the Autoconf team.
109
110 tmp=
111 # shellcheck disable=SC2172
@@ -121,11 +121,11 @@
121 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
122 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
123 dummy=$tmp/dummy
124 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
125 ,,) echo "int x;" > "$dummy.c"
126 for driver in cc gcc c17 c99 c89 ; do
127 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
128 CC_FOR_BUILD=$driver
129 break
130 fi
131 done
@@ -153,22 +153,28 @@
153 Linux|GNU|GNU/*)
154 LIBC=unknown
155
156 set_cc_for_build
157 cat <<-EOF > "$dummy.c"
158 #if defined(__ANDROID__)
159 LIBC=android
160 #else
161 #include <features.h>
162 #if defined(__UCLIBC__)
163 LIBC=uclibc
164 #elif defined(__dietlibc__)
165 LIBC=dietlibc
166 #elif defined(__GLIBC__)
167 LIBC=gnu
168 #elif defined(__LLVM_LIBC__)
169 LIBC=llvm
170 #else
171 #include <stdarg.h>
172 /* First heuristic to detect musl libc. */
173 #ifdef __DEFINED_va_list
174 LIBC=musl
175 #endif
176 #endif
177 #endif
178 EOF
179 cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
180 eval "$cc_set_libc"
@@ -435,11 +441,11 @@
441 # If there is a compiler, see if it is configured for 64-bit objects.
442 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
443 # This test works for both compilers.
444 if test "$CC_FOR_BUILD" != no_compiler_found; then
445 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
446 (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
447 grep IS_64BIT_ARCH >/dev/null
448 then
449 SUN_ARCH=x86_64
450 fi
451 fi
@@ -457,11 +463,11 @@
463 case `/usr/bin/arch -k` in
464 Series*|S4*)
465 UNAME_RELEASE=`uname -v`
466 ;;
467 esac
468 # Japanese Language versions have a version number like '4.1.3-JL'.
469 SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
470 GUESS=sparc-sun-sunos$SUN_REL
471 ;;
472 sun3*:SunOS:*:*)
473 GUESS=m68k-sun-sunos$UNAME_RELEASE
@@ -626,11 +632,12 @@
632 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
633 set_cc_for_build
634 sed 's/^ //' << EOF > "$dummy.c"
635 #include <sys/systemcfg.h>
636
637 int
638 main ()
639 {
640 if (!__power_pc())
641 exit(1);
642 puts("powerpc-ibm-aix3.2.5");
643 exit(0);
@@ -710,11 +717,12 @@
717
718 #define _HPUX_SOURCE
719 #include <stdlib.h>
720 #include <unistd.h>
721
722 int
723 main ()
724 {
725 #if defined(_SC_KERNEL_BITS)
726 long bits = sysconf(_SC_KERNEL_BITS);
727 #endif
728 long cpu = sysconf (_SC_CPU_VERSION);
@@ -902,11 +910,11 @@
910 FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
911 GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
912 fi
913 ;;
914 *:FreeBSD:*:*)
915 UNAME_PROCESSOR=`uname -p`
916 case $UNAME_PROCESSOR in
917 amd64)
918 UNAME_PROCESSOR=x86_64 ;;
919 i386)
920 UNAME_PROCESSOR=i586 ;;
@@ -927,10 +935,13 @@
935 GUESS=$UNAME_MACHINE-pc-msys
936 ;;
937 i*:PW*:*)
938 GUESS=$UNAME_MACHINE-pc-pw32
939 ;;
940 *:SerenityOS:*:*)
941 GUESS=$UNAME_MACHINE-pc-serenity
942 ;;
943 *:Interix*:*)
944 case $UNAME_MACHINE in
945 x86)
946 GUESS=i586-pc-interix$UNAME_RELEASE
947 ;;
@@ -961,15 +972,41 @@
972 # other systems with GNU libc and userland
973 GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
974 GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
975 GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
976 ;;
977 x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
978 GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
979 ;;
980 *:[Mm]anagarm:*:*)
981 GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
982 ;;
983 *:Minix:*:*)
984 GUESS=$UNAME_MACHINE-unknown-minix
985 ;;
986 aarch64:Linux:*:*)
987 set_cc_for_build
988 CPU=$UNAME_MACHINE
989 LIBCABI=$LIBC
990 if test "$CC_FOR_BUILD" != no_compiler_found; then
991 ABI=64
992 sed 's/^ //' << EOF > "$dummy.c"
993 #ifdef __ARM_EABI__
994 #ifdef __ARM_PCS_VFP
995 ABI=eabihf
996 #else
997 ABI=eabi
998 #endif
999 #endif
1000 EOF
1001 cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1002 eval "$cc_set_abi"
1003 case $ABI in
1004 eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
1005 esac
1006 fi
1007 GUESS=$CPU-unknown-linux-$LIBCABI
1008 ;;
1009 aarch64_be:Linux:*:*)
1010 UNAME_MACHINE=aarch64_be
1011 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1012 ;;
@@ -1031,11 +1068,20 @@
1068 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1069 ;;
1070 k1om:Linux:*:*)
1071 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1072 ;;
1073 kvx:Linux:*:*)
1074 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1075 ;;
1076 kvx:cos:*:*)
1077 GUESS=$UNAME_MACHINE-unknown-cos
1078 ;;
1079 kvx:mbr:*:*)
1080 GUESS=$UNAME_MACHINE-unknown-mbr
1081 ;;
1082 loongarch32:Linux:*:* | loongarch64:Linux:*:*)
1083 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1084 ;;
1085 m32r*:Linux:*:*)
1086 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1087 ;;
@@ -1146,20 +1192,31 @@
1192 vax:Linux:*:*)
1193 GUESS=$UNAME_MACHINE-dec-linux-$LIBC
1194 ;;
1195 x86_64:Linux:*:*)
1196 set_cc_for_build
1197 CPU=$UNAME_MACHINE
1198 LIBCABI=$LIBC
1199 if test "$CC_FOR_BUILD" != no_compiler_found; then
1200 ABI=64
1201 sed 's/^ //' << EOF > "$dummy.c"
1202 #ifdef __i386__
1203 ABI=x86
1204 #else
1205 #ifdef __ILP32__
1206 ABI=x32
1207 #endif
1208 #endif
1209 EOF
1210 cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
1211 eval "$cc_set_abi"
1212 case $ABI in
1213 x86) CPU=i686 ;;
1214 x32) LIBCABI=${LIBC}x32 ;;
1215 esac
1216 fi
1217 GUESS=$CPU-pc-linux-$LIBCABI
1218 ;;
1219 xtensa*:Linux:*:*)
1220 GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
1221 ;;
1222 i*86:DYNIX/ptx:4*:*)
@@ -1175,11 +1232,11 @@
1232 # I just have to hope. -- rms.
1233 # Use sysv4.2uw... so that sysv4* matches it.
1234 GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
1235 ;;
1236 i*86:OS/2:*:*)
1237 # If we were able to find 'uname', then EMX Unix compatibility
1238 # is probably installed.
1239 GUESS=$UNAME_MACHINE-pc-os2-emx
1240 ;;
1241 i*86:XTS-300:*:STOP)
1242 GUESS=$UNAME_MACHINE-unknown-stop
@@ -1316,11 +1373,11 @@
1373 GUESS=$UNAME_MACHINE-sni-sysv4
1374 else
1375 GUESS=ns32k-sni-sysv
1376 fi
1377 ;;
1378 PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
1379 # says <[email protected]>
1380 GUESS=i586-unisys-sysv4
1381 ;;
1382 *:UNIX_System_V:4*:FTX*)
1383 # From Gerald Hewes <[email protected]>.
@@ -1362,12 +1419,15 @@
1419 GUESS=i586-pc-beos
1420 ;;
1421 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1422 GUESS=i586-pc-haiku
1423 ;;
1424 ppc:Haiku:*:*) # Haiku running on Apple PowerPC
1425 GUESS=powerpc-apple-haiku
1426 ;;
1427 *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
1428 GUESS=$UNAME_MACHINE-unknown-haiku
1429 ;;
1430 SX-4:SUPER-UX:*:*)
1431 GUESS=sx4-nec-superux$UNAME_RELEASE
1432 ;;
1433 SX-5:SUPER-UX:*:*)
@@ -1520,10 +1580,13 @@
1580 GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
1581 ;;
1582 i*86:rdos:*:*)
1583 GUESS=$UNAME_MACHINE-pc-rdos
1584 ;;
1585 i*86:Fiwix:*:*)
1586 GUESS=$UNAME_MACHINE-pc-fiwix
1587 ;;
1588 *:AROS:*:*)
1589 GUESS=$UNAME_MACHINE-unknown-aros
1590 ;;
1591 x86_64:VMkernel:*:*)
1592 GUESS=$UNAME_MACHINE-unknown-esx
@@ -1532,10 +1595,13 @@
1595 GUESS=x86_64-unknown-onefs
1596 ;;
1597 *:Unleashed:*:*)
1598 GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
1599 ;;
1600 *:Ironclad:*:*)
1601 GUESS=$UNAME_MACHINE-unknown-ironclad
1602 ;;
1603 esac
1604
1605 # Do we have a guess based on uname results?
1606 if test "x$GUESS" != x; then
1607 echo "$GUESS"
@@ -1555,10 +1621,11 @@
1621 #if defined(_SIZE_T_) || defined(SIGLOST)
1622 #include <sys/utsname.h>
1623 #endif
1624 #endif
1625 #endif
1626 int
1627 main ()
1628 {
1629 #if defined (sony)
1630 #if defined (MIPSEB)
1631 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1632
--- autosetup/autosetup-config.sub
+++ autosetup/autosetup-config.sub
@@ -1,16 +1,16 @@
11
#! /bin/sh
22
# Configuration validation subroutine script.
3
-# Copyright 1992-2021 Free Software Foundation, Inc.
3
+# Copyright 1992-2024 Free Software Foundation, Inc.
44
5
-# shellcheck disable=SC2006,SC2268 # see below for rationale
5
+# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
66
7
-timestamp='2021-07-03'
7
+timestamp='2024-05-27'
88
99
# This file is free software; you can redistribute it and/or modify it
1010
# 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
1212
# (at your option) any later version.
1313
#
1414
# This program is distributed in the hope that it will be useful, but
1515
# WITHOUT ANY WARRANTY; without even the implied warranty of
1616
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -74,17 +74,17 @@
7474
Report bugs and patches to <[email protected]>."
7575
7676
version="\
7777
GNU config.sub ($timestamp)
7878
79
-Copyright 1992-2021 Free Software Foundation, Inc.
79
+Copyright 1992-2024 Free Software Foundation, Inc.
8080
8181
This is free software; see the source for copying conditions. There is NO
8282
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8383
8484
help="
85
-Try \`$me --help' for more information."
85
+Try '$me --help' for more information."
8686
8787
# Parse command line
8888
while test $# -gt 0 ; do
8989
case $1 in
9090
--time-stamp | --time* | -t )
@@ -118,19 +118,20 @@
118118
*) echo "$me: too many arguments$help" >&2
119119
exit 1;;
120120
esac
121121
122122
# Split fields of configuration type
123
-# shellcheck disable=SC2162
123
+saved_IFS=$IFS
124124
IFS="-" read field1 field2 field3 field4 <<EOF
125125
$1
126126
EOF
127
+IFS=$saved_IFS
127128
128129
# Separate into logical components for further validation
129130
case $1 in
130131
*-*-*-*-*)
131
- echo Invalid configuration \`"$1"\': more than four components >&2
132
+ echo "Invalid configuration '$1': more than four components" >&2
132133
exit 1
133134
;;
134135
*-*-*-*)
135136
basic_machine=$field1-$field2
136137
basic_os=$field3-$field4
@@ -138,14 +139,25 @@
138139
*-*-*)
139140
# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
140141
# parts
141142
maybe_os=$field2-$field3
142143
case $maybe_os in
143
- nto-qnx* | linux-* | uclinux-uclibc* \
144
- | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
145
- | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
146
- | storm-chaos* | os2-emx* | rtmk-nova*)
144
+ cloudabi*-eabi* \
145
+ | kfreebsd*-gnu* \
146
+ | knetbsd*-gnu* \
147
+ | kopensolaris*-gnu* \
148
+ | linux-* \
149
+ | managarm-* \
150
+ | netbsd*-eabi* \
151
+ | netbsd*-gnu* \
152
+ | nto-qnx* \
153
+ | os2-emx* \
154
+ | rtmk-nova* \
155
+ | storm-chaos* \
156
+ | uclinux-gnu* \
157
+ | uclinux-uclibc* \
158
+ | windows-* )
147159
basic_machine=$field1
148160
basic_os=$maybe_os
149161
;;
150162
android-linux)
151163
basic_machine=$field1-unknown
@@ -156,37 +168,105 @@
156168
basic_os=$field3
157169
;;
158170
esac
159171
;;
160172
*-*)
161
- # A lone config we happen to match not fitting any pattern
162173
case $field1-$field2 in
174
+ # Shorthands that happen to contain a single dash
175
+ convex-c[12] | convex-c3[248])
176
+ basic_machine=$field2-convex
177
+ basic_os=
178
+ ;;
163179
decstation-3100)
164180
basic_machine=mips-dec
165181
basic_os=
166182
;;
167183
*-*)
168184
# Second component is usually, but not always the OS
169185
case $field2 in
170
- # Prevent following clause from handling this valid os
186
+ # Do not treat sunos as a manufacturer
171187
sun*os*)
172188
basic_machine=$field1
173189
basic_os=$field2
174190
;;
175191
# Manufacturers
176
- dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
177
- | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
178
- | unicom* | ibm* | next | hp | isi* | apollo | altos* \
179
- | convergent* | ncr* | news | 32* | 3600* | 3100* \
180
- | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
181
- | ultra | tti* | harris | dolphin | highlevel | gould \
182
- | cbm | ns | masscomp | apple | axis | knuth | cray \
183
- | microblaze* | sim | cisco \
184
- | oki | wec | wrs | winbond)
192
+ 3100* \
193
+ | 32* \
194
+ | 3300* \
195
+ | 3600* \
196
+ | 7300* \
197
+ | acorn \
198
+ | altos* \
199
+ | apollo \
200
+ | apple \
201
+ | atari \
202
+ | att* \
203
+ | axis \
204
+ | be \
205
+ | bull \
206
+ | cbm \
207
+ | ccur \
208
+ | cisco \
209
+ | commodore \
210
+ | convergent* \
211
+ | convex* \
212
+ | cray \
213
+ | crds \
214
+ | dec* \
215
+ | delta* \
216
+ | dg \
217
+ | digital \
218
+ | dolphin \
219
+ | encore* \
220
+ | gould \
221
+ | harris \
222
+ | highlevel \
223
+ | hitachi* \
224
+ | hp \
225
+ | ibm* \
226
+ | intergraph \
227
+ | isi* \
228
+ | knuth \
229
+ | masscomp \
230
+ | microblaze* \
231
+ | mips* \
232
+ | motorola* \
233
+ | ncr* \
234
+ | news \
235
+ | next \
236
+ | ns \
237
+ | oki \
238
+ | omron* \
239
+ | pc533* \
240
+ | rebel \
241
+ | rom68k \
242
+ | rombug \
243
+ | semi \
244
+ | sequent* \
245
+ | siemens \
246
+ | sgi* \
247
+ | siemens \
248
+ | sim \
249
+ | sni \
250
+ | sony* \
251
+ | stratus \
252
+ | sun \
253
+ | sun[234]* \
254
+ | tektronix \
255
+ | tti* \
256
+ | ultra \
257
+ | unicom* \
258
+ | wec \
259
+ | winbond \
260
+ | wrs)
185261
basic_machine=$field1-$field2
186262
basic_os=
187263
;;
264
+ zephyr*)
265
+ basic_machine=$field1-unknown
266
+ basic_os=$field2
267
+ ;;
188268
*)
189269
basic_machine=$field1
190270
basic_os=$field2
191271
;;
192272
esac
@@ -263,30 +343,10 @@
263343
;;
264344
cegcc)
265345
basic_machine=arm-unknown
266346
basic_os=cegcc
267347
;;
268
- convex-c1)
269
- basic_machine=c1-convex
270
- basic_os=bsd
271
- ;;
272
- convex-c2)
273
- basic_machine=c2-convex
274
- basic_os=bsd
275
- ;;
276
- convex-c32)
277
- basic_machine=c32-convex
278
- basic_os=bsd
279
- ;;
280
- convex-c34)
281
- basic_machine=c34-convex
282
- basic_os=bsd
283
- ;;
284
- convex-c38)
285
- basic_machine=c38-convex
286
- basic_os=bsd
287
- ;;
288348
cray)
289349
basic_machine=j90-cray
290350
basic_os=unicos
291351
;;
292352
crds | unos)
@@ -705,13 +765,21 @@
705765
decsystem20* | dec20*)
706766
cpu=pdp10
707767
vendor=dec
708768
basic_os=tops20
709769
;;
710
- delta | 3300 | motorola-3300 | motorola-delta \
711
- | 3300-motorola | delta-motorola)
770
+ delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300)
712771
cpu=m68k
713772
vendor=motorola
714773
;;
715
- dpx2*)
774
+ # This used to be dpx2*, but that gets the RS6000-based
775
+ # DPX/20 and the x86-based DPX/2-100 wrong. See
776
+ # https://oldskool.silicium.org/stations/bull_dpx20.htm
777
+ # https://www.feb-patrimoine.com/english/bull_dpx2.htm
778
+ # https://www.feb-patrimoine.com/english/unix_and_bull.htm
779
+ dpx2 | dpx2[23]00 | dpx2[23]xx)
716780
cpu=m68k
717781
vendor=bull
782
+ ;;
783
+ dpx2100 | dpx21xx)
784
+ cpu=i386
785
+ vendor=bull
@@ -718,6 +786,9 @@
718
- basic_os=sysv3
786
+ ;;
787
+ dpx20)
788
+ cpu=rs6000
789
+ vendor=bull
719790
;;
720791
encore | umax | mmax)
721792
cpu=ns32k
722793
vendor=encore
723794
;;
@@ -828,22 +899,10 @@
828899
basic_os=newsos
829900
;;
830901
next | m*-next)
831902
cpu=m68k
832903
vendor=next
833
- case $basic_os in
834
- openstep*)
835
- ;;
836
- nextstep*)
837
- ;;
838
- ns2*)
839
- basic_os=nextstep2
840
- ;;
841
- *)
842
- basic_os=nextstep3
843
- ;;
844
- esac
845904
;;
846905
np1)
847906
cpu=np1
848907
vendor=gould
849908
;;
@@ -928,16 +987,17 @@
928987
cpu=sparc
929988
vendor=`echo "$basic_machine" | sed 's/-.*//'`
930989
;;
931990
932991
*-*)
933
- # shellcheck disable=SC2162
992
+ saved_IFS=$IFS
934993
IFS="-" read cpu vendor <<EOF
935994
$basic_machine
936995
EOF
996
+ IFS=$saved_IFS
937997
;;
938
- # We use `pc' rather than `unknown'
998
+ # We use 'pc' rather than 'unknown'
939999
# because (1) that's what they normally are, and
9401000
# (2) the word "unknown" tends to confuse beginning users.
9411001
i*86 | x86_64)
9421002
cpu=$basic_machine
9431003
vendor=pc
@@ -961,19 +1021,23 @@
9611021
9621022
unset -v basic_machine
9631023
9641024
# Decode basic machines in the full and proper CPU-Company form.
9651025
case $cpu-$vendor in
966
- # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
967
- # some cases the only manufacturer, in others, it is the most popular.
1026
+ # Here we handle the default manufacturer of certain CPU types in canonical form.
1027
+ # It is in some cases the only manufacturer, in others, it is the most popular.
1028
+ c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown)
1029
+ vendor=convex
1030
+ basic_os=${basic_os:-bsd}
1031
+ ;;
9681032
craynv-unknown)
9691033
vendor=cray
9701034
basic_os=${basic_os:-unicosmp}
9711035
;;
9721036
c90-unknown | c90-cray)
9731037
vendor=cray
974
- basic_os=${Basic_os:-unicos}
1038
+ basic_os=${basic_os:-unicos}
9751039
;;
9761040
fx80-unknown)
9771041
vendor=alliant
9781042
;;
9791043
romp-unknown)
@@ -1010,23 +1074,46 @@
10101074
cpu=xps100
10111075
vendor=honeywell
10121076
;;
10131077
10141078
# Here we normalize CPU types with a missing or matching vendor
1015
- dpx20-unknown | dpx20-bull)
1016
- cpu=rs6000
1017
- vendor=bull
1079
+ armh-unknown | armh-alt)
1080
+ cpu=armv7l
1081
+ vendor=alt
1082
+ basic_os=${basic_os:-linux-gnueabihf}
1083
+ ;;
1084
+
1085
+ # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified
1086
+ m68k-isi)
1087
+ basic_os=${basic_os:-sysv}
1088
+ ;;
1089
+ m68k-sony)
1090
+ basic_os=${basic_os:-newsos}
1091
+ ;;
1092
+ m68k-tektronix)
1093
+ basic_os=${basic_os:-bsd}
1094
+ ;;
1095
+ m88k-harris)
1096
+ basic_os=${basic_os:-sysv3}
1097
+ ;;
1098
+ i386-bull | m68k-bull)
1099
+ basic_os=${basic_os:-sysv3}
1100
+ ;;
1101
+ rs6000-bull)
10181102
basic_os=${basic_os:-bosx}
10191103
;;
1104
+ mips-sni)
1105
+ basic_os=${basic_os:-sysv4}
1106
+ ;;
10201107
10211108
# Here we normalize CPU types irrespective of the vendor
10221109
amd64-*)
10231110
cpu=x86_64
10241111
;;
10251112
blackfin-*)
10261113
cpu=bfin
1027
- basic_os=linux
1114
+ basic_os=${basic_os:-linux}
10281115
;;
10291116
c54x-*)
10301117
cpu=tic54x
10311118
;;
10321119
c55x-*)
@@ -1045,37 +1132,34 @@
10451132
ms1-*)
10461133
cpu=mt
10471134
;;
10481135
m68knommu-*)
10491136
cpu=m68k
1050
- basic_os=linux
1137
+ basic_os=${basic_os:-linux}
10511138
;;
10521139
m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
10531140
cpu=s12z
10541141
;;
10551142
openrisc-*)
10561143
cpu=or32
10571144
;;
10581145
parisc-*)
10591146
cpu=hppa
1060
- basic_os=linux
1147
+ basic_os=${basic_os:-linux}
10611148
;;
10621149
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
10631150
cpu=i586
10641151
;;
1065
- pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1152
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
10661153
cpu=i686
10671154
;;
10681155
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
10691156
cpu=i686
10701157
;;
10711158
pentium4-*)
10721159
cpu=i786
10731160
;;
1074
- pc98-*)
1075
- cpu=i386
1076
- ;;
10771161
ppc-* | ppcbe-*)
10781162
cpu=powerpc
10791163
;;
10801164
ppcle-* | powerpclittle-*)
10811165
cpu=powerpcle
@@ -1105,17 +1189,14 @@
11051189
cpu=mipstx39
11061190
;;
11071191
tx39el-*)
11081192
cpu=mipstx39el
11091193
;;
1110
- x64-*)
1111
- cpu=x86_64
1112
- ;;
11131194
xscale-* | xscalee[bl]-*)
11141195
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
11151196
;;
1116
- arm64-*)
1197
+ arm64-* | aarch64le-*)
11171198
cpu=aarch64
11181199
;;
11191200
11201201
# Recognize the canonical CPU Types that limit and/or modify the
11211202
# company names they are paired with.
@@ -1163,118 +1244,235 @@
11631244
11641245
*)
11651246
# Recognize the canonical CPU types that are allowed with any
11661247
# company name.
11671248
case $cpu in
1168
- 1750a | 580 \
1249
+ 1750a \
1250
+ | 580 \
1251
+ | [cjt]90 \
11691252
| a29k \
1170
- | aarch64 | aarch64_be \
1253
+ | aarch64 \
1254
+ | aarch64_be \
1255
+ | aarch64c \
11711256
| abacus \
1172
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1173
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1174
- | alphapca5[67] | alpha64pca5[67] \
1257
+ | alpha \
1258
+ | alpha64 \
1259
+ | alpha64ev56 \
1260
+ | alpha64ev6[78] \
1261
+ | alpha64ev[4-8] \
1262
+ | alpha64pca5[67] \
1263
+ | alphaev56 \
1264
+ | alphaev6[78] \
1265
+ | alphaev[4-8] \
1266
+ | alphapca5[67] \
11751267
| am33_2.0 \
11761268
| amdgcn \
1177
- | arc | arceb | arc32 | arc64 \
1178
- | arm | arm[lb]e | arme[lb] | armv* \
1179
- | avr | avr32 \
1269
+ | arc \
1270
+ | arc32 \
1271
+ | arc64 \
1272
+ | arceb \
1273
+ | arm \
1274
+ | arm64e \
1275
+ | arm64ec \
1276
+ | arm[lb]e \
1277
+ | arme[lb] \
1278
+ | armv* \
11801279
| asmjs \
1280
+ | avr \
1281
+ | avr32 \
11811282
| ba \
1182
- | be32 | be64 \
1183
- | bfin | bpf | bs2000 \
1184
- | c[123]* | c30 | [cjt]90 | c4x \
1185
- | c8051 | clipper | craynv | csky | cydra \
1186
- | d10v | d30v | dlx | dsp16xx \
1187
- | e2k | elxsi | epiphany \
1188
- | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1189
- | h8300 | h8500 \
1190
- | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1283
+ | be32 \
1284
+ | be64 \
1285
+ | bfin \
1286
+ | bpf \
1287
+ | bs2000 \
1288
+ | c30 \
1289
+ | c4x \
1290
+ | c8051 \
1291
+ | c[123]* \
1292
+ | clipper \
1293
+ | craynv \
1294
+ | csky \
1295
+ | cydra \
1296
+ | d10v \
1297
+ | d30v \
1298
+ | dlx \
1299
+ | dsp16xx \
1300
+ | e2k \
1301
+ | elxsi \
1302
+ | epiphany \
1303
+ | f30[01] \
1304
+ | f700 \
1305
+ | fido \
1306
+ | fr30 \
1307
+ | frv \
1308
+ | ft32 \
1309
+ | fx80 \
1310
+ | h8300 \
1311
+ | h8500 \
11911312
| hexagon \
1192
- | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1193
- | ip2k | iq2000 \
1313
+ | hppa \
1314
+ | hppa1.[01] \
1315
+ | hppa2.0 \
1316
+ | hppa2.0[nw] \
1317
+ | hppa64 \
1318
+ | i*86 \
1319
+ | i370 \
1320
+ | i860 \
1321
+ | i960 \
1322
+ | ia16 \
1323
+ | ia64 \
1324
+ | ip2k \
1325
+ | iq2000 \
1326
+ | javascript \
11941327
| k1om \
1195
- | le32 | le64 \
1328
+ | kvx \
1329
+ | le32 \
1330
+ | le64 \
11961331
| lm32 \
1197
- | loongarch32 | loongarch64 | loongarchx32 \
1198
- | m32c | m32r | m32rle \
1199
- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1200
- | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1201
- | m88110 | m88k | maxq | mb | mcore | mep | metag \
1202
- | microblaze | microblazeel \
1203
- | mips | mipsbe | mipseb | mipsel | mipsle \
1204
- | mips16 \
1205
- | mips64 | mips64eb | mips64el \
1206
- | mips64octeon | mips64octeonel \
1207
- | mips64orion | mips64orionel \
1208
- | mips64r5900 | mips64r5900el \
1209
- | mips64vr | mips64vrel \
1210
- | mips64vr4100 | mips64vr4100el \
1211
- | mips64vr4300 | mips64vr4300el \
1212
- | mips64vr5000 | mips64vr5000el \
1213
- | mips64vr5900 | mips64vr5900el \
1214
- | mipsisa32 | mipsisa32el \
1215
- | mipsisa32r2 | mipsisa32r2el \
1216
- | mipsisa32r3 | mipsisa32r3el \
1217
- | mipsisa32r5 | mipsisa32r5el \
1218
- | mipsisa32r6 | mipsisa32r6el \
1219
- | mipsisa64 | mipsisa64el \
1220
- | mipsisa64r2 | mipsisa64r2el \
1221
- | mipsisa64r3 | mipsisa64r3el \
1222
- | mipsisa64r5 | mipsisa64r5el \
1223
- | mipsisa64r6 | mipsisa64r6el \
1224
- | mipsisa64sb1 | mipsisa64sb1el \
1225
- | mipsisa64sr71k | mipsisa64sr71kel \
1226
- | mipsr5900 | mipsr5900el \
1227
- | mipstx39 | mipstx39el \
1332
+ | loongarch32 \
1333
+ | loongarch64 \
1334
+ | m32c \
1335
+ | m32r \
1336
+ | m32rle \
1337
+ | m5200 \
1338
+ | m68000 \
1339
+ | m680[012346]0 \
1340
+ | m6811 \
1341
+ | m6812 \
1342
+ | m68360 \
1343
+ | m683?2 \
1344
+ | m68hc11 \
1345
+ | m68hc12 \
1346
+ | m68hcs12x \
1347
+ | m68k \
1348
+ | m88110 \
1349
+ | m88k \
1350
+ | maxq \
1351
+ | mb \
1352
+ | mcore \
1353
+ | mep \
1354
+ | metag \
1355
+ | microblaze \
1356
+ | microblazeel \
1357
+ | mips* \
12281358
| mmix \
1229
- | mn10200 | mn10300 \
1359
+ | mn10200 \
1360
+ | mn10300 \
12301361
| moxie \
1231
- | mt \
12321362
| msp430 \
1233
- | nds32 | nds32le | nds32be \
1363
+ | mt \
1364
+ | nanomips* \
1365
+ | nds32 \
1366
+ | nds32be \
1367
+ | nds32le \
12341368
| nfp \
1235
- | nios | nios2 | nios2eb | nios2el \
1236
- | none | np1 | ns16k | ns32k | nvptx \
1369
+ | nios \
1370
+ | nios2 \
1371
+ | nios2eb \
1372
+ | nios2el \
1373
+ | none \
1374
+ | np1 \
1375
+ | ns16k \
1376
+ | ns32k \
1377
+ | nvptx \
12371378
| open8 \
12381379
| or1k* \
12391380
| or32 \
12401381
| orion \
1382
+ | pdp10 \
1383
+ | pdp11 \
12411384
| picochip \
1242
- | pdp10 | pdp11 | pj | pjl | pn | power \
1243
- | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1385
+ | pj \
1386
+ | pjl \
1387
+ | pn \
1388
+ | power \
1389
+ | powerpc \
1390
+ | powerpc64 \
1391
+ | powerpc64le \
1392
+ | powerpcle \
1393
+ | powerpcspe \
12441394
| pru \
12451395
| pyramid \
1246
- | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
1247
- | rl78 | romp | rs6000 | rx \
1248
- | s390 | s390x \
1396
+ | riscv \
1397
+ | riscv32 \
1398
+ | riscv32be \
1399
+ | riscv64 \
1400
+ | riscv64be \
1401
+ | rl78 \
1402
+ | romp \
1403
+ | rs6000 \
1404
+ | rx \
1405
+ | s390 \
1406
+ | s390x \
12491407
| score \
1250
- | sh | shl \
1251
- | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1252
- | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1253
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1408
+ | sh \
1409
+ | sh64 \
1410
+ | sh64le \
1411
+ | sh[12345][lb]e \
1412
+ | sh[1234] \
1413
+ | sh[1234]e[lb] \
1414
+ | sh[23]e \
1415
+ | sh[23]ele \
1416
+ | sh[24]a \
1417
+ | sh[24]ae[lb] \
1418
+ | sh[lb]e \
1419
+ | she[lb] \
1420
+ | shl \
1421
+ | sparc \
1422
+ | sparc64 \
1423
+ | sparc64b \
1424
+ | sparc64v \
1425
+ | sparc86x \
1426
+ | sparclet \
12541427
| sparclite \
1255
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1428
+ | sparcv8 \
1429
+ | sparcv9 \
1430
+ | sparcv9b \
1431
+ | sparcv9v \
12561432
| spu \
1433
+ | sv1 \
1434
+ | sx* \
12571435
| tahoe \
12581436
| thumbv7* \
1259
- | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1437
+ | tic30 \
1438
+ | tic4x \
1439
+ | tic54x \
1440
+ | tic55x \
1441
+ | tic6x \
1442
+ | tic80 \
12601443
| tron \
12611444
| ubicom32 \
1262
- | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1445
+ | v70 \
1446
+ | v810 \
1447
+ | v850 \
1448
+ | v850e \
1449
+ | v850e1 \
1450
+ | v850e2 \
1451
+ | v850e2v3 \
1452
+ | v850es \
12631453
| vax \
1454
+ | vc4 \
12641455
| visium \
12651456
| w65 \
1266
- | wasm32 | wasm64 \
1457
+ | wasm32 \
1458
+ | wasm64 \
12671459
| we32k \
1268
- | x86 | x86_64 | xc16x | xgate | xps100 \
1269
- | xstormy16 | xtensa* \
1460
+ | x86 \
1461
+ | x86_64 \
1462
+ | xc16x \
1463
+ | xgate \
1464
+ | xps100 \
1465
+ | xstormy16 \
1466
+ | xtensa* \
12701467
| ymp \
1271
- | z8k | z80)
1468
+ | z80 \
1469
+ | z8k)
12721470
;;
12731471
12741472
*)
1275
- echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1473
+ echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
12761474
exit 1
12771475
;;
12781476
esac
12791477
;;
12801478
esac
@@ -1291,15 +1489,16 @@
12911489
;;
12921490
esac
12931491
12941492
# Decode manufacturer-specific aliases for certain operating systems.
12951493
1296
-if test x$basic_os != x
1494
+if test x"$basic_os" != x
12971495
then
12981496
1299
-# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1497
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
13001498
# set os.
1499
+obj=
13011500
case $basic_os in
13021501
gnu/linux*)
13031502
kernel=linux
13041503
os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
13051504
;;
@@ -1310,14 +1509,15 @@
13101509
nto-qnx*)
13111510
kernel=nto
13121511
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
13131512
;;
13141513
*-*)
1315
- # shellcheck disable=SC2162
1514
+ saved_IFS=$IFS
13161515
IFS="-" read kernel os <<EOF
13171516
$basic_os
13181517
EOF
1518
+ IFS=$saved_IFS
13191519
;;
13201520
# Default OS when just kernel was specified
13211521
nto*)
13221522
kernel=nto
13231523
os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
@@ -1324,10 +1524,14 @@
13241524
;;
13251525
linux*)
13261526
kernel=linux
13271527
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
13281528
;;
1529
+ managarm*)
1530
+ kernel=managarm
1531
+ os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1532
+ ;;
13291533
*)
13301534
kernel=
13311535
os=$basic_os
13321536
;;
13331537
esac
@@ -1350,10 +1554,27 @@
13501554
solaris)
13511555
os=solaris2
13521556
;;
13531557
unixware*)
13541558
os=sysv4.2uw
1559
+ ;;
1560
+ # The marketing names for NeXT's operating systems were
1561
+ # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is
1562
+ # mapped to 'openstep3', but 'openstep1' and 'openstep2' are
1563
+ # mapped to 'nextstep' and 'nextstep2', consistent with the
1564
+ # treatment of SunOS/Solaris.
1565
+ ns | ns1 | nextstep | nextstep1 | openstep1)
1566
+ os=nextstep
1567
+ ;;
1568
+ ns2 | nextstep2 | openstep2)
1569
+ os=nextstep2
1570
+ ;;
1571
+ ns3 | nextstep3 | openstep | openstep3)
1572
+ os=openstep3
1573
+ ;;
1574
+ ns4 | nextstep4 | openstep4)
1575
+ os=openstep4
13551576
;;
13561577
# es1800 is here to avoid being matched by es* (a different OS)
13571578
es1800*)
13581579
os=ose
13591580
;;
@@ -1421,10 +1642,11 @@
14211642
wince*)
14221643
os=wince
14231644
;;
14241645
utek*)
14251646
os=bsd
1647
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
14261648
;;
14271649
dynix*)
14281650
os=bsd
14291651
;;
14301652
acis*)
@@ -1437,25 +1659,29 @@
14371659
os=syllable
14381660
;;
14391661
386bsd)
14401662
os=bsd
14411663
;;
1442
- ctix* | uts*)
1664
+ ctix*)
1665
+ os=sysv
1666
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
1667
+ ;;
1668
+ uts*)
14431669
os=sysv
14441670
;;
14451671
nova*)
1446
- os=rtmk-nova
1447
- ;;
1448
- ns2)
1449
- os=nextstep2
1672
+ kernel=rtmk
1673
+ os=nova
14501674
;;
14511675
# Preserve the version number of sinix5.
14521676
sinix5.*)
14531677
os=`echo "$os" | sed -e 's|sinix|sysv|'`
1678
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
14541679
;;
14551680
sinix*)
14561681
os=sysv4
1682
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
14571683
;;
14581684
tpf*)
14591685
os=tpf
14601686
;;
14611687
triton*)
@@ -1489,13 +1715,19 @@
14891715
case $cpu in
14901716
arm*)
14911717
os=eabi
14921718
;;
14931719
*)
1494
- os=elf
1720
+ os=
1721
+ obj=elf
14951722
;;
14961723
esac
1724
+ ;;
1725
+ aout* | coff* | elf* | pe*)
1726
+ # These are machine code file formats, not OSes
1727
+ obj=$os
1728
+ os=
14971729
;;
14981730
*)
14991731
# No normalization, but not necessarily accepted, that comes below.
15001732
;;
15011733
esac
@@ -1511,47 +1743,57 @@
15111743
# that MANUFACTURER isn't an operating system. Otherwise, code above
15121744
# will signal an error saying that MANUFACTURER isn't an operating
15131745
# system, and we'll never get to this point.
15141746
15151747
kernel=
1748
+obj=
15161749
case $cpu-$vendor in
15171750
score-*)
1518
- os=elf
1751
+ os=
1752
+ obj=elf
15191753
;;
15201754
spu-*)
1521
- os=elf
1755
+ os=
1756
+ obj=elf
15221757
;;
15231758
*-acorn)
15241759
os=riscix1.2
15251760
;;
15261761
arm*-rebel)
15271762
kernel=linux
15281763
os=gnu
15291764
;;
15301765
arm*-semi)
1531
- os=aout
1766
+ os=
1767
+ obj=aout
15321768
;;
15331769
c4x-* | tic4x-*)
1534
- os=coff
1770
+ os=
1771
+ obj=coff
15351772
;;
15361773
c8051-*)
1537
- os=elf
1774
+ os=
1775
+ obj=elf
15381776
;;
15391777
clipper-intergraph)
15401778
os=clix
15411779
;;
15421780
hexagon-*)
1543
- os=elf
1781
+ os=
1782
+ obj=elf
15441783
;;
15451784
tic54x-*)
1546
- os=coff
1785
+ os=
1786
+ obj=coff
15471787
;;
15481788
tic55x-*)
1549
- os=coff
1789
+ os=
1790
+ obj=coff
15501791
;;
15511792
tic6x-*)
1552
- os=coff
1793
+ os=
1794
+ obj=coff
15531795
;;
15541796
# This must come before the *-dec entry.
15551797
pdp10-*)
15561798
os=tops20
15571799
;;
@@ -1569,32 +1811,47 @@
15691811
;;
15701812
m68000-sun)
15711813
os=sunos3
15721814
;;
15731815
m68*-cisco)
1574
- os=aout
1816
+ os=
1817
+ obj=aout
15751818
;;
15761819
mep-*)
1577
- os=elf
1820
+ os=
1821
+ obj=elf
1822
+ ;;
1823
+ # The -sgi and -siemens entries must be before the mips- entry
1824
+ # or we get the wrong os.
1825
+ *-sgi)
1826
+ os=irix
1827
+ ;;
1828
+ *-siemens)
1829
+ os=sysv4
15781830
;;
15791831
mips*-cisco)
1580
- os=elf
1832
+ os=
1833
+ obj=elf
15811834
;;
1582
- mips*-*)
1583
- os=elf
1835
+ mips*-*|nanomips*-*)
1836
+ os=
1837
+ obj=elf
15841838
;;
15851839
or32-*)
1586
- os=coff
1840
+ os=
1841
+ obj=coff
15871842
;;
1588
- *-tti) # must be before sparc entry or we get the wrong os.
1843
+ # This must be before the sparc-* entry or we get the wrong os.
1844
+ *-tti)
15891845
os=sysv3
15901846
;;
15911847
sparc-* | *-sun)
15921848
os=sunos4.1.1
15931849
;;
15941850
pru-*)
1595
- os=elf
1851
+ os=
1852
+ obj=elf
15961853
;;
15971854
*-be)
15981855
os=beos
15991856
;;
16001857
*-ibm)
@@ -1614,11 +1871,11 @@
16141871
;;
16151872
*-hp)
16161873
os=hpux
16171874
;;
16181875
*-hitachi)
1619
- os=hiux
1876
+ os=hiuxwe2
16201877
;;
16211878
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
16221879
os=sysv
16231880
;;
16241881
*-cbm)
@@ -1658,27 +1915,23 @@
16581915
os=bsd
16591916
;;
16601917
*-encore)
16611918
os=bsd
16621919
;;
1663
- *-sgi)
1664
- os=irix
1665
- ;;
1666
- *-siemens)
1667
- os=sysv4
1668
- ;;
16691920
*-masscomp)
16701921
os=rtu
16711922
;;
16721923
f30[01]-fujitsu | f700-fujitsu)
16731924
os=uxpv
16741925
;;
16751926
*-rom68k)
1676
- os=coff
1927
+ os=
1928
+ obj=coff
16771929
;;
16781930
*-*bug)
1679
- os=coff
1931
+ os=
1932
+ obj=coff
16801933
;;
16811934
*-apple)
16821935
os=macos
16831936
;;
16841937
*-atari*)
@@ -1692,96 +1945,324 @@
16921945
;;
16931946
esac
16941947
16951948
fi
16961949
1697
-# Now, validate our (potentially fixed-up) OS.
1950
+# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
1951
+
16981952
case $os in
16991953
# Sometimes we do "kernel-libc", so those need to count as OSes.
1700
- musl* | newlib* | uclibc*)
1954
+ llvm* | musl* | newlib* | relibc* | uclibc*)
17011955
;;
17021956
# Likewise for "kernel-abi"
17031957
eabi* | gnueabi*)
17041958
;;
17051959
# VxWorks passes extra cpu info in the 4th filed.
17061960
simlinux | simwindows | spe)
1961
+ ;;
1962
+ # See `case $cpu-$os` validation below
1963
+ ghcjs)
17071964
;;
17081965
# Now accept the basic system types.
1709
- # The portable systems comes first.
17101966
# Each alternative MUST end in a * to match a version number.
1711
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1712
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1713
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1714
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1715
- | hiux* | abug | nacl* | netware* | windows* \
1716
- | os9* | macos* | osx* | ios* \
1717
- | mpw* | magic* | mmixware* | mon960* | lnews* \
1718
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1719
- | aos* | aros* | cloudabi* | sortix* | twizzler* \
1720
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1721
- | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1722
- | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1723
- | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
1724
- | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1725
- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1726
- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1727
- | udi* | lites* | ieee* | go32* | aux* | hcos* \
1728
- | chorusrdb* | cegcc* | glidix* | serenity* \
1729
- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1730
- | midipix* | mingw32* | mingw64* | mint* \
1731
- | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1732
- | interix* | uwin* | mks* | rhapsody* | darwin* \
1733
- | openstep* | oskit* | conix* | pw32* | nonstopux* \
1734
- | storm-chaos* | tops10* | tenex* | tops20* | its* \
1735
- | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1736
- | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1737
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1738
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1739
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1740
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1741
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
1967
+ abug \
1968
+ | aix* \
1969
+ | amdhsa* \
1970
+ | amigados* \
1971
+ | amigaos* \
1972
+ | android* \
1973
+ | aof* \
1974
+ | aos* \
1975
+ | aros* \
1976
+ | atheos* \
1977
+ | auroraux* \
1978
+ | aux* \
1979
+ | beos* \
1980
+ | bitrig* \
1981
+ | bme* \
1982
+ | bosx* \
1983
+ | bsd* \
1984
+ | cegcc* \
1985
+ | chorusos* \
1986
+ | chorusrdb* \
1987
+ | clix* \
1988
+ | cloudabi* \
1989
+ | cnk* \
1990
+ | conix* \
1991
+ | cos* \
1992
+ | cxux* \
1993
+ | cygwin* \
1994
+ | darwin* \
1995
+ | dgux* \
1996
+ | dicos* \
1997
+ | dnix* \
1998
+ | domain* \
1999
+ | dragonfly* \
2000
+ | drops* \
2001
+ | ebmon* \
2002
+ | ecoff* \
2003
+ | ekkobsd* \
2004
+ | emscripten* \
2005
+ | emx* \
2006
+ | es* \
2007
+ | fiwix* \
2008
+ | freebsd* \
2009
+ | fuchsia* \
2010
+ | genix* \
2011
+ | genode* \
2012
+ | glidix* \
2013
+ | gnu* \
2014
+ | go32* \
2015
+ | haiku* \
2016
+ | hcos* \
2017
+ | hiux* \
2018
+ | hms* \
2019
+ | hpux* \
2020
+ | ieee* \
2021
+ | interix* \
2022
+ | ios* \
2023
+ | iris* \
2024
+ | irix* \
2025
+ | ironclad* \
2026
+ | isc* \
2027
+ | its* \
2028
+ | l4re* \
2029
+ | libertybsd* \
2030
+ | lites* \
2031
+ | lnews* \
2032
+ | luna* \
2033
+ | lynxos* \
2034
+ | mach* \
2035
+ | macos* \
2036
+ | magic* \
2037
+ | mbr* \
2038
+ | midipix* \
2039
+ | midnightbsd* \
2040
+ | mingw32* \
2041
+ | mingw64* \
2042
+ | minix* \
2043
+ | mint* \
2044
+ | mirbsd* \
2045
+ | mks* \
2046
+ | mlibc* \
2047
+ | mmixware* \
2048
+ | mon960* \
2049
+ | morphos* \
2050
+ | moss* \
2051
+ | moxiebox* \
2052
+ | mpeix* \
2053
+ | mpw* \
2054
+ | msdos* \
2055
+ | msys* \
2056
+ | mvs* \
2057
+ | nacl* \
2058
+ | netbsd* \
2059
+ | netware* \
2060
+ | newsos* \
2061
+ | nextstep* \
2062
+ | nindy* \
2063
+ | nonstopux* \
2064
+ | nova* \
2065
+ | nsk* \
2066
+ | nucleus* \
2067
+ | nx6 \
2068
+ | nx7 \
2069
+ | oabi* \
2070
+ | ohos* \
2071
+ | onefs* \
2072
+ | openbsd* \
2073
+ | openedition* \
2074
+ | openstep* \
2075
+ | os108* \
2076
+ | os2* \
2077
+ | os400* \
2078
+ | os68k* \
2079
+ | os9* \
2080
+ | ose* \
2081
+ | osf* \
2082
+ | oskit* \
2083
+ | osx* \
2084
+ | palmos* \
2085
+ | phoenix* \
2086
+ | plan9* \
2087
+ | powermax* \
2088
+ | powerunix* \
2089
+ | proelf* \
2090
+ | psos* \
2091
+ | psp* \
2092
+ | ptx* \
2093
+ | pw32* \
2094
+ | qnx* \
2095
+ | rdos* \
2096
+ | redox* \
2097
+ | rhapsody* \
2098
+ | riscix* \
2099
+ | riscos* \
2100
+ | rtems* \
2101
+ | rtmk* \
2102
+ | rtu* \
2103
+ | scout* \
2104
+ | secbsd* \
2105
+ | sei* \
2106
+ | serenity* \
2107
+ | sim* \
2108
+ | skyos* \
2109
+ | solaris* \
2110
+ | solidbsd* \
2111
+ | sortix* \
2112
+ | storm-chaos* \
2113
+ | sunos \
2114
+ | sunos[34]* \
2115
+ | superux* \
2116
+ | syllable* \
2117
+ | sym* \
2118
+ | sysv* \
2119
+ | tenex* \
2120
+ | tirtos* \
2121
+ | toppers* \
2122
+ | tops10* \
2123
+ | tops20* \
2124
+ | tpf* \
2125
+ | tvos* \
2126
+ | twizzler* \
2127
+ | uclinux* \
2128
+ | udi* \
2129
+ | udk* \
2130
+ | ultrix* \
2131
+ | unicos* \
2132
+ | uniplus* \
2133
+ | unleashed* \
2134
+ | unos* \
2135
+ | uwin* \
2136
+ | uxpv* \
2137
+ | v88r* \
2138
+ |*vms* \
2139
+ | vos* \
2140
+ | vsta* \
2141
+ | vxsim* \
2142
+ | vxworks* \
2143
+ | wasi* \
2144
+ | watchos* \
2145
+ | wince* \
2146
+ | windiss* \
2147
+ | windows* \
2148
+ | winnt* \
2149
+ | xenix* \
2150
+ | xray* \
2151
+ | zephyr* \
2152
+ | zvmoe* )
17422153
;;
17432154
# This one is extra strict with allowed versions
17442155
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
17452156
# Don't forget version if it is 3.2v4 or newer.
17462157
;;
2158
+ # This refers to builds using the UEFI calling convention
2159
+ # (which depends on the architecture) and PE file format.
2160
+ # Note that this is both a different calling convention and
2161
+ # different file format than that of GNU-EFI
2162
+ # (x86_64-w64-mingw32).
2163
+ uefi)
2164
+ ;;
17472165
none)
17482166
;;
2167
+ kernel* | msvc* )
2168
+ # Restricted further below
2169
+ ;;
2170
+ '')
2171
+ if test x"$obj" = x
2172
+ then
2173
+ echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
2174
+ fi
2175
+ ;;
2176
+ *)
2177
+ echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
2178
+ exit 1
2179
+ ;;
2180
+esac
2181
+
2182
+case $obj in
2183
+ aout* | coff* | elf* | pe*)
2184
+ ;;
2185
+ '')
2186
+ # empty is fine
2187
+ ;;
17492188
*)
1750
- echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
2189
+ echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
2190
+ exit 1
2191
+ ;;
2192
+esac
2193
+
2194
+# Here we handle the constraint that a (synthetic) cpu and os are
2195
+# valid only in combination with each other and nowhere else.
2196
+case $cpu-$os in
2197
+ # The "javascript-unknown-ghcjs" triple is used by GHC; we
2198
+ # accept it here in order to tolerate that, but reject any
2199
+ # variations.
2200
+ javascript-ghcjs)
2201
+ ;;
2202
+ javascript-* | *-ghcjs)
2203
+ echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
17512204
exit 1
17522205
;;
17532206
esac
17542207
17552208
# As a final step for OS-related things, validate the OS-kernel combination
17562209
# (given a valid OS), if there is a kernel.
1757
-case $kernel-$os in
1758
- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
2210
+case $kernel-$os-$obj in
2211
+ linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
2212
+ | linux-mlibc*- | linux-musl*- | linux-newlib*- \
2213
+ | linux-relibc*- | linux-uclibc*- | linux-ohos*- )
2214
+ ;;
2215
+ uclinux-uclibc*- | uclinux-gnu*- )
2216
+ ;;
2217
+ managarm-mlibc*- | managarm-kernel*- )
17592218
;;
1760
- uclinux-uclibc* )
2219
+ windows*-msvc*-)
17612220
;;
1762
- -dietlibc* | -newlib* | -musl* | -uclibc* )
2221
+ -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
2222
+ | -uclibc*- )
17632223
# These are just libc implementations, not actual OSes, and thus
17642224
# require a kernel.
1765
- echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
2225
+ echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
2226
+ exit 1
2227
+ ;;
2228
+ -kernel*- )
2229
+ echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
2230
+ exit 1
2231
+ ;;
2232
+ *-kernel*- )
2233
+ echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
2234
+ exit 1
2235
+ ;;
2236
+ *-msvc*- )
2237
+ echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
17662238
exit 1
17672239
;;
1768
- kfreebsd*-gnu* | kopensolaris*-gnu*)
1769
- ;;
1770
- vxworks-simlinux | vxworks-simwindows | vxworks-spe)
1771
- ;;
1772
- nto-qnx*)
1773
- ;;
1774
- os2-emx)
1775
- ;;
1776
- *-eabi* | *-gnueabi*)
1777
- ;;
1778
- -*)
2240
+ kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-)
2241
+ ;;
2242
+ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
2243
+ ;;
2244
+ nto-qnx*-)
2245
+ ;;
2246
+ os2-emx-)
2247
+ ;;
2248
+ rtmk-nova-)
2249
+ ;;
2250
+ *-eabi*- | *-gnueabi*-)
2251
+ ;;
2252
+ none--*)
2253
+ # None (no kernel, i.e. freestanding / bare metal),
2254
+ # can be paired with an machine code file format
2255
+ ;;
2256
+ -*-)
17792257
# Blank kernel with real OS is always fine.
17802258
;;
1781
- *-*)
1782
- echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
2259
+ --*)
2260
+ # Blank kernel and OS with real machine code file format is always fine.
2261
+ ;;
2262
+ *-*-*)
2263
+ echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
17832264
exit 1
17842265
;;
17852266
esac
17862267
17872268
# Here we handle the case where we know the os, and the CPU type, but not the
@@ -1790,11 +2271,11 @@
17902271
unknown)
17912272
case $cpu-$os in
17922273
*-riscix*)
17932274
vendor=acorn
17942275
;;
1795
- *-sunos*)
2276
+ *-sunos* | *-solaris*)
17962277
vendor=sun
17972278
;;
17982279
*-cnk* | *-aix*)
17992280
vendor=ibm
18002281
;;
@@ -1860,14 +2341,14 @@
18602341
;;
18612342
esac
18622343
;;
18632344
esac
18642345
1865
-echo "$cpu-$vendor-${kernel:+$kernel-}$os"
2346
+echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
18662347
exit
18672348
18682349
# Local variables:
18692350
# eval: (add-hook 'before-save-hook 'time-stamp)
18702351
# time-stamp-start: "timestamp='"
18712352
# time-stamp-format: "%:y-%02m-%02d"
18722353
# time-stamp-end: "'"
18732354
# End:
18742355
--- autosetup/autosetup-config.sub
+++ autosetup/autosetup-config.sub
@@ -1,16 +1,16 @@
1 #! /bin/sh
2 # Configuration validation subroutine script.
3 # Copyright 1992-2021 Free Software Foundation, Inc.
4
5 # shellcheck disable=SC2006,SC2268 # see below for rationale
6
7 timestamp='2021-07-03'
8
9 # This file is free software; you can redistribute it and/or modify it
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
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -74,17 +74,17 @@
74 Report bugs and patches to <[email protected]>."
75
76 version="\
77 GNU config.sub ($timestamp)
78
79 Copyright 1992-2021 Free Software Foundation, Inc.
80
81 This is free software; see the source for copying conditions. There is NO
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83
84 help="
85 Try \`$me --help' for more information."
86
87 # Parse command line
88 while test $# -gt 0 ; do
89 case $1 in
90 --time-stamp | --time* | -t )
@@ -118,19 +118,20 @@
118 *) echo "$me: too many arguments$help" >&2
119 exit 1;;
120 esac
121
122 # Split fields of configuration type
123 # shellcheck disable=SC2162
124 IFS="-" read field1 field2 field3 field4 <<EOF
125 $1
126 EOF
 
127
128 # Separate into logical components for further validation
129 case $1 in
130 *-*-*-*-*)
131 echo Invalid configuration \`"$1"\': more than four components >&2
132 exit 1
133 ;;
134 *-*-*-*)
135 basic_machine=$field1-$field2
136 basic_os=$field3-$field4
@@ -138,14 +139,25 @@
138 *-*-*)
139 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
140 # parts
141 maybe_os=$field2-$field3
142 case $maybe_os in
143 nto-qnx* | linux-* | uclinux-uclibc* \
144 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
145 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
146 | storm-chaos* | os2-emx* | rtmk-nova*)
 
 
 
 
 
 
 
 
 
 
 
147 basic_machine=$field1
148 basic_os=$maybe_os
149 ;;
150 android-linux)
151 basic_machine=$field1-unknown
@@ -156,37 +168,105 @@
156 basic_os=$field3
157 ;;
158 esac
159 ;;
160 *-*)
161 # A lone config we happen to match not fitting any pattern
162 case $field1-$field2 in
 
 
 
 
 
163 decstation-3100)
164 basic_machine=mips-dec
165 basic_os=
166 ;;
167 *-*)
168 # Second component is usually, but not always the OS
169 case $field2 in
170 # Prevent following clause from handling this valid os
171 sun*os*)
172 basic_machine=$field1
173 basic_os=$field2
174 ;;
175 # Manufacturers
176 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
177 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
178 | unicom* | ibm* | next | hp | isi* | apollo | altos* \
179 | convergent* | ncr* | news | 32* | 3600* | 3100* \
180 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
181 | ultra | tti* | harris | dolphin | highlevel | gould \
182 | cbm | ns | masscomp | apple | axis | knuth | cray \
183 | microblaze* | sim | cisco \
184 | oki | wec | wrs | winbond)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185 basic_machine=$field1-$field2
186 basic_os=
187 ;;
 
 
 
 
188 *)
189 basic_machine=$field1
190 basic_os=$field2
191 ;;
192 esac
@@ -263,30 +343,10 @@
263 ;;
264 cegcc)
265 basic_machine=arm-unknown
266 basic_os=cegcc
267 ;;
268 convex-c1)
269 basic_machine=c1-convex
270 basic_os=bsd
271 ;;
272 convex-c2)
273 basic_machine=c2-convex
274 basic_os=bsd
275 ;;
276 convex-c32)
277 basic_machine=c32-convex
278 basic_os=bsd
279 ;;
280 convex-c34)
281 basic_machine=c34-convex
282 basic_os=bsd
283 ;;
284 convex-c38)
285 basic_machine=c38-convex
286 basic_os=bsd
287 ;;
288 cray)
289 basic_machine=j90-cray
290 basic_os=unicos
291 ;;
292 crds | unos)
@@ -705,13 +765,21 @@
705 decsystem20* | dec20*)
706 cpu=pdp10
707 vendor=dec
708 basic_os=tops20
709 ;;
710 delta | 3300 | motorola-3300 | motorola-delta \
711 | 3300-motorola | delta-motorola)
712 cpu=m68k
713 vendor=motorola
714 ;;
715 dpx2*)
 
 
 
 
 
716 cpu=m68k
717 vendor=bull
 
 
 
 
@@ -718,6 +786,9 @@
718 basic_os=sysv3
 
 
 
719 ;;
720 encore | umax | mmax)
721 cpu=ns32k
722 vendor=encore
723 ;;
@@ -828,22 +899,10 @@
828 basic_os=newsos
829 ;;
830 next | m*-next)
831 cpu=m68k
832 vendor=next
833 case $basic_os in
834 openstep*)
835 ;;
836 nextstep*)
837 ;;
838 ns2*)
839 basic_os=nextstep2
840 ;;
841 *)
842 basic_os=nextstep3
843 ;;
844 esac
845 ;;
846 np1)
847 cpu=np1
848 vendor=gould
849 ;;
@@ -928,16 +987,17 @@
928 cpu=sparc
929 vendor=`echo "$basic_machine" | sed 's/-.*//'`
930 ;;
931
932 *-*)
933 # shellcheck disable=SC2162
934 IFS="-" read cpu vendor <<EOF
935 $basic_machine
936 EOF
 
937 ;;
938 # We use `pc' rather than `unknown'
939 # because (1) that's what they normally are, and
940 # (2) the word "unknown" tends to confuse beginning users.
941 i*86 | x86_64)
942 cpu=$basic_machine
943 vendor=pc
@@ -961,19 +1021,23 @@
961
962 unset -v basic_machine
963
964 # Decode basic machines in the full and proper CPU-Company form.
965 case $cpu-$vendor in
966 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
967 # some cases the only manufacturer, in others, it is the most popular.
 
 
 
 
968 craynv-unknown)
969 vendor=cray
970 basic_os=${basic_os:-unicosmp}
971 ;;
972 c90-unknown | c90-cray)
973 vendor=cray
974 basic_os=${Basic_os:-unicos}
975 ;;
976 fx80-unknown)
977 vendor=alliant
978 ;;
979 romp-unknown)
@@ -1010,23 +1074,46 @@
1010 cpu=xps100
1011 vendor=honeywell
1012 ;;
1013
1014 # Here we normalize CPU types with a missing or matching vendor
1015 dpx20-unknown | dpx20-bull)
1016 cpu=rs6000
1017 vendor=bull
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1018 basic_os=${basic_os:-bosx}
1019 ;;
 
 
 
1020
1021 # Here we normalize CPU types irrespective of the vendor
1022 amd64-*)
1023 cpu=x86_64
1024 ;;
1025 blackfin-*)
1026 cpu=bfin
1027 basic_os=linux
1028 ;;
1029 c54x-*)
1030 cpu=tic54x
1031 ;;
1032 c55x-*)
@@ -1045,37 +1132,34 @@
1045 ms1-*)
1046 cpu=mt
1047 ;;
1048 m68knommu-*)
1049 cpu=m68k
1050 basic_os=linux
1051 ;;
1052 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1053 cpu=s12z
1054 ;;
1055 openrisc-*)
1056 cpu=or32
1057 ;;
1058 parisc-*)
1059 cpu=hppa
1060 basic_os=linux
1061 ;;
1062 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1063 cpu=i586
1064 ;;
1065 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1066 cpu=i686
1067 ;;
1068 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1069 cpu=i686
1070 ;;
1071 pentium4-*)
1072 cpu=i786
1073 ;;
1074 pc98-*)
1075 cpu=i386
1076 ;;
1077 ppc-* | ppcbe-*)
1078 cpu=powerpc
1079 ;;
1080 ppcle-* | powerpclittle-*)
1081 cpu=powerpcle
@@ -1105,17 +1189,14 @@
1105 cpu=mipstx39
1106 ;;
1107 tx39el-*)
1108 cpu=mipstx39el
1109 ;;
1110 x64-*)
1111 cpu=x86_64
1112 ;;
1113 xscale-* | xscalee[bl]-*)
1114 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1115 ;;
1116 arm64-*)
1117 cpu=aarch64
1118 ;;
1119
1120 # Recognize the canonical CPU Types that limit and/or modify the
1121 # company names they are paired with.
@@ -1163,118 +1244,235 @@
1163
1164 *)
1165 # Recognize the canonical CPU types that are allowed with any
1166 # company name.
1167 case $cpu in
1168 1750a | 580 \
 
 
1169 | a29k \
1170 | aarch64 | aarch64_be \
 
 
1171 | abacus \
1172 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1173 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1174 | alphapca5[67] | alpha64pca5[67] \
 
 
 
 
 
 
 
1175 | am33_2.0 \
1176 | amdgcn \
1177 | arc | arceb | arc32 | arc64 \
1178 | arm | arm[lb]e | arme[lb] | armv* \
1179 | avr | avr32 \
 
 
 
 
 
 
 
1180 | asmjs \
 
 
1181 | ba \
1182 | be32 | be64 \
1183 | bfin | bpf | bs2000 \
1184 | c[123]* | c30 | [cjt]90 | c4x \
1185 | c8051 | clipper | craynv | csky | cydra \
1186 | d10v | d30v | dlx | dsp16xx \
1187 | e2k | elxsi | epiphany \
1188 | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1189 | h8300 | h8500 \
1190 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1191 | hexagon \
1192 | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1193 | ip2k | iq2000 \
 
 
 
 
 
 
 
 
 
 
 
 
1194 | k1om \
1195 | le32 | le64 \
 
 
1196 | lm32 \
1197 | loongarch32 | loongarch64 | loongarchx32 \
1198 | m32c | m32r | m32rle \
1199 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1200 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1201 | m88110 | m88k | maxq | mb | mcore | mep | metag \
1202 | microblaze | microblazeel \
1203 | mips | mipsbe | mipseb | mipsel | mipsle \
1204 | mips16 \
1205 | mips64 | mips64eb | mips64el \
1206 | mips64octeon | mips64octeonel \
1207 | mips64orion | mips64orionel \
1208 | mips64r5900 | mips64r5900el \
1209 | mips64vr | mips64vrel \
1210 | mips64vr4100 | mips64vr4100el \
1211 | mips64vr4300 | mips64vr4300el \
1212 | mips64vr5000 | mips64vr5000el \
1213 | mips64vr5900 | mips64vr5900el \
1214 | mipsisa32 | mipsisa32el \
1215 | mipsisa32r2 | mipsisa32r2el \
1216 | mipsisa32r3 | mipsisa32r3el \
1217 | mipsisa32r5 | mipsisa32r5el \
1218 | mipsisa32r6 | mipsisa32r6el \
1219 | mipsisa64 | mipsisa64el \
1220 | mipsisa64r2 | mipsisa64r2el \
1221 | mipsisa64r3 | mipsisa64r3el \
1222 | mipsisa64r5 | mipsisa64r5el \
1223 | mipsisa64r6 | mipsisa64r6el \
1224 | mipsisa64sb1 | mipsisa64sb1el \
1225 | mipsisa64sr71k | mipsisa64sr71kel \
1226 | mipsr5900 | mipsr5900el \
1227 | mipstx39 | mipstx39el \
1228 | mmix \
1229 | mn10200 | mn10300 \
 
1230 | moxie \
1231 | mt \
1232 | msp430 \
1233 | nds32 | nds32le | nds32be \
 
 
 
 
1234 | nfp \
1235 | nios | nios2 | nios2eb | nios2el \
1236 | none | np1 | ns16k | ns32k | nvptx \
 
 
 
 
 
 
 
1237 | open8 \
1238 | or1k* \
1239 | or32 \
1240 | orion \
 
 
1241 | picochip \
1242 | pdp10 | pdp11 | pj | pjl | pn | power \
1243 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
 
 
 
 
 
 
 
1244 | pru \
1245 | pyramid \
1246 | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
1247 | rl78 | romp | rs6000 | rx \
1248 | s390 | s390x \
 
 
 
 
 
 
 
 
1249 | score \
1250 | sh | shl \
1251 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1252 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1253 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1254 | sparclite \
1255 | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
 
 
 
1256 | spu \
 
 
1257 | tahoe \
1258 | thumbv7* \
1259 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
 
 
 
 
 
1260 | tron \
1261 | ubicom32 \
1262 | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
 
 
 
 
 
 
 
1263 | vax \
 
1264 | visium \
1265 | w65 \
1266 | wasm32 | wasm64 \
 
1267 | we32k \
1268 | x86 | x86_64 | xc16x | xgate | xps100 \
1269 | xstormy16 | xtensa* \
 
 
 
 
 
1270 | ymp \
1271 | z8k | z80)
 
1272 ;;
1273
1274 *)
1275 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1276 exit 1
1277 ;;
1278 esac
1279 ;;
1280 esac
@@ -1291,15 +1489,16 @@
1291 ;;
1292 esac
1293
1294 # Decode manufacturer-specific aliases for certain operating systems.
1295
1296 if test x$basic_os != x
1297 then
1298
1299 # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1300 # set os.
 
1301 case $basic_os in
1302 gnu/linux*)
1303 kernel=linux
1304 os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1305 ;;
@@ -1310,14 +1509,15 @@
1310 nto-qnx*)
1311 kernel=nto
1312 os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1313 ;;
1314 *-*)
1315 # shellcheck disable=SC2162
1316 IFS="-" read kernel os <<EOF
1317 $basic_os
1318 EOF
 
1319 ;;
1320 # Default OS when just kernel was specified
1321 nto*)
1322 kernel=nto
1323 os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
@@ -1324,10 +1524,14 @@
1324 ;;
1325 linux*)
1326 kernel=linux
1327 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1328 ;;
 
 
 
 
1329 *)
1330 kernel=
1331 os=$basic_os
1332 ;;
1333 esac
@@ -1350,10 +1554,27 @@
1350 solaris)
1351 os=solaris2
1352 ;;
1353 unixware*)
1354 os=sysv4.2uw
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1355 ;;
1356 # es1800 is here to avoid being matched by es* (a different OS)
1357 es1800*)
1358 os=ose
1359 ;;
@@ -1421,10 +1642,11 @@
1421 wince*)
1422 os=wince
1423 ;;
1424 utek*)
1425 os=bsd
 
1426 ;;
1427 dynix*)
1428 os=bsd
1429 ;;
1430 acis*)
@@ -1437,25 +1659,29 @@
1437 os=syllable
1438 ;;
1439 386bsd)
1440 os=bsd
1441 ;;
1442 ctix* | uts*)
 
 
 
 
1443 os=sysv
1444 ;;
1445 nova*)
1446 os=rtmk-nova
1447 ;;
1448 ns2)
1449 os=nextstep2
1450 ;;
1451 # Preserve the version number of sinix5.
1452 sinix5.*)
1453 os=`echo "$os" | sed -e 's|sinix|sysv|'`
 
1454 ;;
1455 sinix*)
1456 os=sysv4
 
1457 ;;
1458 tpf*)
1459 os=tpf
1460 ;;
1461 triton*)
@@ -1489,13 +1715,19 @@
1489 case $cpu in
1490 arm*)
1491 os=eabi
1492 ;;
1493 *)
1494 os=elf
 
1495 ;;
1496 esac
 
 
 
 
 
1497 ;;
1498 *)
1499 # No normalization, but not necessarily accepted, that comes below.
1500 ;;
1501 esac
@@ -1511,47 +1743,57 @@
1511 # that MANUFACTURER isn't an operating system. Otherwise, code above
1512 # will signal an error saying that MANUFACTURER isn't an operating
1513 # system, and we'll never get to this point.
1514
1515 kernel=
 
1516 case $cpu-$vendor in
1517 score-*)
1518 os=elf
 
1519 ;;
1520 spu-*)
1521 os=elf
 
1522 ;;
1523 *-acorn)
1524 os=riscix1.2
1525 ;;
1526 arm*-rebel)
1527 kernel=linux
1528 os=gnu
1529 ;;
1530 arm*-semi)
1531 os=aout
 
1532 ;;
1533 c4x-* | tic4x-*)
1534 os=coff
 
1535 ;;
1536 c8051-*)
1537 os=elf
 
1538 ;;
1539 clipper-intergraph)
1540 os=clix
1541 ;;
1542 hexagon-*)
1543 os=elf
 
1544 ;;
1545 tic54x-*)
1546 os=coff
 
1547 ;;
1548 tic55x-*)
1549 os=coff
 
1550 ;;
1551 tic6x-*)
1552 os=coff
 
1553 ;;
1554 # This must come before the *-dec entry.
1555 pdp10-*)
1556 os=tops20
1557 ;;
@@ -1569,32 +1811,47 @@
1569 ;;
1570 m68000-sun)
1571 os=sunos3
1572 ;;
1573 m68*-cisco)
1574 os=aout
 
1575 ;;
1576 mep-*)
1577 os=elf
 
 
 
 
 
 
 
 
 
1578 ;;
1579 mips*-cisco)
1580 os=elf
 
1581 ;;
1582 mips*-*)
1583 os=elf
 
1584 ;;
1585 or32-*)
1586 os=coff
 
1587 ;;
1588 *-tti) # must be before sparc entry or we get the wrong os.
 
1589 os=sysv3
1590 ;;
1591 sparc-* | *-sun)
1592 os=sunos4.1.1
1593 ;;
1594 pru-*)
1595 os=elf
 
1596 ;;
1597 *-be)
1598 os=beos
1599 ;;
1600 *-ibm)
@@ -1614,11 +1871,11 @@
1614 ;;
1615 *-hp)
1616 os=hpux
1617 ;;
1618 *-hitachi)
1619 os=hiux
1620 ;;
1621 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1622 os=sysv
1623 ;;
1624 *-cbm)
@@ -1658,27 +1915,23 @@
1658 os=bsd
1659 ;;
1660 *-encore)
1661 os=bsd
1662 ;;
1663 *-sgi)
1664 os=irix
1665 ;;
1666 *-siemens)
1667 os=sysv4
1668 ;;
1669 *-masscomp)
1670 os=rtu
1671 ;;
1672 f30[01]-fujitsu | f700-fujitsu)
1673 os=uxpv
1674 ;;
1675 *-rom68k)
1676 os=coff
 
1677 ;;
1678 *-*bug)
1679 os=coff
 
1680 ;;
1681 *-apple)
1682 os=macos
1683 ;;
1684 *-atari*)
@@ -1692,96 +1945,324 @@
1692 ;;
1693 esac
1694
1695 fi
1696
1697 # Now, validate our (potentially fixed-up) OS.
 
1698 case $os in
1699 # Sometimes we do "kernel-libc", so those need to count as OSes.
1700 musl* | newlib* | uclibc*)
1701 ;;
1702 # Likewise for "kernel-abi"
1703 eabi* | gnueabi*)
1704 ;;
1705 # VxWorks passes extra cpu info in the 4th filed.
1706 simlinux | simwindows | spe)
 
 
 
1707 ;;
1708 # Now accept the basic system types.
1709 # The portable systems comes first.
1710 # Each alternative MUST end in a * to match a version number.
1711 gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1712 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1713 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1714 | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1715 | hiux* | abug | nacl* | netware* | windows* \
1716 | os9* | macos* | osx* | ios* \
1717 | mpw* | magic* | mmixware* | mon960* | lnews* \
1718 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1719 | aos* | aros* | cloudabi* | sortix* | twizzler* \
1720 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1721 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1722 | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1723 | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
1724 | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1725 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1726 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1727 | udi* | lites* | ieee* | go32* | aux* | hcos* \
1728 | chorusrdb* | cegcc* | glidix* | serenity* \
1729 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1730 | midipix* | mingw32* | mingw64* | mint* \
1731 | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1732 | interix* | uwin* | mks* | rhapsody* | darwin* \
1733 | openstep* | oskit* | conix* | pw32* | nonstopux* \
1734 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1735 | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1736 | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1737 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1738 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1739 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1740 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1741 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1742 ;;
1743 # This one is extra strict with allowed versions
1744 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1745 # Don't forget version if it is 3.2v4 or newer.
1746 ;;
 
 
 
 
 
 
 
1747 none)
1748 ;;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1749 *)
1750 echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1751 exit 1
1752 ;;
1753 esac
1754
1755 # As a final step for OS-related things, validate the OS-kernel combination
1756 # (given a valid OS), if there is a kernel.
1757 case $kernel-$os in
1758 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
 
 
 
 
 
 
1759 ;;
1760 uclinux-uclibc* )
1761 ;;
1762 -dietlibc* | -newlib* | -musl* | -uclibc* )
 
1763 # These are just libc implementations, not actual OSes, and thus
1764 # require a kernel.
1765 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
 
 
 
 
 
 
 
 
 
 
 
 
1766 exit 1
1767 ;;
1768 kfreebsd*-gnu* | kopensolaris*-gnu*)
1769 ;;
1770 vxworks-simlinux | vxworks-simwindows | vxworks-spe)
1771 ;;
1772 nto-qnx*)
1773 ;;
1774 os2-emx)
1775 ;;
1776 *-eabi* | *-gnueabi*)
1777 ;;
1778 -*)
 
 
 
 
 
 
1779 # Blank kernel with real OS is always fine.
1780 ;;
1781 *-*)
1782 echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
 
 
 
1783 exit 1
1784 ;;
1785 esac
1786
1787 # Here we handle the case where we know the os, and the CPU type, but not the
@@ -1790,11 +2271,11 @@
1790 unknown)
1791 case $cpu-$os in
1792 *-riscix*)
1793 vendor=acorn
1794 ;;
1795 *-sunos*)
1796 vendor=sun
1797 ;;
1798 *-cnk* | *-aix*)
1799 vendor=ibm
1800 ;;
@@ -1860,14 +2341,14 @@
1860 ;;
1861 esac
1862 ;;
1863 esac
1864
1865 echo "$cpu-$vendor-${kernel:+$kernel-}$os"
1866 exit
1867
1868 # Local variables:
1869 # eval: (add-hook 'before-save-hook 'time-stamp)
1870 # time-stamp-start: "timestamp='"
1871 # time-stamp-format: "%:y-%02m-%02d"
1872 # time-stamp-end: "'"
1873 # End:
1874
--- autosetup/autosetup-config.sub
+++ autosetup/autosetup-config.sub
@@ -1,16 +1,16 @@
1 #! /bin/sh
2 # Configuration validation subroutine script.
3 # Copyright 1992-2024 Free Software Foundation, Inc.
4
5 # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
6
7 timestamp='2024-05-27'
8
9 # This file is free software; you can redistribute it and/or modify it
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
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -74,17 +74,17 @@
74 Report bugs and patches to <[email protected]>."
75
76 version="\
77 GNU config.sub ($timestamp)
78
79 Copyright 1992-2024 Free Software Foundation, Inc.
80
81 This is free software; see the source for copying conditions. There is NO
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83
84 help="
85 Try '$me --help' for more information."
86
87 # Parse command line
88 while test $# -gt 0 ; do
89 case $1 in
90 --time-stamp | --time* | -t )
@@ -118,19 +118,20 @@
118 *) echo "$me: too many arguments$help" >&2
119 exit 1;;
120 esac
121
122 # Split fields of configuration type
123 saved_IFS=$IFS
124 IFS="-" read field1 field2 field3 field4 <<EOF
125 $1
126 EOF
127 IFS=$saved_IFS
128
129 # Separate into logical components for further validation
130 case $1 in
131 *-*-*-*-*)
132 echo "Invalid configuration '$1': more than four components" >&2
133 exit 1
134 ;;
135 *-*-*-*)
136 basic_machine=$field1-$field2
137 basic_os=$field3-$field4
@@ -138,14 +139,25 @@
139 *-*-*)
140 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
141 # parts
142 maybe_os=$field2-$field3
143 case $maybe_os in
144 cloudabi*-eabi* \
145 | kfreebsd*-gnu* \
146 | knetbsd*-gnu* \
147 | kopensolaris*-gnu* \
148 | linux-* \
149 | managarm-* \
150 | netbsd*-eabi* \
151 | netbsd*-gnu* \
152 | nto-qnx* \
153 | os2-emx* \
154 | rtmk-nova* \
155 | storm-chaos* \
156 | uclinux-gnu* \
157 | uclinux-uclibc* \
158 | windows-* )
159 basic_machine=$field1
160 basic_os=$maybe_os
161 ;;
162 android-linux)
163 basic_machine=$field1-unknown
@@ -156,37 +168,105 @@
168 basic_os=$field3
169 ;;
170 esac
171 ;;
172 *-*)
 
173 case $field1-$field2 in
174 # Shorthands that happen to contain a single dash
175 convex-c[12] | convex-c3[248])
176 basic_machine=$field2-convex
177 basic_os=
178 ;;
179 decstation-3100)
180 basic_machine=mips-dec
181 basic_os=
182 ;;
183 *-*)
184 # Second component is usually, but not always the OS
185 case $field2 in
186 # Do not treat sunos as a manufacturer
187 sun*os*)
188 basic_machine=$field1
189 basic_os=$field2
190 ;;
191 # Manufacturers
192 3100* \
193 | 32* \
194 | 3300* \
195 | 3600* \
196 | 7300* \
197 | acorn \
198 | altos* \
199 | apollo \
200 | apple \
201 | atari \
202 | att* \
203 | axis \
204 | be \
205 | bull \
206 | cbm \
207 | ccur \
208 | cisco \
209 | commodore \
210 | convergent* \
211 | convex* \
212 | cray \
213 | crds \
214 | dec* \
215 | delta* \
216 | dg \
217 | digital \
218 | dolphin \
219 | encore* \
220 | gould \
221 | harris \
222 | highlevel \
223 | hitachi* \
224 | hp \
225 | ibm* \
226 | intergraph \
227 | isi* \
228 | knuth \
229 | masscomp \
230 | microblaze* \
231 | mips* \
232 | motorola* \
233 | ncr* \
234 | news \
235 | next \
236 | ns \
237 | oki \
238 | omron* \
239 | pc533* \
240 | rebel \
241 | rom68k \
242 | rombug \
243 | semi \
244 | sequent* \
245 | siemens \
246 | sgi* \
247 | siemens \
248 | sim \
249 | sni \
250 | sony* \
251 | stratus \
252 | sun \
253 | sun[234]* \
254 | tektronix \
255 | tti* \
256 | ultra \
257 | unicom* \
258 | wec \
259 | winbond \
260 | wrs)
261 basic_machine=$field1-$field2
262 basic_os=
263 ;;
264 zephyr*)
265 basic_machine=$field1-unknown
266 basic_os=$field2
267 ;;
268 *)
269 basic_machine=$field1
270 basic_os=$field2
271 ;;
272 esac
@@ -263,30 +343,10 @@
343 ;;
344 cegcc)
345 basic_machine=arm-unknown
346 basic_os=cegcc
347 ;;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348 cray)
349 basic_machine=j90-cray
350 basic_os=unicos
351 ;;
352 crds | unos)
@@ -705,13 +765,21 @@
765 decsystem20* | dec20*)
766 cpu=pdp10
767 vendor=dec
768 basic_os=tops20
769 ;;
770 delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300)
 
771 cpu=m68k
772 vendor=motorola
773 ;;
774 # This used to be dpx2*, but that gets the RS6000-based
775 # DPX/20 and the x86-based DPX/2-100 wrong. See
776 # https://oldskool.silicium.org/stations/bull_dpx20.htm
777 # https://www.feb-patrimoine.com/english/bull_dpx2.htm
778 # https://www.feb-patrimoine.com/english/unix_and_bull.htm
779 dpx2 | dpx2[23]00 | dpx2[23]xx)
780 cpu=m68k
781 vendor=bull
782 ;;
783 dpx2100 | dpx21xx)
784 cpu=i386
785 vendor=bull
@@ -718,6 +786,9 @@
786 ;;
787 dpx20)
788 cpu=rs6000
789 vendor=bull
790 ;;
791 encore | umax | mmax)
792 cpu=ns32k
793 vendor=encore
794 ;;
@@ -828,22 +899,10 @@
899 basic_os=newsos
900 ;;
901 next | m*-next)
902 cpu=m68k
903 vendor=next
 
 
 
 
 
 
 
 
 
 
 
 
904 ;;
905 np1)
906 cpu=np1
907 vendor=gould
908 ;;
@@ -928,16 +987,17 @@
987 cpu=sparc
988 vendor=`echo "$basic_machine" | sed 's/-.*//'`
989 ;;
990
991 *-*)
992 saved_IFS=$IFS
993 IFS="-" read cpu vendor <<EOF
994 $basic_machine
995 EOF
996 IFS=$saved_IFS
997 ;;
998 # We use 'pc' rather than 'unknown'
999 # because (1) that's what they normally are, and
1000 # (2) the word "unknown" tends to confuse beginning users.
1001 i*86 | x86_64)
1002 cpu=$basic_machine
1003 vendor=pc
@@ -961,19 +1021,23 @@
1021
1022 unset -v basic_machine
1023
1024 # Decode basic machines in the full and proper CPU-Company form.
1025 case $cpu-$vendor in
1026 # Here we handle the default manufacturer of certain CPU types in canonical form.
1027 # It is in some cases the only manufacturer, in others, it is the most popular.
1028 c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown)
1029 vendor=convex
1030 basic_os=${basic_os:-bsd}
1031 ;;
1032 craynv-unknown)
1033 vendor=cray
1034 basic_os=${basic_os:-unicosmp}
1035 ;;
1036 c90-unknown | c90-cray)
1037 vendor=cray
1038 basic_os=${basic_os:-unicos}
1039 ;;
1040 fx80-unknown)
1041 vendor=alliant
1042 ;;
1043 romp-unknown)
@@ -1010,23 +1074,46 @@
1074 cpu=xps100
1075 vendor=honeywell
1076 ;;
1077
1078 # Here we normalize CPU types with a missing or matching vendor
1079 armh-unknown | armh-alt)
1080 cpu=armv7l
1081 vendor=alt
1082 basic_os=${basic_os:-linux-gnueabihf}
1083 ;;
1084
1085 # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified
1086 m68k-isi)
1087 basic_os=${basic_os:-sysv}
1088 ;;
1089 m68k-sony)
1090 basic_os=${basic_os:-newsos}
1091 ;;
1092 m68k-tektronix)
1093 basic_os=${basic_os:-bsd}
1094 ;;
1095 m88k-harris)
1096 basic_os=${basic_os:-sysv3}
1097 ;;
1098 i386-bull | m68k-bull)
1099 basic_os=${basic_os:-sysv3}
1100 ;;
1101 rs6000-bull)
1102 basic_os=${basic_os:-bosx}
1103 ;;
1104 mips-sni)
1105 basic_os=${basic_os:-sysv4}
1106 ;;
1107
1108 # Here we normalize CPU types irrespective of the vendor
1109 amd64-*)
1110 cpu=x86_64
1111 ;;
1112 blackfin-*)
1113 cpu=bfin
1114 basic_os=${basic_os:-linux}
1115 ;;
1116 c54x-*)
1117 cpu=tic54x
1118 ;;
1119 c55x-*)
@@ -1045,37 +1132,34 @@
1132 ms1-*)
1133 cpu=mt
1134 ;;
1135 m68knommu-*)
1136 cpu=m68k
1137 basic_os=${basic_os:-linux}
1138 ;;
1139 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1140 cpu=s12z
1141 ;;
1142 openrisc-*)
1143 cpu=or32
1144 ;;
1145 parisc-*)
1146 cpu=hppa
1147 basic_os=${basic_os:-linux}
1148 ;;
1149 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1150 cpu=i586
1151 ;;
1152 pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
1153 cpu=i686
1154 ;;
1155 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1156 cpu=i686
1157 ;;
1158 pentium4-*)
1159 cpu=i786
1160 ;;
 
 
 
1161 ppc-* | ppcbe-*)
1162 cpu=powerpc
1163 ;;
1164 ppcle-* | powerpclittle-*)
1165 cpu=powerpcle
@@ -1105,17 +1189,14 @@
1189 cpu=mipstx39
1190 ;;
1191 tx39el-*)
1192 cpu=mipstx39el
1193 ;;
 
 
 
1194 xscale-* | xscalee[bl]-*)
1195 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1196 ;;
1197 arm64-* | aarch64le-*)
1198 cpu=aarch64
1199 ;;
1200
1201 # Recognize the canonical CPU Types that limit and/or modify the
1202 # company names they are paired with.
@@ -1163,118 +1244,235 @@
1244
1245 *)
1246 # Recognize the canonical CPU types that are allowed with any
1247 # company name.
1248 case $cpu in
1249 1750a \
1250 | 580 \
1251 | [cjt]90 \
1252 | a29k \
1253 | aarch64 \
1254 | aarch64_be \
1255 | aarch64c \
1256 | abacus \
1257 | alpha \
1258 | alpha64 \
1259 | alpha64ev56 \
1260 | alpha64ev6[78] \
1261 | alpha64ev[4-8] \
1262 | alpha64pca5[67] \
1263 | alphaev56 \
1264 | alphaev6[78] \
1265 | alphaev[4-8] \
1266 | alphapca5[67] \
1267 | am33_2.0 \
1268 | amdgcn \
1269 | arc \
1270 | arc32 \
1271 | arc64 \
1272 | arceb \
1273 | arm \
1274 | arm64e \
1275 | arm64ec \
1276 | arm[lb]e \
1277 | arme[lb] \
1278 | armv* \
1279 | asmjs \
1280 | avr \
1281 | avr32 \
1282 | ba \
1283 | be32 \
1284 | be64 \
1285 | bfin \
1286 | bpf \
1287 | bs2000 \
1288 | c30 \
1289 | c4x \
1290 | c8051 \
1291 | c[123]* \
1292 | clipper \
1293 | craynv \
1294 | csky \
1295 | cydra \
1296 | d10v \
1297 | d30v \
1298 | dlx \
1299 | dsp16xx \
1300 | e2k \
1301 | elxsi \
1302 | epiphany \
1303 | f30[01] \
1304 | f700 \
1305 | fido \
1306 | fr30 \
1307 | frv \
1308 | ft32 \
1309 | fx80 \
1310 | h8300 \
1311 | h8500 \
1312 | hexagon \
1313 | hppa \
1314 | hppa1.[01] \
1315 | hppa2.0 \
1316 | hppa2.0[nw] \
1317 | hppa64 \
1318 | i*86 \
1319 | i370 \
1320 | i860 \
1321 | i960 \
1322 | ia16 \
1323 | ia64 \
1324 | ip2k \
1325 | iq2000 \
1326 | javascript \
1327 | k1om \
1328 | kvx \
1329 | le32 \
1330 | le64 \
1331 | lm32 \
1332 | loongarch32 \
1333 | loongarch64 \
1334 | m32c \
1335 | m32r \
1336 | m32rle \
1337 | m5200 \
1338 | m68000 \
1339 | m680[012346]0 \
1340 | m6811 \
1341 | m6812 \
1342 | m68360 \
1343 | m683?2 \
1344 | m68hc11 \
1345 | m68hc12 \
1346 | m68hcs12x \
1347 | m68k \
1348 | m88110 \
1349 | m88k \
1350 | maxq \
1351 | mb \
1352 | mcore \
1353 | mep \
1354 | metag \
1355 | microblaze \
1356 | microblazeel \
1357 | mips* \
 
 
 
 
 
1358 | mmix \
1359 | mn10200 \
1360 | mn10300 \
1361 | moxie \
 
1362 | msp430 \
1363 | mt \
1364 | nanomips* \
1365 | nds32 \
1366 | nds32be \
1367 | nds32le \
1368 | nfp \
1369 | nios \
1370 | nios2 \
1371 | nios2eb \
1372 | nios2el \
1373 | none \
1374 | np1 \
1375 | ns16k \
1376 | ns32k \
1377 | nvptx \
1378 | open8 \
1379 | or1k* \
1380 | or32 \
1381 | orion \
1382 | pdp10 \
1383 | pdp11 \
1384 | picochip \
1385 | pj \
1386 | pjl \
1387 | pn \
1388 | power \
1389 | powerpc \
1390 | powerpc64 \
1391 | powerpc64le \
1392 | powerpcle \
1393 | powerpcspe \
1394 | pru \
1395 | pyramid \
1396 | riscv \
1397 | riscv32 \
1398 | riscv32be \
1399 | riscv64 \
1400 | riscv64be \
1401 | rl78 \
1402 | romp \
1403 | rs6000 \
1404 | rx \
1405 | s390 \
1406 | s390x \
1407 | score \
1408 | sh \
1409 | sh64 \
1410 | sh64le \
1411 | sh[12345][lb]e \
1412 | sh[1234] \
1413 | sh[1234]e[lb] \
1414 | sh[23]e \
1415 | sh[23]ele \
1416 | sh[24]a \
1417 | sh[24]ae[lb] \
1418 | sh[lb]e \
1419 | she[lb] \
1420 | shl \
1421 | sparc \
1422 | sparc64 \
1423 | sparc64b \
1424 | sparc64v \
1425 | sparc86x \
1426 | sparclet \
1427 | sparclite \
1428 | sparcv8 \
1429 | sparcv9 \
1430 | sparcv9b \
1431 | sparcv9v \
1432 | spu \
1433 | sv1 \
1434 | sx* \
1435 | tahoe \
1436 | thumbv7* \
1437 | tic30 \
1438 | tic4x \
1439 | tic54x \
1440 | tic55x \
1441 | tic6x \
1442 | tic80 \
1443 | tron \
1444 | ubicom32 \
1445 | v70 \
1446 | v810 \
1447 | v850 \
1448 | v850e \
1449 | v850e1 \
1450 | v850e2 \
1451 | v850e2v3 \
1452 | v850es \
1453 | vax \
1454 | vc4 \
1455 | visium \
1456 | w65 \
1457 | wasm32 \
1458 | wasm64 \
1459 | we32k \
1460 | x86 \
1461 | x86_64 \
1462 | xc16x \
1463 | xgate \
1464 | xps100 \
1465 | xstormy16 \
1466 | xtensa* \
1467 | ymp \
1468 | z80 \
1469 | z8k)
1470 ;;
1471
1472 *)
1473 echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
1474 exit 1
1475 ;;
1476 esac
1477 ;;
1478 esac
@@ -1291,15 +1489,16 @@
1489 ;;
1490 esac
1491
1492 # Decode manufacturer-specific aliases for certain operating systems.
1493
1494 if test x"$basic_os" != x
1495 then
1496
1497 # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
1498 # set os.
1499 obj=
1500 case $basic_os in
1501 gnu/linux*)
1502 kernel=linux
1503 os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1504 ;;
@@ -1310,14 +1509,15 @@
1509 nto-qnx*)
1510 kernel=nto
1511 os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1512 ;;
1513 *-*)
1514 saved_IFS=$IFS
1515 IFS="-" read kernel os <<EOF
1516 $basic_os
1517 EOF
1518 IFS=$saved_IFS
1519 ;;
1520 # Default OS when just kernel was specified
1521 nto*)
1522 kernel=nto
1523 os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
@@ -1324,10 +1524,14 @@
1524 ;;
1525 linux*)
1526 kernel=linux
1527 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1528 ;;
1529 managarm*)
1530 kernel=managarm
1531 os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1532 ;;
1533 *)
1534 kernel=
1535 os=$basic_os
1536 ;;
1537 esac
@@ -1350,10 +1554,27 @@
1554 solaris)
1555 os=solaris2
1556 ;;
1557 unixware*)
1558 os=sysv4.2uw
1559 ;;
1560 # The marketing names for NeXT's operating systems were
1561 # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is
1562 # mapped to 'openstep3', but 'openstep1' and 'openstep2' are
1563 # mapped to 'nextstep' and 'nextstep2', consistent with the
1564 # treatment of SunOS/Solaris.
1565 ns | ns1 | nextstep | nextstep1 | openstep1)
1566 os=nextstep
1567 ;;
1568 ns2 | nextstep2 | openstep2)
1569 os=nextstep2
1570 ;;
1571 ns3 | nextstep3 | openstep | openstep3)
1572 os=openstep3
1573 ;;
1574 ns4 | nextstep4 | openstep4)
1575 os=openstep4
1576 ;;
1577 # es1800 is here to avoid being matched by es* (a different OS)
1578 es1800*)
1579 os=ose
1580 ;;
@@ -1421,10 +1642,11 @@
1642 wince*)
1643 os=wince
1644 ;;
1645 utek*)
1646 os=bsd
1647 vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
1648 ;;
1649 dynix*)
1650 os=bsd
1651 ;;
1652 acis*)
@@ -1437,25 +1659,29 @@
1659 os=syllable
1660 ;;
1661 386bsd)
1662 os=bsd
1663 ;;
1664 ctix*)
1665 os=sysv
1666 vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
1667 ;;
1668 uts*)
1669 os=sysv
1670 ;;
1671 nova*)
1672 kernel=rtmk
1673 os=nova
 
 
1674 ;;
1675 # Preserve the version number of sinix5.
1676 sinix5.*)
1677 os=`echo "$os" | sed -e 's|sinix|sysv|'`
1678 vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
1679 ;;
1680 sinix*)
1681 os=sysv4
1682 vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
1683 ;;
1684 tpf*)
1685 os=tpf
1686 ;;
1687 triton*)
@@ -1489,13 +1715,19 @@
1715 case $cpu in
1716 arm*)
1717 os=eabi
1718 ;;
1719 *)
1720 os=
1721 obj=elf
1722 ;;
1723 esac
1724 ;;
1725 aout* | coff* | elf* | pe*)
1726 # These are machine code file formats, not OSes
1727 obj=$os
1728 os=
1729 ;;
1730 *)
1731 # No normalization, but not necessarily accepted, that comes below.
1732 ;;
1733 esac
@@ -1511,47 +1743,57 @@
1743 # that MANUFACTURER isn't an operating system. Otherwise, code above
1744 # will signal an error saying that MANUFACTURER isn't an operating
1745 # system, and we'll never get to this point.
1746
1747 kernel=
1748 obj=
1749 case $cpu-$vendor in
1750 score-*)
1751 os=
1752 obj=elf
1753 ;;
1754 spu-*)
1755 os=
1756 obj=elf
1757 ;;
1758 *-acorn)
1759 os=riscix1.2
1760 ;;
1761 arm*-rebel)
1762 kernel=linux
1763 os=gnu
1764 ;;
1765 arm*-semi)
1766 os=
1767 obj=aout
1768 ;;
1769 c4x-* | tic4x-*)
1770 os=
1771 obj=coff
1772 ;;
1773 c8051-*)
1774 os=
1775 obj=elf
1776 ;;
1777 clipper-intergraph)
1778 os=clix
1779 ;;
1780 hexagon-*)
1781 os=
1782 obj=elf
1783 ;;
1784 tic54x-*)
1785 os=
1786 obj=coff
1787 ;;
1788 tic55x-*)
1789 os=
1790 obj=coff
1791 ;;
1792 tic6x-*)
1793 os=
1794 obj=coff
1795 ;;
1796 # This must come before the *-dec entry.
1797 pdp10-*)
1798 os=tops20
1799 ;;
@@ -1569,32 +1811,47 @@
1811 ;;
1812 m68000-sun)
1813 os=sunos3
1814 ;;
1815 m68*-cisco)
1816 os=
1817 obj=aout
1818 ;;
1819 mep-*)
1820 os=
1821 obj=elf
1822 ;;
1823 # The -sgi and -siemens entries must be before the mips- entry
1824 # or we get the wrong os.
1825 *-sgi)
1826 os=irix
1827 ;;
1828 *-siemens)
1829 os=sysv4
1830 ;;
1831 mips*-cisco)
1832 os=
1833 obj=elf
1834 ;;
1835 mips*-*|nanomips*-*)
1836 os=
1837 obj=elf
1838 ;;
1839 or32-*)
1840 os=
1841 obj=coff
1842 ;;
1843 # This must be before the sparc-* entry or we get the wrong os.
1844 *-tti)
1845 os=sysv3
1846 ;;
1847 sparc-* | *-sun)
1848 os=sunos4.1.1
1849 ;;
1850 pru-*)
1851 os=
1852 obj=elf
1853 ;;
1854 *-be)
1855 os=beos
1856 ;;
1857 *-ibm)
@@ -1614,11 +1871,11 @@
1871 ;;
1872 *-hp)
1873 os=hpux
1874 ;;
1875 *-hitachi)
1876 os=hiuxwe2
1877 ;;
1878 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1879 os=sysv
1880 ;;
1881 *-cbm)
@@ -1658,27 +1915,23 @@
1915 os=bsd
1916 ;;
1917 *-encore)
1918 os=bsd
1919 ;;
 
 
 
 
 
 
1920 *-masscomp)
1921 os=rtu
1922 ;;
1923 f30[01]-fujitsu | f700-fujitsu)
1924 os=uxpv
1925 ;;
1926 *-rom68k)
1927 os=
1928 obj=coff
1929 ;;
1930 *-*bug)
1931 os=
1932 obj=coff
1933 ;;
1934 *-apple)
1935 os=macos
1936 ;;
1937 *-atari*)
@@ -1692,96 +1945,324 @@
1945 ;;
1946 esac
1947
1948 fi
1949
1950 # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
1951
1952 case $os in
1953 # Sometimes we do "kernel-libc", so those need to count as OSes.
1954 llvm* | musl* | newlib* | relibc* | uclibc*)
1955 ;;
1956 # Likewise for "kernel-abi"
1957 eabi* | gnueabi*)
1958 ;;
1959 # VxWorks passes extra cpu info in the 4th filed.
1960 simlinux | simwindows | spe)
1961 ;;
1962 # See `case $cpu-$os` validation below
1963 ghcjs)
1964 ;;
1965 # Now accept the basic system types.
 
1966 # Each alternative MUST end in a * to match a version number.
1967 abug \
1968 | aix* \
1969 | amdhsa* \
1970 | amigados* \
1971 | amigaos* \
1972 | android* \
1973 | aof* \
1974 | aos* \
1975 | aros* \
1976 | atheos* \
1977 | auroraux* \
1978 | aux* \
1979 | beos* \
1980 | bitrig* \
1981 | bme* \
1982 | bosx* \
1983 | bsd* \
1984 | cegcc* \
1985 | chorusos* \
1986 | chorusrdb* \
1987 | clix* \
1988 | cloudabi* \
1989 | cnk* \
1990 | conix* \
1991 | cos* \
1992 | cxux* \
1993 | cygwin* \
1994 | darwin* \
1995 | dgux* \
1996 | dicos* \
1997 | dnix* \
1998 | domain* \
1999 | dragonfly* \
2000 | drops* \
2001 | ebmon* \
2002 | ecoff* \
2003 | ekkobsd* \
2004 | emscripten* \
2005 | emx* \
2006 | es* \
2007 | fiwix* \
2008 | freebsd* \
2009 | fuchsia* \
2010 | genix* \
2011 | genode* \
2012 | glidix* \
2013 | gnu* \
2014 | go32* \
2015 | haiku* \
2016 | hcos* \
2017 | hiux* \
2018 | hms* \
2019 | hpux* \
2020 | ieee* \
2021 | interix* \
2022 | ios* \
2023 | iris* \
2024 | irix* \
2025 | ironclad* \
2026 | isc* \
2027 | its* \
2028 | l4re* \
2029 | libertybsd* \
2030 | lites* \
2031 | lnews* \
2032 | luna* \
2033 | lynxos* \
2034 | mach* \
2035 | macos* \
2036 | magic* \
2037 | mbr* \
2038 | midipix* \
2039 | midnightbsd* \
2040 | mingw32* \
2041 | mingw64* \
2042 | minix* \
2043 | mint* \
2044 | mirbsd* \
2045 | mks* \
2046 | mlibc* \
2047 | mmixware* \
2048 | mon960* \
2049 | morphos* \
2050 | moss* \
2051 | moxiebox* \
2052 | mpeix* \
2053 | mpw* \
2054 | msdos* \
2055 | msys* \
2056 | mvs* \
2057 | nacl* \
2058 | netbsd* \
2059 | netware* \
2060 | newsos* \
2061 | nextstep* \
2062 | nindy* \
2063 | nonstopux* \
2064 | nova* \
2065 | nsk* \
2066 | nucleus* \
2067 | nx6 \
2068 | nx7 \
2069 | oabi* \
2070 | ohos* \
2071 | onefs* \
2072 | openbsd* \
2073 | openedition* \
2074 | openstep* \
2075 | os108* \
2076 | os2* \
2077 | os400* \
2078 | os68k* \
2079 | os9* \
2080 | ose* \
2081 | osf* \
2082 | oskit* \
2083 | osx* \
2084 | palmos* \
2085 | phoenix* \
2086 | plan9* \
2087 | powermax* \
2088 | powerunix* \
2089 | proelf* \
2090 | psos* \
2091 | psp* \
2092 | ptx* \
2093 | pw32* \
2094 | qnx* \
2095 | rdos* \
2096 | redox* \
2097 | rhapsody* \
2098 | riscix* \
2099 | riscos* \
2100 | rtems* \
2101 | rtmk* \
2102 | rtu* \
2103 | scout* \
2104 | secbsd* \
2105 | sei* \
2106 | serenity* \
2107 | sim* \
2108 | skyos* \
2109 | solaris* \
2110 | solidbsd* \
2111 | sortix* \
2112 | storm-chaos* \
2113 | sunos \
2114 | sunos[34]* \
2115 | superux* \
2116 | syllable* \
2117 | sym* \
2118 | sysv* \
2119 | tenex* \
2120 | tirtos* \
2121 | toppers* \
2122 | tops10* \
2123 | tops20* \
2124 | tpf* \
2125 | tvos* \
2126 | twizzler* \
2127 | uclinux* \
2128 | udi* \
2129 | udk* \
2130 | ultrix* \
2131 | unicos* \
2132 | uniplus* \
2133 | unleashed* \
2134 | unos* \
2135 | uwin* \
2136 | uxpv* \
2137 | v88r* \
2138 |*vms* \
2139 | vos* \
2140 | vsta* \
2141 | vxsim* \
2142 | vxworks* \
2143 | wasi* \
2144 | watchos* \
2145 | wince* \
2146 | windiss* \
2147 | windows* \
2148 | winnt* \
2149 | xenix* \
2150 | xray* \
2151 | zephyr* \
2152 | zvmoe* )
2153 ;;
2154 # This one is extra strict with allowed versions
2155 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
2156 # Don't forget version if it is 3.2v4 or newer.
2157 ;;
2158 # This refers to builds using the UEFI calling convention
2159 # (which depends on the architecture) and PE file format.
2160 # Note that this is both a different calling convention and
2161 # different file format than that of GNU-EFI
2162 # (x86_64-w64-mingw32).
2163 uefi)
2164 ;;
2165 none)
2166 ;;
2167 kernel* | msvc* )
2168 # Restricted further below
2169 ;;
2170 '')
2171 if test x"$obj" = x
2172 then
2173 echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
2174 fi
2175 ;;
2176 *)
2177 echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
2178 exit 1
2179 ;;
2180 esac
2181
2182 case $obj in
2183 aout* | coff* | elf* | pe*)
2184 ;;
2185 '')
2186 # empty is fine
2187 ;;
2188 *)
2189 echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
2190 exit 1
2191 ;;
2192 esac
2193
2194 # Here we handle the constraint that a (synthetic) cpu and os are
2195 # valid only in combination with each other and nowhere else.
2196 case $cpu-$os in
2197 # The "javascript-unknown-ghcjs" triple is used by GHC; we
2198 # accept it here in order to tolerate that, but reject any
2199 # variations.
2200 javascript-ghcjs)
2201 ;;
2202 javascript-* | *-ghcjs)
2203 echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
2204 exit 1
2205 ;;
2206 esac
2207
2208 # As a final step for OS-related things, validate the OS-kernel combination
2209 # (given a valid OS), if there is a kernel.
2210 case $kernel-$os-$obj in
2211 linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
2212 | linux-mlibc*- | linux-musl*- | linux-newlib*- \
2213 | linux-relibc*- | linux-uclibc*- | linux-ohos*- )
2214 ;;
2215 uclinux-uclibc*- | uclinux-gnu*- )
2216 ;;
2217 managarm-mlibc*- | managarm-kernel*- )
2218 ;;
2219 windows*-msvc*-)
2220 ;;
2221 -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
2222 | -uclibc*- )
2223 # These are just libc implementations, not actual OSes, and thus
2224 # require a kernel.
2225 echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
2226 exit 1
2227 ;;
2228 -kernel*- )
2229 echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
2230 exit 1
2231 ;;
2232 *-kernel*- )
2233 echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
2234 exit 1
2235 ;;
2236 *-msvc*- )
2237 echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
2238 exit 1
2239 ;;
2240 kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-)
2241 ;;
2242 vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
2243 ;;
2244 nto-qnx*-)
2245 ;;
2246 os2-emx-)
2247 ;;
2248 rtmk-nova-)
2249 ;;
2250 *-eabi*- | *-gnueabi*-)
2251 ;;
2252 none--*)
2253 # None (no kernel, i.e. freestanding / bare metal),
2254 # can be paired with an machine code file format
2255 ;;
2256 -*-)
2257 # Blank kernel with real OS is always fine.
2258 ;;
2259 --*)
2260 # Blank kernel and OS with real machine code file format is always fine.
2261 ;;
2262 *-*-*)
2263 echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
2264 exit 1
2265 ;;
2266 esac
2267
2268 # Here we handle the case where we know the os, and the CPU type, but not the
@@ -1790,11 +2271,11 @@
2271 unknown)
2272 case $cpu-$os in
2273 *-riscix*)
2274 vendor=acorn
2275 ;;
2276 *-sunos* | *-solaris*)
2277 vendor=sun
2278 ;;
2279 *-cnk* | *-aix*)
2280 vendor=ibm
2281 ;;
@@ -1860,14 +2341,14 @@
2341 ;;
2342 esac
2343 ;;
2344 esac
2345
2346 echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
2347 exit
2348
2349 # Local variables:
2350 # eval: (add-hook 'before-save-hook 'time-stamp)
2351 # time-stamp-start: "timestamp='"
2352 # time-stamp-format: "%:y-%02m-%02d"
2353 # time-stamp-end: "'"
2354 # End:
2355

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button