Fossil SCM
Latest upstream autosetup (supports more environments).
Commit
921edd2e51aca6aacdcc2a9b4291a499ccd17cbffe7f639f1bed7ba3fe85f35c
Parent
5fabb7ccb7d195c…
2 files changed
+95
-28
+722
-241
+95
-28
| --- autosetup/autosetup-config.guess | ||
| +++ autosetup/autosetup-config.guess | ||
| @@ -1,16 +1,16 @@ | ||
| 1 | 1 | #! /bin/sh |
| 2 | 2 | # Attempt to guess a canonical system name. |
| 3 | -# Copyright 1992-2021 Free Software Foundation, Inc. | |
| 3 | +# Copyright 1992-2024 Free Software Foundation, Inc. | |
| 4 | 4 | |
| 5 | 5 | # shellcheck disable=SC2006,SC2268 # see below for rationale |
| 6 | 6 | |
| 7 | -timestamp='2021-06-03' | |
| 7 | +timestamp='2024-07-27' | |
| 8 | 8 | |
| 9 | 9 | # This file is free software; you can redistribute it and/or modify it |
| 10 | 10 | # under the terms of the GNU General Public License as published by |
| 11 | -# the Free Software Foundation; either version 3 of the License, or | |
| 11 | +# the Free Software Foundation, either version 3 of the License, or | |
| 12 | 12 | # (at your option) any later version. |
| 13 | 13 | # |
| 14 | 14 | # This program is distributed in the hope that it will be useful, but |
| 15 | 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -45,11 +45,11 @@ | ||
| 45 | 45 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 46 | 46 | |
| 47 | 47 | usage="\ |
| 48 | 48 | Usage: $0 [OPTION] |
| 49 | 49 | |
| 50 | -Output the configuration name of the system \`$me' is run on. | |
| 50 | +Output the configuration name of the system '$me' is run on. | |
| 51 | 51 | |
| 52 | 52 | Options: |
| 53 | 53 | -h, --help print this help, then exit |
| 54 | 54 | -t, --time-stamp print date of last modification, then exit |
| 55 | 55 | -v, --version print version number, then exit |
| @@ -58,17 +58,17 @@ | ||
| 58 | 58 | |
| 59 | 59 | version="\ |
| 60 | 60 | GNU config.guess ($timestamp) |
| 61 | 61 | |
| 62 | 62 | Originally written by Per Bothner. |
| 63 | -Copyright 1992-2021 Free Software Foundation, Inc. | |
| 63 | +Copyright 1992-2024 Free Software Foundation, Inc. | |
| 64 | 64 | |
| 65 | 65 | This is free software; see the source for copying conditions. There is NO |
| 66 | 66 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 67 | 67 | |
| 68 | 68 | help=" |
| 69 | -Try \`$me --help' for more information." | |
| 69 | +Try '$me --help' for more information." | |
| 70 | 70 | |
| 71 | 71 | # Parse command line |
| 72 | 72 | while test $# -gt 0 ; do |
| 73 | 73 | case $1 in |
| 74 | 74 | --time-stamp | --time* | -t ) |
| @@ -100,12 +100,12 @@ | ||
| 100 | 100 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
| 101 | 101 | # compiler to aid in system detection is discouraged as it requires |
| 102 | 102 | # temporary files to be created and, as you can see below, it is a |
| 103 | 103 | # headache to deal with in a portable fashion. |
| 104 | 104 | |
| 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. | |
| 107 | 107 | |
| 108 | 108 | # Portable tmp directory creation inspired by the Autoconf team. |
| 109 | 109 | |
| 110 | 110 | tmp= |
| 111 | 111 | # shellcheck disable=SC2172 |
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || |
| 122 | 122 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } |
| 123 | 123 | dummy=$tmp/dummy |
| 124 | 124 | case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in |
| 125 | 125 | ,,) echo "int x;" > "$dummy.c" |
| 126 | - for driver in cc gcc c89 c99 ; do | |
| 126 | + for driver in cc gcc c17 c99 c89 ; do | |
| 127 | 127 | if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then |
| 128 | 128 | CC_FOR_BUILD=$driver |
| 129 | 129 | break |
| 130 | 130 | fi |
| 131 | 131 | done |
| @@ -153,22 +153,28 @@ | ||
| 153 | 153 | Linux|GNU|GNU/*) |
| 154 | 154 | LIBC=unknown |
| 155 | 155 | |
| 156 | 156 | set_cc_for_build |
| 157 | 157 | cat <<-EOF > "$dummy.c" |
| 158 | + #if defined(__ANDROID__) | |
| 159 | + LIBC=android | |
| 160 | + #else | |
| 158 | 161 | #include <features.h> |
| 159 | 162 | #if defined(__UCLIBC__) |
| 160 | 163 | LIBC=uclibc |
| 161 | 164 | #elif defined(__dietlibc__) |
| 162 | 165 | LIBC=dietlibc |
| 163 | 166 | #elif defined(__GLIBC__) |
| 164 | 167 | LIBC=gnu |
| 168 | + #elif defined(__LLVM_LIBC__) | |
| 169 | + LIBC=llvm | |
| 165 | 170 | #else |
| 166 | 171 | #include <stdarg.h> |
| 167 | 172 | /* First heuristic to detect musl libc. */ |
| 168 | 173 | #ifdef __DEFINED_va_list |
| 169 | 174 | LIBC=musl |
| 175 | + #endif | |
| 170 | 176 | #endif |
| 171 | 177 | #endif |
| 172 | 178 | EOF |
| 173 | 179 | cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
| 174 | 180 | eval "$cc_set_libc" |
| @@ -435,11 +441,11 @@ | ||
| 435 | 441 | # If there is a compiler, see if it is configured for 64-bit objects. |
| 436 | 442 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
| 437 | 443 | # This test works for both compilers. |
| 438 | 444 | if test "$CC_FOR_BUILD" != no_compiler_found; then |
| 439 | 445 | 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) | \ | |
| 441 | 447 | grep IS_64BIT_ARCH >/dev/null |
| 442 | 448 | then |
| 443 | 449 | SUN_ARCH=x86_64 |
| 444 | 450 | fi |
| 445 | 451 | fi |
| @@ -457,11 +463,11 @@ | ||
| 457 | 463 | case `/usr/bin/arch -k` in |
| 458 | 464 | Series*|S4*) |
| 459 | 465 | UNAME_RELEASE=`uname -v` |
| 460 | 466 | ;; |
| 461 | 467 | 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'. | |
| 463 | 469 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` |
| 464 | 470 | GUESS=sparc-sun-sunos$SUN_REL |
| 465 | 471 | ;; |
| 466 | 472 | sun3*:SunOS:*:*) |
| 467 | 473 | GUESS=m68k-sun-sunos$UNAME_RELEASE |
| @@ -626,11 +632,12 @@ | ||
| 626 | 632 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
| 627 | 633 | set_cc_for_build |
| 628 | 634 | sed 's/^ //' << EOF > "$dummy.c" |
| 629 | 635 | #include <sys/systemcfg.h> |
| 630 | 636 | |
| 631 | - main() | |
| 637 | + int | |
| 638 | + main () | |
| 632 | 639 | { |
| 633 | 640 | if (!__power_pc()) |
| 634 | 641 | exit(1); |
| 635 | 642 | puts("powerpc-ibm-aix3.2.5"); |
| 636 | 643 | exit(0); |
| @@ -710,11 +717,12 @@ | ||
| 710 | 717 | |
| 711 | 718 | #define _HPUX_SOURCE |
| 712 | 719 | #include <stdlib.h> |
| 713 | 720 | #include <unistd.h> |
| 714 | 721 | |
| 715 | - int main () | |
| 722 | + int | |
| 723 | + main () | |
| 716 | 724 | { |
| 717 | 725 | #if defined(_SC_KERNEL_BITS) |
| 718 | 726 | long bits = sysconf(_SC_KERNEL_BITS); |
| 719 | 727 | #endif |
| 720 | 728 | long cpu = sysconf (_SC_CPU_VERSION); |
| @@ -902,11 +910,11 @@ | ||
| 902 | 910 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 903 | 911 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf |
| 904 | 912 | fi |
| 905 | 913 | ;; |
| 906 | 914 | *:FreeBSD:*:*) |
| 907 | - UNAME_PROCESSOR=`/usr/bin/uname -p` | |
| 915 | + UNAME_PROCESSOR=`uname -p` | |
| 908 | 916 | case $UNAME_PROCESSOR in |
| 909 | 917 | amd64) |
| 910 | 918 | UNAME_PROCESSOR=x86_64 ;; |
| 911 | 919 | i386) |
| 912 | 920 | UNAME_PROCESSOR=i586 ;; |
| @@ -927,10 +935,13 @@ | ||
| 927 | 935 | GUESS=$UNAME_MACHINE-pc-msys |
| 928 | 936 | ;; |
| 929 | 937 | i*:PW*:*) |
| 930 | 938 | GUESS=$UNAME_MACHINE-pc-pw32 |
| 931 | 939 | ;; |
| 940 | + *:SerenityOS:*:*) | |
| 941 | + GUESS=$UNAME_MACHINE-pc-serenity | |
| 942 | + ;; | |
| 932 | 943 | *:Interix*:*) |
| 933 | 944 | case $UNAME_MACHINE in |
| 934 | 945 | x86) |
| 935 | 946 | GUESS=i586-pc-interix$UNAME_RELEASE |
| 936 | 947 | ;; |
| @@ -961,15 +972,41 @@ | ||
| 961 | 972 | # other systems with GNU libc and userland |
| 962 | 973 | GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` |
| 963 | 974 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 964 | 975 | GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC |
| 965 | 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 | + ;; | |
| 966 | 983 | *:Minix:*:*) |
| 967 | 984 | GUESS=$UNAME_MACHINE-unknown-minix |
| 968 | 985 | ;; |
| 969 | 986 | 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 | |
| 971 | 1008 | ;; |
| 972 | 1009 | aarch64_be:Linux:*:*) |
| 973 | 1010 | UNAME_MACHINE=aarch64_be |
| 974 | 1011 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 975 | 1012 | ;; |
| @@ -1031,11 +1068,20 @@ | ||
| 1031 | 1068 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1032 | 1069 | ;; |
| 1033 | 1070 | k1om:Linux:*:*) |
| 1034 | 1071 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1035 | 1072 | ;; |
| 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:*:*) | |
| 1037 | 1083 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1038 | 1084 | ;; |
| 1039 | 1085 | m32r*:Linux:*:*) |
| 1040 | 1086 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1041 | 1087 | ;; |
| @@ -1146,20 +1192,31 @@ | ||
| 1146 | 1192 | vax:Linux:*:*) |
| 1147 | 1193 | GUESS=$UNAME_MACHINE-dec-linux-$LIBC |
| 1148 | 1194 | ;; |
| 1149 | 1195 | x86_64:Linux:*:*) |
| 1150 | 1196 | set_cc_for_build |
| 1197 | + CPU=$UNAME_MACHINE | |
| 1151 | 1198 | LIBCABI=$LIBC |
| 1152 | 1199 | 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 | |
| 1161 | 1218 | ;; |
| 1162 | 1219 | xtensa*:Linux:*:*) |
| 1163 | 1220 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1164 | 1221 | ;; |
| 1165 | 1222 | i*86:DYNIX/ptx:4*:*) |
| @@ -1175,11 +1232,11 @@ | ||
| 1175 | 1232 | # I just have to hope. -- rms. |
| 1176 | 1233 | # Use sysv4.2uw... so that sysv4* matches it. |
| 1177 | 1234 | GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION |
| 1178 | 1235 | ;; |
| 1179 | 1236 | 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 | |
| 1181 | 1238 | # is probably installed. |
| 1182 | 1239 | GUESS=$UNAME_MACHINE-pc-os2-emx |
| 1183 | 1240 | ;; |
| 1184 | 1241 | i*86:XTS-300:*:STOP) |
| 1185 | 1242 | GUESS=$UNAME_MACHINE-unknown-stop |
| @@ -1316,11 +1373,11 @@ | ||
| 1316 | 1373 | GUESS=$UNAME_MACHINE-sni-sysv4 |
| 1317 | 1374 | else |
| 1318 | 1375 | GUESS=ns32k-sni-sysv |
| 1319 | 1376 | fi |
| 1320 | 1377 | ;; |
| 1321 | - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
| 1378 | + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort | |
| 1322 | 1379 | # says <[email protected]> |
| 1323 | 1380 | GUESS=i586-unisys-sysv4 |
| 1324 | 1381 | ;; |
| 1325 | 1382 | *:UNIX_System_V:4*:FTX*) |
| 1326 | 1383 | # From Gerald Hewes <[email protected]>. |
| @@ -1362,12 +1419,15 @@ | ||
| 1362 | 1419 | GUESS=i586-pc-beos |
| 1363 | 1420 | ;; |
| 1364 | 1421 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
| 1365 | 1422 | GUESS=i586-pc-haiku |
| 1366 | 1423 | ;; |
| 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 | |
| 1369 | 1429 | ;; |
| 1370 | 1430 | SX-4:SUPER-UX:*:*) |
| 1371 | 1431 | GUESS=sx4-nec-superux$UNAME_RELEASE |
| 1372 | 1432 | ;; |
| 1373 | 1433 | SX-5:SUPER-UX:*:*) |
| @@ -1520,10 +1580,13 @@ | ||
| 1520 | 1580 | GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL |
| 1521 | 1581 | ;; |
| 1522 | 1582 | i*86:rdos:*:*) |
| 1523 | 1583 | GUESS=$UNAME_MACHINE-pc-rdos |
| 1524 | 1584 | ;; |
| 1585 | + i*86:Fiwix:*:*) | |
| 1586 | + GUESS=$UNAME_MACHINE-pc-fiwix | |
| 1587 | + ;; | |
| 1525 | 1588 | *:AROS:*:*) |
| 1526 | 1589 | GUESS=$UNAME_MACHINE-unknown-aros |
| 1527 | 1590 | ;; |
| 1528 | 1591 | x86_64:VMkernel:*:*) |
| 1529 | 1592 | GUESS=$UNAME_MACHINE-unknown-esx |
| @@ -1532,10 +1595,13 @@ | ||
| 1532 | 1595 | GUESS=x86_64-unknown-onefs |
| 1533 | 1596 | ;; |
| 1534 | 1597 | *:Unleashed:*:*) |
| 1535 | 1598 | GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE |
| 1536 | 1599 | ;; |
| 1600 | + *:Ironclad:*:*) | |
| 1601 | + GUESS=$UNAME_MACHINE-unknown-ironclad | |
| 1602 | + ;; | |
| 1537 | 1603 | esac |
| 1538 | 1604 | |
| 1539 | 1605 | # Do we have a guess based on uname results? |
| 1540 | 1606 | if test "x$GUESS" != x; then |
| 1541 | 1607 | echo "$GUESS" |
| @@ -1555,10 +1621,11 @@ | ||
| 1555 | 1621 | #if defined(_SIZE_T_) || defined(SIGLOST) |
| 1556 | 1622 | #include <sys/utsname.h> |
| 1557 | 1623 | #endif |
| 1558 | 1624 | #endif |
| 1559 | 1625 | #endif |
| 1626 | +int | |
| 1560 | 1627 | main () |
| 1561 | 1628 | { |
| 1562 | 1629 | #if defined (sony) |
| 1563 | 1630 | #if defined (MIPSEB) |
| 1564 | 1631 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
| 1565 | 1632 |
| --- 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 |
+722
-241
| --- autosetup/autosetup-config.sub | ||
| +++ autosetup/autosetup-config.sub | ||
| @@ -1,16 +1,16 @@ | ||
| 1 | 1 | #! /bin/sh |
| 2 | 2 | # Configuration validation subroutine script. |
| 3 | -# Copyright 1992-2021 Free Software Foundation, Inc. | |
| 3 | +# Copyright 1992-2024 Free Software Foundation, Inc. | |
| 4 | 4 | |
| 5 | -# shellcheck disable=SC2006,SC2268 # see below for rationale | |
| 5 | +# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale | |
| 6 | 6 | |
| 7 | -timestamp='2021-07-03' | |
| 7 | +timestamp='2024-05-27' | |
| 8 | 8 | |
| 9 | 9 | # This file is free software; you can redistribute it and/or modify it |
| 10 | 10 | # under the terms of the GNU General Public License as published by |
| 11 | -# the Free Software Foundation; either version 3 of the License, or | |
| 11 | +# the Free Software Foundation, either version 3 of the License, or | |
| 12 | 12 | # (at your option) any later version. |
| 13 | 13 | # |
| 14 | 14 | # This program is distributed in the hope that it will be useful, but |
| 15 | 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -74,17 +74,17 @@ | ||
| 74 | 74 | Report bugs and patches to <[email protected]>." |
| 75 | 75 | |
| 76 | 76 | version="\ |
| 77 | 77 | GNU config.sub ($timestamp) |
| 78 | 78 | |
| 79 | -Copyright 1992-2021 Free Software Foundation, Inc. | |
| 79 | +Copyright 1992-2024 Free Software Foundation, Inc. | |
| 80 | 80 | |
| 81 | 81 | This is free software; see the source for copying conditions. There is NO |
| 82 | 82 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 83 | 83 | |
| 84 | 84 | help=" |
| 85 | -Try \`$me --help' for more information." | |
| 85 | +Try '$me --help' for more information." | |
| 86 | 86 | |
| 87 | 87 | # Parse command line |
| 88 | 88 | while test $# -gt 0 ; do |
| 89 | 89 | case $1 in |
| 90 | 90 | --time-stamp | --time* | -t ) |
| @@ -118,19 +118,20 @@ | ||
| 118 | 118 | *) echo "$me: too many arguments$help" >&2 |
| 119 | 119 | exit 1;; |
| 120 | 120 | esac |
| 121 | 121 | |
| 122 | 122 | # Split fields of configuration type |
| 123 | -# shellcheck disable=SC2162 | |
| 123 | +saved_IFS=$IFS | |
| 124 | 124 | IFS="-" read field1 field2 field3 field4 <<EOF |
| 125 | 125 | $1 |
| 126 | 126 | EOF |
| 127 | +IFS=$saved_IFS | |
| 127 | 128 | |
| 128 | 129 | # Separate into logical components for further validation |
| 129 | 130 | case $1 in |
| 130 | 131 | *-*-*-*-*) |
| 131 | - echo Invalid configuration \`"$1"\': more than four components >&2 | |
| 132 | + echo "Invalid configuration '$1': more than four components" >&2 | |
| 132 | 133 | exit 1 |
| 133 | 134 | ;; |
| 134 | 135 | *-*-*-*) |
| 135 | 136 | basic_machine=$field1-$field2 |
| 136 | 137 | basic_os=$field3-$field4 |
| @@ -138,14 +139,25 @@ | ||
| 138 | 139 | *-*-*) |
| 139 | 140 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two |
| 140 | 141 | # parts |
| 141 | 142 | maybe_os=$field2-$field3 |
| 142 | 143 | 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-* ) | |
| 147 | 159 | basic_machine=$field1 |
| 148 | 160 | basic_os=$maybe_os |
| 149 | 161 | ;; |
| 150 | 162 | android-linux) |
| 151 | 163 | basic_machine=$field1-unknown |
| @@ -156,37 +168,105 @@ | ||
| 156 | 168 | basic_os=$field3 |
| 157 | 169 | ;; |
| 158 | 170 | esac |
| 159 | 171 | ;; |
| 160 | 172 | *-*) |
| 161 | - # A lone config we happen to match not fitting any pattern | |
| 162 | 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 | + ;; | |
| 163 | 179 | decstation-3100) |
| 164 | 180 | basic_machine=mips-dec |
| 165 | 181 | basic_os= |
| 166 | 182 | ;; |
| 167 | 183 | *-*) |
| 168 | 184 | # Second component is usually, but not always the OS |
| 169 | 185 | case $field2 in |
| 170 | - # Prevent following clause from handling this valid os | |
| 186 | + # Do not treat sunos as a manufacturer | |
| 171 | 187 | sun*os*) |
| 172 | 188 | basic_machine=$field1 |
| 173 | 189 | basic_os=$field2 |
| 174 | 190 | ;; |
| 175 | 191 | # 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) | |
| 185 | 261 | basic_machine=$field1-$field2 |
| 186 | 262 | basic_os= |
| 187 | 263 | ;; |
| 264 | + zephyr*) | |
| 265 | + basic_machine=$field1-unknown | |
| 266 | + basic_os=$field2 | |
| 267 | + ;; | |
| 188 | 268 | *) |
| 189 | 269 | basic_machine=$field1 |
| 190 | 270 | basic_os=$field2 |
| 191 | 271 | ;; |
| 192 | 272 | esac |
| @@ -263,30 +343,10 @@ | ||
| 263 | 343 | ;; |
| 264 | 344 | cegcc) |
| 265 | 345 | basic_machine=arm-unknown |
| 266 | 346 | basic_os=cegcc |
| 267 | 347 | ;; |
| 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 | 348 | cray) |
| 289 | 349 | basic_machine=j90-cray |
| 290 | 350 | basic_os=unicos |
| 291 | 351 | ;; |
| 292 | 352 | crds | unos) |
| @@ -705,13 +765,21 @@ | ||
| 705 | 765 | decsystem20* | dec20*) |
| 706 | 766 | cpu=pdp10 |
| 707 | 767 | vendor=dec |
| 708 | 768 | basic_os=tops20 |
| 709 | 769 | ;; |
| 710 | - delta | 3300 | motorola-3300 | motorola-delta \ | |
| 711 | - | 3300-motorola | delta-motorola) | |
| 770 | + delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) | |
| 712 | 771 | cpu=m68k |
| 713 | 772 | vendor=motorola |
| 714 | 773 | ;; |
| 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) | |
| 716 | 780 | cpu=m68k |
| 717 | 781 | 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 | |
| 719 | 790 | ;; |
| 720 | 791 | encore | umax | mmax) |
| 721 | 792 | cpu=ns32k |
| 722 | 793 | vendor=encore |
| 723 | 794 | ;; |
| @@ -828,22 +899,10 @@ | ||
| 828 | 899 | basic_os=newsos |
| 829 | 900 | ;; |
| 830 | 901 | next | m*-next) |
| 831 | 902 | cpu=m68k |
| 832 | 903 | 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 | 904 | ;; |
| 846 | 905 | np1) |
| 847 | 906 | cpu=np1 |
| 848 | 907 | vendor=gould |
| 849 | 908 | ;; |
| @@ -928,16 +987,17 @@ | ||
| 928 | 987 | cpu=sparc |
| 929 | 988 | vendor=`echo "$basic_machine" | sed 's/-.*//'` |
| 930 | 989 | ;; |
| 931 | 990 | |
| 932 | 991 | *-*) |
| 933 | - # shellcheck disable=SC2162 | |
| 992 | + saved_IFS=$IFS | |
| 934 | 993 | IFS="-" read cpu vendor <<EOF |
| 935 | 994 | $basic_machine |
| 936 | 995 | EOF |
| 996 | + IFS=$saved_IFS | |
| 937 | 997 | ;; |
| 938 | - # We use `pc' rather than `unknown' | |
| 998 | + # We use 'pc' rather than 'unknown' | |
| 939 | 999 | # because (1) that's what they normally are, and |
| 940 | 1000 | # (2) the word "unknown" tends to confuse beginning users. |
| 941 | 1001 | i*86 | x86_64) |
| 942 | 1002 | cpu=$basic_machine |
| 943 | 1003 | vendor=pc |
| @@ -961,19 +1021,23 @@ | ||
| 961 | 1021 | |
| 962 | 1022 | unset -v basic_machine |
| 963 | 1023 | |
| 964 | 1024 | # Decode basic machines in the full and proper CPU-Company form. |
| 965 | 1025 | 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 | + ;; | |
| 968 | 1032 | craynv-unknown) |
| 969 | 1033 | vendor=cray |
| 970 | 1034 | basic_os=${basic_os:-unicosmp} |
| 971 | 1035 | ;; |
| 972 | 1036 | c90-unknown | c90-cray) |
| 973 | 1037 | vendor=cray |
| 974 | - basic_os=${Basic_os:-unicos} | |
| 1038 | + basic_os=${basic_os:-unicos} | |
| 975 | 1039 | ;; |
| 976 | 1040 | fx80-unknown) |
| 977 | 1041 | vendor=alliant |
| 978 | 1042 | ;; |
| 979 | 1043 | romp-unknown) |
| @@ -1010,23 +1074,46 @@ | ||
| 1010 | 1074 | cpu=xps100 |
| 1011 | 1075 | vendor=honeywell |
| 1012 | 1076 | ;; |
| 1013 | 1077 | |
| 1014 | 1078 | # 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) | |
| 1018 | 1102 | basic_os=${basic_os:-bosx} |
| 1019 | 1103 | ;; |
| 1104 | + mips-sni) | |
| 1105 | + basic_os=${basic_os:-sysv4} | |
| 1106 | + ;; | |
| 1020 | 1107 | |
| 1021 | 1108 | # Here we normalize CPU types irrespective of the vendor |
| 1022 | 1109 | amd64-*) |
| 1023 | 1110 | cpu=x86_64 |
| 1024 | 1111 | ;; |
| 1025 | 1112 | blackfin-*) |
| 1026 | 1113 | cpu=bfin |
| 1027 | - basic_os=linux | |
| 1114 | + basic_os=${basic_os:-linux} | |
| 1028 | 1115 | ;; |
| 1029 | 1116 | c54x-*) |
| 1030 | 1117 | cpu=tic54x |
| 1031 | 1118 | ;; |
| 1032 | 1119 | c55x-*) |
| @@ -1045,37 +1132,34 @@ | ||
| 1045 | 1132 | ms1-*) |
| 1046 | 1133 | cpu=mt |
| 1047 | 1134 | ;; |
| 1048 | 1135 | m68knommu-*) |
| 1049 | 1136 | cpu=m68k |
| 1050 | - basic_os=linux | |
| 1137 | + basic_os=${basic_os:-linux} | |
| 1051 | 1138 | ;; |
| 1052 | 1139 | m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) |
| 1053 | 1140 | cpu=s12z |
| 1054 | 1141 | ;; |
| 1055 | 1142 | openrisc-*) |
| 1056 | 1143 | cpu=or32 |
| 1057 | 1144 | ;; |
| 1058 | 1145 | parisc-*) |
| 1059 | 1146 | cpu=hppa |
| 1060 | - basic_os=linux | |
| 1147 | + basic_os=${basic_os:-linux} | |
| 1061 | 1148 | ;; |
| 1062 | 1149 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
| 1063 | 1150 | cpu=i586 |
| 1064 | 1151 | ;; |
| 1065 | - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) | |
| 1152 | + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) | |
| 1066 | 1153 | cpu=i686 |
| 1067 | 1154 | ;; |
| 1068 | 1155 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
| 1069 | 1156 | cpu=i686 |
| 1070 | 1157 | ;; |
| 1071 | 1158 | pentium4-*) |
| 1072 | 1159 | cpu=i786 |
| 1073 | 1160 | ;; |
| 1074 | - pc98-*) | |
| 1075 | - cpu=i386 | |
| 1076 | - ;; | |
| 1077 | 1161 | ppc-* | ppcbe-*) |
| 1078 | 1162 | cpu=powerpc |
| 1079 | 1163 | ;; |
| 1080 | 1164 | ppcle-* | powerpclittle-*) |
| 1081 | 1165 | cpu=powerpcle |
| @@ -1105,17 +1189,14 @@ | ||
| 1105 | 1189 | cpu=mipstx39 |
| 1106 | 1190 | ;; |
| 1107 | 1191 | tx39el-*) |
| 1108 | 1192 | cpu=mipstx39el |
| 1109 | 1193 | ;; |
| 1110 | - x64-*) | |
| 1111 | - cpu=x86_64 | |
| 1112 | - ;; | |
| 1113 | 1194 | xscale-* | xscalee[bl]-*) |
| 1114 | 1195 | cpu=`echo "$cpu" | sed 's/^xscale/arm/'` |
| 1115 | 1196 | ;; |
| 1116 | - arm64-*) | |
| 1197 | + arm64-* | aarch64le-*) | |
| 1117 | 1198 | cpu=aarch64 |
| 1118 | 1199 | ;; |
| 1119 | 1200 | |
| 1120 | 1201 | # Recognize the canonical CPU Types that limit and/or modify the |
| 1121 | 1202 | # company names they are paired with. |
| @@ -1163,118 +1244,235 @@ | ||
| 1163 | 1244 | |
| 1164 | 1245 | *) |
| 1165 | 1246 | # Recognize the canonical CPU types that are allowed with any |
| 1166 | 1247 | # company name. |
| 1167 | 1248 | case $cpu in |
| 1168 | - 1750a | 580 \ | |
| 1249 | + 1750a \ | |
| 1250 | + | 580 \ | |
| 1251 | + | [cjt]90 \ | |
| 1169 | 1252 | | a29k \ |
| 1170 | - | aarch64 | aarch64_be \ | |
| 1253 | + | aarch64 \ | |
| 1254 | + | aarch64_be \ | |
| 1255 | + | aarch64c \ | |
| 1171 | 1256 | | 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] \ | |
| 1175 | 1267 | | am33_2.0 \ |
| 1176 | 1268 | | 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* \ | |
| 1180 | 1279 | | asmjs \ |
| 1280 | + | avr \ | |
| 1281 | + | avr32 \ | |
| 1181 | 1282 | | 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 \ | |
| 1191 | 1312 | | 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 \ | |
| 1194 | 1327 | | k1om \ |
| 1195 | - | le32 | le64 \ | |
| 1328 | + | kvx \ | |
| 1329 | + | le32 \ | |
| 1330 | + | le64 \ | |
| 1196 | 1331 | | 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* \ | |
| 1228 | 1358 | | mmix \ |
| 1229 | - | mn10200 | mn10300 \ | |
| 1359 | + | mn10200 \ | |
| 1360 | + | mn10300 \ | |
| 1230 | 1361 | | moxie \ |
| 1231 | - | mt \ | |
| 1232 | 1362 | | msp430 \ |
| 1233 | - | nds32 | nds32le | nds32be \ | |
| 1363 | + | mt \ | |
| 1364 | + | nanomips* \ | |
| 1365 | + | nds32 \ | |
| 1366 | + | nds32be \ | |
| 1367 | + | nds32le \ | |
| 1234 | 1368 | | 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 \ | |
| 1237 | 1378 | | open8 \ |
| 1238 | 1379 | | or1k* \ |
| 1239 | 1380 | | or32 \ |
| 1240 | 1381 | | orion \ |
| 1382 | + | pdp10 \ | |
| 1383 | + | pdp11 \ | |
| 1241 | 1384 | | 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 \ | |
| 1244 | 1394 | | pru \ |
| 1245 | 1395 | | 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 \ | |
| 1249 | 1407 | | 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 \ | |
| 1254 | 1427 | | sparclite \ |
| 1255 | - | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
| 1428 | + | sparcv8 \ | |
| 1429 | + | sparcv9 \ | |
| 1430 | + | sparcv9b \ | |
| 1431 | + | sparcv9v \ | |
| 1256 | 1432 | | spu \ |
| 1433 | + | sv1 \ | |
| 1434 | + | sx* \ | |
| 1257 | 1435 | | tahoe \ |
| 1258 | 1436 | | thumbv7* \ |
| 1259 | - | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
| 1437 | + | tic30 \ | |
| 1438 | + | tic4x \ | |
| 1439 | + | tic54x \ | |
| 1440 | + | tic55x \ | |
| 1441 | + | tic6x \ | |
| 1442 | + | tic80 \ | |
| 1260 | 1443 | | tron \ |
| 1261 | 1444 | | 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 \ | |
| 1263 | 1453 | | vax \ |
| 1454 | + | vc4 \ | |
| 1264 | 1455 | | visium \ |
| 1265 | 1456 | | w65 \ |
| 1266 | - | wasm32 | wasm64 \ | |
| 1457 | + | wasm32 \ | |
| 1458 | + | wasm64 \ | |
| 1267 | 1459 | | 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* \ | |
| 1270 | 1467 | | ymp \ |
| 1271 | - | z8k | z80) | |
| 1468 | + | z80 \ | |
| 1469 | + | z8k) | |
| 1272 | 1470 | ;; |
| 1273 | 1471 | |
| 1274 | 1472 | *) |
| 1275 | - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 | |
| 1473 | + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 | |
| 1276 | 1474 | exit 1 |
| 1277 | 1475 | ;; |
| 1278 | 1476 | esac |
| 1279 | 1477 | ;; |
| 1280 | 1478 | esac |
| @@ -1291,15 +1489,16 @@ | ||
| 1291 | 1489 | ;; |
| 1292 | 1490 | esac |
| 1293 | 1491 | |
| 1294 | 1492 | # Decode manufacturer-specific aliases for certain operating systems. |
| 1295 | 1493 | |
| 1296 | -if test x$basic_os != x | |
| 1494 | +if test x"$basic_os" != x | |
| 1297 | 1495 | then |
| 1298 | 1496 | |
| 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 | |
| 1300 | 1498 | # set os. |
| 1499 | +obj= | |
| 1301 | 1500 | case $basic_os in |
| 1302 | 1501 | gnu/linux*) |
| 1303 | 1502 | kernel=linux |
| 1304 | 1503 | os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` |
| 1305 | 1504 | ;; |
| @@ -1310,14 +1509,15 @@ | ||
| 1310 | 1509 | nto-qnx*) |
| 1311 | 1510 | kernel=nto |
| 1312 | 1511 | os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` |
| 1313 | 1512 | ;; |
| 1314 | 1513 | *-*) |
| 1315 | - # shellcheck disable=SC2162 | |
| 1514 | + saved_IFS=$IFS | |
| 1316 | 1515 | IFS="-" read kernel os <<EOF |
| 1317 | 1516 | $basic_os |
| 1318 | 1517 | EOF |
| 1518 | + IFS=$saved_IFS | |
| 1319 | 1519 | ;; |
| 1320 | 1520 | # Default OS when just kernel was specified |
| 1321 | 1521 | nto*) |
| 1322 | 1522 | kernel=nto |
| 1323 | 1523 | os=`echo "$basic_os" | sed -e 's|nto|qnx|'` |
| @@ -1324,10 +1524,14 @@ | ||
| 1324 | 1524 | ;; |
| 1325 | 1525 | linux*) |
| 1326 | 1526 | kernel=linux |
| 1327 | 1527 | os=`echo "$basic_os" | sed -e 's|linux|gnu|'` |
| 1328 | 1528 | ;; |
| 1529 | + managarm*) | |
| 1530 | + kernel=managarm | |
| 1531 | + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` | |
| 1532 | + ;; | |
| 1329 | 1533 | *) |
| 1330 | 1534 | kernel= |
| 1331 | 1535 | os=$basic_os |
| 1332 | 1536 | ;; |
| 1333 | 1537 | esac |
| @@ -1350,10 +1554,27 @@ | ||
| 1350 | 1554 | solaris) |
| 1351 | 1555 | os=solaris2 |
| 1352 | 1556 | ;; |
| 1353 | 1557 | unixware*) |
| 1354 | 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 | |
| 1355 | 1576 | ;; |
| 1356 | 1577 | # es1800 is here to avoid being matched by es* (a different OS) |
| 1357 | 1578 | es1800*) |
| 1358 | 1579 | os=ose |
| 1359 | 1580 | ;; |
| @@ -1421,10 +1642,11 @@ | ||
| 1421 | 1642 | wince*) |
| 1422 | 1643 | os=wince |
| 1423 | 1644 | ;; |
| 1424 | 1645 | utek*) |
| 1425 | 1646 | os=bsd |
| 1647 | + vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'` | |
| 1426 | 1648 | ;; |
| 1427 | 1649 | dynix*) |
| 1428 | 1650 | os=bsd |
| 1429 | 1651 | ;; |
| 1430 | 1652 | acis*) |
| @@ -1437,25 +1659,29 @@ | ||
| 1437 | 1659 | os=syllable |
| 1438 | 1660 | ;; |
| 1439 | 1661 | 386bsd) |
| 1440 | 1662 | os=bsd |
| 1441 | 1663 | ;; |
| 1442 | - ctix* | uts*) | |
| 1664 | + ctix*) | |
| 1665 | + os=sysv | |
| 1666 | + vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'` | |
| 1667 | + ;; | |
| 1668 | + uts*) | |
| 1443 | 1669 | os=sysv |
| 1444 | 1670 | ;; |
| 1445 | 1671 | nova*) |
| 1446 | - os=rtmk-nova | |
| 1447 | - ;; | |
| 1448 | - ns2) | |
| 1449 | - os=nextstep2 | |
| 1672 | + kernel=rtmk | |
| 1673 | + os=nova | |
| 1450 | 1674 | ;; |
| 1451 | 1675 | # Preserve the version number of sinix5. |
| 1452 | 1676 | sinix5.*) |
| 1453 | 1677 | os=`echo "$os" | sed -e 's|sinix|sysv|'` |
| 1678 | + vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'` | |
| 1454 | 1679 | ;; |
| 1455 | 1680 | sinix*) |
| 1456 | 1681 | os=sysv4 |
| 1682 | + vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'` | |
| 1457 | 1683 | ;; |
| 1458 | 1684 | tpf*) |
| 1459 | 1685 | os=tpf |
| 1460 | 1686 | ;; |
| 1461 | 1687 | triton*) |
| @@ -1489,13 +1715,19 @@ | ||
| 1489 | 1715 | case $cpu in |
| 1490 | 1716 | arm*) |
| 1491 | 1717 | os=eabi |
| 1492 | 1718 | ;; |
| 1493 | 1719 | *) |
| 1494 | - os=elf | |
| 1720 | + os= | |
| 1721 | + obj=elf | |
| 1495 | 1722 | ;; |
| 1496 | 1723 | esac |
| 1724 | + ;; | |
| 1725 | + aout* | coff* | elf* | pe*) | |
| 1726 | + # These are machine code file formats, not OSes | |
| 1727 | + obj=$os | |
| 1728 | + os= | |
| 1497 | 1729 | ;; |
| 1498 | 1730 | *) |
| 1499 | 1731 | # No normalization, but not necessarily accepted, that comes below. |
| 1500 | 1732 | ;; |
| 1501 | 1733 | esac |
| @@ -1511,47 +1743,57 @@ | ||
| 1511 | 1743 | # that MANUFACTURER isn't an operating system. Otherwise, code above |
| 1512 | 1744 | # will signal an error saying that MANUFACTURER isn't an operating |
| 1513 | 1745 | # system, and we'll never get to this point. |
| 1514 | 1746 | |
| 1515 | 1747 | kernel= |
| 1748 | +obj= | |
| 1516 | 1749 | case $cpu-$vendor in |
| 1517 | 1750 | score-*) |
| 1518 | - os=elf | |
| 1751 | + os= | |
| 1752 | + obj=elf | |
| 1519 | 1753 | ;; |
| 1520 | 1754 | spu-*) |
| 1521 | - os=elf | |
| 1755 | + os= | |
| 1756 | + obj=elf | |
| 1522 | 1757 | ;; |
| 1523 | 1758 | *-acorn) |
| 1524 | 1759 | os=riscix1.2 |
| 1525 | 1760 | ;; |
| 1526 | 1761 | arm*-rebel) |
| 1527 | 1762 | kernel=linux |
| 1528 | 1763 | os=gnu |
| 1529 | 1764 | ;; |
| 1530 | 1765 | arm*-semi) |
| 1531 | - os=aout | |
| 1766 | + os= | |
| 1767 | + obj=aout | |
| 1532 | 1768 | ;; |
| 1533 | 1769 | c4x-* | tic4x-*) |
| 1534 | - os=coff | |
| 1770 | + os= | |
| 1771 | + obj=coff | |
| 1535 | 1772 | ;; |
| 1536 | 1773 | c8051-*) |
| 1537 | - os=elf | |
| 1774 | + os= | |
| 1775 | + obj=elf | |
| 1538 | 1776 | ;; |
| 1539 | 1777 | clipper-intergraph) |
| 1540 | 1778 | os=clix |
| 1541 | 1779 | ;; |
| 1542 | 1780 | hexagon-*) |
| 1543 | - os=elf | |
| 1781 | + os= | |
| 1782 | + obj=elf | |
| 1544 | 1783 | ;; |
| 1545 | 1784 | tic54x-*) |
| 1546 | - os=coff | |
| 1785 | + os= | |
| 1786 | + obj=coff | |
| 1547 | 1787 | ;; |
| 1548 | 1788 | tic55x-*) |
| 1549 | - os=coff | |
| 1789 | + os= | |
| 1790 | + obj=coff | |
| 1550 | 1791 | ;; |
| 1551 | 1792 | tic6x-*) |
| 1552 | - os=coff | |
| 1793 | + os= | |
| 1794 | + obj=coff | |
| 1553 | 1795 | ;; |
| 1554 | 1796 | # This must come before the *-dec entry. |
| 1555 | 1797 | pdp10-*) |
| 1556 | 1798 | os=tops20 |
| 1557 | 1799 | ;; |
| @@ -1569,32 +1811,47 @@ | ||
| 1569 | 1811 | ;; |
| 1570 | 1812 | m68000-sun) |
| 1571 | 1813 | os=sunos3 |
| 1572 | 1814 | ;; |
| 1573 | 1815 | m68*-cisco) |
| 1574 | - os=aout | |
| 1816 | + os= | |
| 1817 | + obj=aout | |
| 1575 | 1818 | ;; |
| 1576 | 1819 | 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 | |
| 1578 | 1830 | ;; |
| 1579 | 1831 | mips*-cisco) |
| 1580 | - os=elf | |
| 1832 | + os= | |
| 1833 | + obj=elf | |
| 1581 | 1834 | ;; |
| 1582 | - mips*-*) | |
| 1583 | - os=elf | |
| 1835 | + mips*-*|nanomips*-*) | |
| 1836 | + os= | |
| 1837 | + obj=elf | |
| 1584 | 1838 | ;; |
| 1585 | 1839 | or32-*) |
| 1586 | - os=coff | |
| 1840 | + os= | |
| 1841 | + obj=coff | |
| 1587 | 1842 | ;; |
| 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) | |
| 1589 | 1845 | os=sysv3 |
| 1590 | 1846 | ;; |
| 1591 | 1847 | sparc-* | *-sun) |
| 1592 | 1848 | os=sunos4.1.1 |
| 1593 | 1849 | ;; |
| 1594 | 1850 | pru-*) |
| 1595 | - os=elf | |
| 1851 | + os= | |
| 1852 | + obj=elf | |
| 1596 | 1853 | ;; |
| 1597 | 1854 | *-be) |
| 1598 | 1855 | os=beos |
| 1599 | 1856 | ;; |
| 1600 | 1857 | *-ibm) |
| @@ -1614,11 +1871,11 @@ | ||
| 1614 | 1871 | ;; |
| 1615 | 1872 | *-hp) |
| 1616 | 1873 | os=hpux |
| 1617 | 1874 | ;; |
| 1618 | 1875 | *-hitachi) |
| 1619 | - os=hiux | |
| 1876 | + os=hiuxwe2 | |
| 1620 | 1877 | ;; |
| 1621 | 1878 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
| 1622 | 1879 | os=sysv |
| 1623 | 1880 | ;; |
| 1624 | 1881 | *-cbm) |
| @@ -1658,27 +1915,23 @@ | ||
| 1658 | 1915 | os=bsd |
| 1659 | 1916 | ;; |
| 1660 | 1917 | *-encore) |
| 1661 | 1918 | os=bsd |
| 1662 | 1919 | ;; |
| 1663 | - *-sgi) | |
| 1664 | - os=irix | |
| 1665 | - ;; | |
| 1666 | - *-siemens) | |
| 1667 | - os=sysv4 | |
| 1668 | - ;; | |
| 1669 | 1920 | *-masscomp) |
| 1670 | 1921 | os=rtu |
| 1671 | 1922 | ;; |
| 1672 | 1923 | f30[01]-fujitsu | f700-fujitsu) |
| 1673 | 1924 | os=uxpv |
| 1674 | 1925 | ;; |
| 1675 | 1926 | *-rom68k) |
| 1676 | - os=coff | |
| 1927 | + os= | |
| 1928 | + obj=coff | |
| 1677 | 1929 | ;; |
| 1678 | 1930 | *-*bug) |
| 1679 | - os=coff | |
| 1931 | + os= | |
| 1932 | + obj=coff | |
| 1680 | 1933 | ;; |
| 1681 | 1934 | *-apple) |
| 1682 | 1935 | os=macos |
| 1683 | 1936 | ;; |
| 1684 | 1937 | *-atari*) |
| @@ -1692,96 +1945,324 @@ | ||
| 1692 | 1945 | ;; |
| 1693 | 1946 | esac |
| 1694 | 1947 | |
| 1695 | 1948 | fi |
| 1696 | 1949 | |
| 1697 | -# Now, validate our (potentially fixed-up) OS. | |
| 1950 | +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). | |
| 1951 | + | |
| 1698 | 1952 | case $os in |
| 1699 | 1953 | # Sometimes we do "kernel-libc", so those need to count as OSes. |
| 1700 | - musl* | newlib* | uclibc*) | |
| 1954 | + llvm* | musl* | newlib* | relibc* | uclibc*) | |
| 1701 | 1955 | ;; |
| 1702 | 1956 | # Likewise for "kernel-abi" |
| 1703 | 1957 | eabi* | gnueabi*) |
| 1704 | 1958 | ;; |
| 1705 | 1959 | # VxWorks passes extra cpu info in the 4th filed. |
| 1706 | 1960 | simlinux | simwindows | spe) |
| 1961 | + ;; | |
| 1962 | + # See `case $cpu-$os` validation below | |
| 1963 | + ghcjs) | |
| 1707 | 1964 | ;; |
| 1708 | 1965 | # Now accept the basic system types. |
| 1709 | - # The portable systems comes first. | |
| 1710 | 1966 | # 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* ) | |
| 1742 | 2153 | ;; |
| 1743 | 2154 | # This one is extra strict with allowed versions |
| 1744 | 2155 | sco3.2v2 | sco3.2v[4-9]* | sco5v6*) |
| 1745 | 2156 | # Don't forget version if it is 3.2v4 or newer. |
| 1746 | 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 | + ;; | |
| 1747 | 2165 | none) |
| 1748 | 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 | + ;; | |
| 1749 | 2188 | *) |
| 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 | |
| 1751 | 2204 | exit 1 |
| 1752 | 2205 | ;; |
| 1753 | 2206 | esac |
| 1754 | 2207 | |
| 1755 | 2208 | # As a final step for OS-related things, validate the OS-kernel combination |
| 1756 | 2209 | # (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*- ) | |
| 1759 | 2218 | ;; |
| 1760 | - uclinux-uclibc* ) | |
| 2219 | + windows*-msvc*-) | |
| 1761 | 2220 | ;; |
| 1762 | - -dietlibc* | -newlib* | -musl* | -uclibc* ) | |
| 2221 | + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ | |
| 2222 | + | -uclibc*- ) | |
| 1763 | 2223 | # These are just libc implementations, not actual OSes, and thus |
| 1764 | 2224 | # 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 | |
| 1766 | 2238 | exit 1 |
| 1767 | 2239 | ;; |
| 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 | + -*-) | |
| 1779 | 2257 | # Blank kernel with real OS is always fine. |
| 1780 | 2258 | ;; |
| 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 | |
| 1783 | 2264 | exit 1 |
| 1784 | 2265 | ;; |
| 1785 | 2266 | esac |
| 1786 | 2267 | |
| 1787 | 2268 | # Here we handle the case where we know the os, and the CPU type, but not the |
| @@ -1790,11 +2271,11 @@ | ||
| 1790 | 2271 | unknown) |
| 1791 | 2272 | case $cpu-$os in |
| 1792 | 2273 | *-riscix*) |
| 1793 | 2274 | vendor=acorn |
| 1794 | 2275 | ;; |
| 1795 | - *-sunos*) | |
| 2276 | + *-sunos* | *-solaris*) | |
| 1796 | 2277 | vendor=sun |
| 1797 | 2278 | ;; |
| 1798 | 2279 | *-cnk* | *-aix*) |
| 1799 | 2280 | vendor=ibm |
| 1800 | 2281 | ;; |
| @@ -1860,14 +2341,14 @@ | ||
| 1860 | 2341 | ;; |
| 1861 | 2342 | esac |
| 1862 | 2343 | ;; |
| 1863 | 2344 | esac |
| 1864 | 2345 | |
| 1865 | -echo "$cpu-$vendor-${kernel:+$kernel-}$os" | |
| 2346 | +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" | |
| 1866 | 2347 | exit |
| 1867 | 2348 | |
| 1868 | 2349 | # Local variables: |
| 1869 | 2350 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1870 | 2351 | # time-stamp-start: "timestamp='" |
| 1871 | 2352 | # time-stamp-format: "%:y-%02m-%02d" |
| 1872 | 2353 | # time-stamp-end: "'" |
| 1873 | 2354 | # End: |
| 1874 | 2355 |
| --- 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 |