The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update config.guess and config.sub

To version 2020-07-12 from git://git.savannah.gnu.org/config.git
This adds support for iOS/macOS AArch64.

+1600 -1343
+296 -89
build-aux/config.guess
··· 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 - # Copyright 1992-2018 Free Software Foundation, Inc. 3 + # Copyright 1992-2020 Free Software Foundation, Inc. 4 4 5 - timestamp='2018-02-24' 5 + timestamp='2020-07-12' 6 6 7 7 # This file is free software; you can redistribute it and/or modify it 8 8 # under the terms of the GNU General Public License as published by ··· 50 50 GNU config.guess ($timestamp) 51 51 52 52 Originally written by Per Bothner. 53 - Copyright 1992-2018 Free Software Foundation, Inc. 53 + Copyright 1992-2020 Free Software Foundation, Inc. 54 54 55 55 This is free software; see the source for copying conditions. There is NO 56 56 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ··· 84 84 exit 1 85 85 fi 86 86 87 - trap 'exit 1' 1 2 15 88 - 89 87 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90 88 # compiler to aid in system detection is discouraged as it requires 91 89 # temporary files to be created and, as you can see below, it is a ··· 96 94 97 95 # Portable tmp directory creation inspired by the Autoconf team. 98 96 99 - set_cc_for_build=' 100 - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101 - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102 - : ${TMPDIR=/tmp} ; 103 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104 - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105 - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106 - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107 - dummy=$tmp/dummy ; 108 - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109 - case $CC_FOR_BUILD,$HOST_CC,$CC in 110 - ,,) echo "int x;" > "$dummy.c" ; 111 - for c in cc gcc c89 c99 ; do 112 - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then 113 - CC_FOR_BUILD="$c"; break ; 114 - fi ; 115 - done ; 116 - if test x"$CC_FOR_BUILD" = x ; then 117 - CC_FOR_BUILD=no_compiler_found ; 118 - fi 119 - ;; 120 - ,,*) CC_FOR_BUILD=$CC ;; 121 - ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122 - esac ; set_cc_for_build= ;' 97 + tmp= 98 + # shellcheck disable=SC2172 99 + trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 100 + 101 + set_cc_for_build() { 102 + # prevent multiple calls if $tmp is already set 103 + test "$tmp" && return 0 104 + : "${TMPDIR=/tmp}" 105 + # shellcheck disable=SC2039 106 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 107 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || 108 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || 109 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } 110 + dummy=$tmp/dummy 111 + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in 112 + ,,) echo "int x;" > "$dummy.c" 113 + for driver in cc gcc c89 c99 ; do 114 + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then 115 + CC_FOR_BUILD="$driver" 116 + break 117 + fi 118 + done 119 + if test x"$CC_FOR_BUILD" = x ; then 120 + CC_FOR_BUILD=no_compiler_found 121 + fi 122 + ;; 123 + ,,*) CC_FOR_BUILD=$CC ;; 124 + ,*,*) CC_FOR_BUILD=$HOST_CC ;; 125 + esac 126 + } 123 127 124 128 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125 129 # (ghazi@noc.rutgers.edu 1994-08-24) 126 - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 130 + if test -f /.attbin/uname ; then 127 131 PATH=$PATH:/.attbin ; export PATH 128 132 fi 129 133 ··· 138 142 # We could probably try harder. 139 143 LIBC=gnu 140 144 141 - eval "$set_cc_for_build" 145 + set_cc_for_build 142 146 cat <<-EOF > "$dummy.c" 143 147 #include <features.h> 144 148 #if defined(__UCLIBC__) ··· 199 203 os=netbsdelf 200 204 ;; 201 205 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 202 - eval "$set_cc_for_build" 206 + set_cc_for_build 203 207 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 204 208 | grep -q __ELF__ 205 209 then ··· 237 241 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 238 242 # contains redundant information, the shorter form: 239 243 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 240 - echo "$machine-${os}${release}${abi}" 244 + echo "$machine-${os}${release}${abi-}" 241 245 exit ;; 242 246 *:Bitrig:*:*) 243 247 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ··· 259 263 exit ;; 260 264 *:SolidBSD:*:*) 261 265 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" 266 + exit ;; 267 + *:OS108:*:*) 268 + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" 262 269 exit ;; 263 270 macppc:MirBSD:*:*) 264 271 echo powerpc-unknown-mirbsd"$UNAME_RELEASE" ··· 269 276 *:Sortix:*:*) 270 277 echo "$UNAME_MACHINE"-unknown-sortix 271 278 exit ;; 279 + *:Twizzler:*:*) 280 + echo "$UNAME_MACHINE"-unknown-twizzler 281 + exit ;; 272 282 *:Redox:*:*) 273 283 echo "$UNAME_MACHINE"-unknown-redox 274 284 exit ;; 275 285 mips:OSF1:*.*) 276 - echo mips-dec-osf1 277 - exit ;; 286 + echo mips-dec-osf1 287 + exit ;; 278 288 alpha:OSF1:*:*) 279 289 case $UNAME_RELEASE in 280 290 *4.0) ··· 389 399 echo i386-pc-auroraux"$UNAME_RELEASE" 390 400 exit ;; 391 401 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 392 - eval "$set_cc_for_build" 402 + set_cc_for_build 393 403 SUN_ARCH=i386 394 404 # If there is a compiler, see if it is configured for 64-bit objects. 395 405 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ··· 482 492 echo clipper-intergraph-clix"$UNAME_RELEASE" 483 493 exit ;; 484 494 mips:*:*:UMIPS | mips:*:*:RISCos) 485 - eval "$set_cc_for_build" 495 + set_cc_for_build 486 496 sed 's/^ //' << EOF > "$dummy.c" 487 497 #ifdef __cplusplus 488 498 #include <stdio.h> /* for printf() prototype */ ··· 579 589 exit ;; 580 590 *:AIX:2:3) 581 591 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 582 - eval "$set_cc_for_build" 592 + set_cc_for_build 583 593 sed 's/^ //' << EOF > "$dummy.c" 584 594 #include <sys/systemcfg.h> 585 595 ··· 660 670 esac 661 671 fi 662 672 if [ "$HP_ARCH" = "" ]; then 663 - eval "$set_cc_for_build" 673 + set_cc_for_build 664 674 sed 's/^ //' << EOF > "$dummy.c" 665 675 666 676 #define _HPUX_SOURCE ··· 700 710 esac 701 711 if [ "$HP_ARCH" = hppa2.0w ] 702 712 then 703 - eval "$set_cc_for_build" 713 + set_cc_for_build 704 714 705 715 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 706 716 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ··· 726 736 echo ia64-hp-hpux"$HPUX_REV" 727 737 exit ;; 728 738 3050*:HI-UX:*:*) 729 - eval "$set_cc_for_build" 739 + set_cc_for_build 730 740 sed 's/^ //' << EOF > "$dummy.c" 731 741 #include <unistd.h> 732 742 int ··· 840 850 *:BSD/OS:*:*) 841 851 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" 842 852 exit ;; 853 + arm:FreeBSD:*:*) 854 + UNAME_PROCESSOR=`uname -p` 855 + set_cc_for_build 856 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 857 + | grep -q __ARM_PCS_VFP 858 + then 859 + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi 860 + else 861 + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf 862 + fi 863 + exit ;; 843 864 *:FreeBSD:*:*) 844 865 UNAME_PROCESSOR=`/usr/bin/uname -p` 845 866 case "$UNAME_PROCESSOR" in ··· 881 902 echo "$UNAME_MACHINE"-pc-uwin 882 903 exit ;; 883 904 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 884 - echo x86_64-unknown-cygwin 905 + echo x86_64-pc-cygwin 885 906 exit ;; 886 907 prep*:SunOS:5.*:*) 887 908 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" ··· 894 915 # other systems with GNU libc and userland 895 916 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" 896 917 exit ;; 897 - i*86:Minix:*:*) 898 - echo "$UNAME_MACHINE"-pc-minix 918 + *:Minix:*:*) 919 + echo "$UNAME_MACHINE"-unknown-minix 899 920 exit ;; 900 921 aarch64:Linux:*:*) 901 922 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ··· 905 926 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 906 927 exit ;; 907 928 alpha:Linux:*:*) 908 - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 929 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in 909 930 EV5) UNAME_MACHINE=alphaev5 ;; 910 931 EV56) UNAME_MACHINE=alphaev56 ;; 911 932 PCA56) UNAME_MACHINE=alphapca56 ;; ··· 922 943 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 923 944 exit ;; 924 945 arm*:Linux:*:*) 925 - eval "$set_cc_for_build" 946 + set_cc_for_build 926 947 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 927 948 | grep -q __ARM_EABI__ 928 949 then ··· 971 992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 972 993 exit ;; 973 994 mips:Linux:*:* | mips64:Linux:*:*) 974 - eval "$set_cc_for_build" 995 + set_cc_for_build 996 + IS_GLIBC=0 997 + test x"${LIBC}" = xgnu && IS_GLIBC=1 975 998 sed 's/^ //' << EOF > "$dummy.c" 976 999 #undef CPU 977 - #undef ${UNAME_MACHINE} 978 - #undef ${UNAME_MACHINE}el 1000 + #undef mips 1001 + #undef mipsel 1002 + #undef mips64 1003 + #undef mips64el 1004 + #if ${IS_GLIBC} && defined(_ABI64) 1005 + LIBCABI=gnuabi64 1006 + #else 1007 + #if ${IS_GLIBC} && defined(_ABIN32) 1008 + LIBCABI=gnuabin32 1009 + #else 1010 + LIBCABI=${LIBC} 1011 + #endif 1012 + #endif 1013 + 1014 + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 1015 + CPU=mipsisa64r6 1016 + #else 1017 + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 1018 + CPU=mipsisa32r6 1019 + #else 1020 + #if defined(__mips64) 1021 + CPU=mips64 1022 + #else 1023 + CPU=mips 1024 + #endif 1025 + #endif 1026 + #endif 1027 + 979 1028 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 980 - CPU=${UNAME_MACHINE}el 1029 + MIPS_ENDIAN=el 981 1030 #else 982 1031 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 983 - CPU=${UNAME_MACHINE} 1032 + MIPS_ENDIAN= 984 1033 #else 985 - CPU= 1034 + MIPS_ENDIAN= 986 1035 #endif 987 1036 #endif 988 1037 EOF 989 - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" 990 - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } 1038 + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" 1039 + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } 991 1040 ;; 992 1041 mips64el:Linux:*:*) 993 1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ··· 1046 1095 echo "$UNAME_MACHINE"-dec-linux-"$LIBC" 1047 1096 exit ;; 1048 1097 x86_64:Linux:*:*) 1049 - if objdump -f /bin/sh | grep -q elf32-x86-64; then 1050 - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 1051 - else 1052 - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" 1098 + set_cc_for_build 1099 + LIBCABI=$LIBC 1100 + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 1101 + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ 1102 + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1103 + grep IS_X32 >/dev/null 1104 + then 1105 + LIBCABI="$LIBC"x32 1106 + fi 1053 1107 fi 1108 + echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" 1054 1109 exit ;; 1055 1110 xtensa*:Linux:*:*) 1056 1111 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ··· 1104 1159 *Pentium) UNAME_MACHINE=i586 ;; 1105 1160 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1106 1161 esac 1107 - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" 1162 + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" 1108 1163 exit ;; 1109 1164 i*86:*:3.2:*) 1110 1165 if test -f /usr/options/cb.name; then ··· 1287 1342 *:Rhapsody:*:*) 1288 1343 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" 1289 1344 exit ;; 1345 + arm64:Darwin:*:*) 1346 + echo aarch64-apple-darwin"$UNAME_RELEASE" 1347 + exit ;; 1290 1348 *:Darwin:*:*) 1291 - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1292 - eval "$set_cc_for_build" 1293 - if test "$UNAME_PROCESSOR" = unknown ; then 1294 - UNAME_PROCESSOR=powerpc 1349 + UNAME_PROCESSOR=`uname -p` 1350 + case $UNAME_PROCESSOR in 1351 + unknown) UNAME_PROCESSOR=powerpc ;; 1352 + esac 1353 + if command -v xcode-select > /dev/null 2> /dev/null && \ 1354 + ! xcode-select --print-path > /dev/null 2> /dev/null ; then 1355 + # Avoid executing cc if there is no toolchain installed as 1356 + # cc will be a stub that puts up a graphical alert 1357 + # prompting the user to install developer tools. 1358 + CC_FOR_BUILD=no_compiler_found 1359 + else 1360 + set_cc_for_build 1295 1361 fi 1296 - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then 1297 - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 1298 - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1299 - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1300 - grep IS_64BIT_ARCH >/dev/null 1301 - then 1302 - case $UNAME_PROCESSOR in 1303 - i386) UNAME_PROCESSOR=x86_64 ;; 1304 - powerpc) UNAME_PROCESSOR=powerpc64 ;; 1305 - esac 1306 - fi 1307 - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc 1308 - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ 1309 - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1310 - grep IS_PPC >/dev/null 1311 - then 1312 - UNAME_PROCESSOR=powerpc 1313 - fi 1362 + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 1363 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1364 + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1365 + grep IS_64BIT_ARCH >/dev/null 1366 + then 1367 + case $UNAME_PROCESSOR in 1368 + i386) UNAME_PROCESSOR=x86_64 ;; 1369 + powerpc) UNAME_PROCESSOR=powerpc64 ;; 1370 + esac 1371 + fi 1372 + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc 1373 + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ 1374 + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1375 + grep IS_PPC >/dev/null 1376 + then 1377 + UNAME_PROCESSOR=powerpc 1314 1378 fi 1315 1379 elif test "$UNAME_PROCESSOR" = i386 ; then 1316 - # Avoid executing cc on OS X 10.9, as it ships with a stub 1317 - # that puts up a graphical alert prompting to install 1318 - # developer tools. Any system running Mac OS X 10.7 or 1319 - # later (Darwin 11 and later) is required to have a 64-bit 1320 - # processor. This is not true of the ARM version of Darwin 1321 - # that Apple uses in portable devices. 1322 - UNAME_PROCESSOR=x86_64 1380 + # uname -m returns i386 or x86_64 1381 + UNAME_PROCESSOR=$UNAME_MACHINE 1323 1382 fi 1324 1383 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" 1325 1384 exit ;; ··· 1362 1421 # "uname -m" is not consistent, so use $cputype instead. 386 1363 1422 # is converted to i386 for consistency with other x86 1364 1423 # operating systems. 1424 + # shellcheck disable=SC2154 1365 1425 if test "$cputype" = 386; then 1366 1426 UNAME_MACHINE=i386 1367 1427 else ··· 1418 1478 amd64:Isilon\ OneFS:*:*) 1419 1479 echo x86_64-unknown-onefs 1420 1480 exit ;; 1481 + *:Unleashed:*:*) 1482 + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" 1483 + exit ;; 1421 1484 esac 1422 1485 1486 + # No uname command or uname output not recognized. 1487 + set_cc_for_build 1488 + cat > "$dummy.c" <<EOF 1489 + #ifdef _SEQUENT_ 1490 + #include <sys/types.h> 1491 + #include <sys/utsname.h> 1492 + #endif 1493 + #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) 1494 + #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) 1495 + #include <signal.h> 1496 + #if defined(_SIZE_T_) || defined(SIGLOST) 1497 + #include <sys/utsname.h> 1498 + #endif 1499 + #endif 1500 + #endif 1501 + main () 1502 + { 1503 + #if defined (sony) 1504 + #if defined (MIPSEB) 1505 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1506 + I don't know.... */ 1507 + printf ("mips-sony-bsd\n"); exit (0); 1508 + #else 1509 + #include <sys/param.h> 1510 + printf ("m68k-sony-newsos%s\n", 1511 + #ifdef NEWSOS4 1512 + "4" 1513 + #else 1514 + "" 1515 + #endif 1516 + ); exit (0); 1517 + #endif 1518 + #endif 1519 + 1520 + #if defined (NeXT) 1521 + #if !defined (__ARCHITECTURE__) 1522 + #define __ARCHITECTURE__ "m68k" 1523 + #endif 1524 + int version; 1525 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1526 + if (version < 4) 1527 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1528 + else 1529 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1530 + exit (0); 1531 + #endif 1532 + 1533 + #if defined (MULTIMAX) || defined (n16) 1534 + #if defined (UMAXV) 1535 + printf ("ns32k-encore-sysv\n"); exit (0); 1536 + #else 1537 + #if defined (CMU) 1538 + printf ("ns32k-encore-mach\n"); exit (0); 1539 + #else 1540 + printf ("ns32k-encore-bsd\n"); exit (0); 1541 + #endif 1542 + #endif 1543 + #endif 1544 + 1545 + #if defined (__386BSD__) 1546 + printf ("i386-pc-bsd\n"); exit (0); 1547 + #endif 1548 + 1549 + #if defined (sequent) 1550 + #if defined (i386) 1551 + printf ("i386-sequent-dynix\n"); exit (0); 1552 + #endif 1553 + #if defined (ns32000) 1554 + printf ("ns32k-sequent-dynix\n"); exit (0); 1555 + #endif 1556 + #endif 1557 + 1558 + #if defined (_SEQUENT_) 1559 + struct utsname un; 1560 + 1561 + uname(&un); 1562 + if (strncmp(un.version, "V2", 2) == 0) { 1563 + printf ("i386-sequent-ptx2\n"); exit (0); 1564 + } 1565 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1566 + printf ("i386-sequent-ptx1\n"); exit (0); 1567 + } 1568 + printf ("i386-sequent-ptx\n"); exit (0); 1569 + #endif 1570 + 1571 + #if defined (vax) 1572 + #if !defined (ultrix) 1573 + #include <sys/param.h> 1574 + #if defined (BSD) 1575 + #if BSD == 43 1576 + printf ("vax-dec-bsd4.3\n"); exit (0); 1577 + #else 1578 + #if BSD == 199006 1579 + printf ("vax-dec-bsd4.3reno\n"); exit (0); 1580 + #else 1581 + printf ("vax-dec-bsd\n"); exit (0); 1582 + #endif 1583 + #endif 1584 + #else 1585 + printf ("vax-dec-bsd\n"); exit (0); 1586 + #endif 1587 + #else 1588 + #if defined(_SIZE_T_) || defined(SIGLOST) 1589 + struct utsname un; 1590 + uname (&un); 1591 + printf ("vax-dec-ultrix%s\n", un.release); exit (0); 1592 + #else 1593 + printf ("vax-dec-ultrix\n"); exit (0); 1594 + #endif 1595 + #endif 1596 + #endif 1597 + #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) 1598 + #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) 1599 + #if defined(_SIZE_T_) || defined(SIGLOST) 1600 + struct utsname *un; 1601 + uname (&un); 1602 + printf ("mips-dec-ultrix%s\n", un.release); exit (0); 1603 + #else 1604 + printf ("mips-dec-ultrix\n"); exit (0); 1605 + #endif 1606 + #endif 1607 + #endif 1608 + 1609 + #if defined (alliant) && defined (i860) 1610 + printf ("i860-alliant-bsd\n"); exit (0); 1611 + #endif 1612 + 1613 + exit (1); 1614 + } 1615 + EOF 1616 + 1617 + $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && 1618 + { echo "$SYSTEM_NAME"; exit; } 1619 + 1620 + # Apollos put the system type in the environment. 1621 + test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } 1622 + 1423 1623 echo "$0: unable to guess system type" >&2 1424 1624 1425 1625 case "$UNAME_MACHINE:$UNAME_SYSTEM" in ··· 1442 1642 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 1443 1643 and 1444 1644 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 1645 + EOF 1646 + 1647 + year=`echo $timestamp | sed 's,-.*,,'` 1648 + # shellcheck disable=SC2003 1649 + if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then 1650 + cat >&2 <<EOF 1445 1651 1446 1652 If $0 has already been updated, send the following data and any 1447 1653 information you think might be pertinent to config-patches@gnu.org to ··· 1469 1675 UNAME_SYSTEM = "$UNAME_SYSTEM" 1470 1676 UNAME_VERSION = "$UNAME_VERSION" 1471 1677 EOF 1678 + fi 1472 1679 1473 1680 exit 1 1474 1681 1475 1682 # Local variables: 1476 - # eval: (add-hook 'write-file-functions 'time-stamp) 1683 + # eval: (add-hook 'before-save-hook 'time-stamp) 1477 1684 # time-stamp-start: "timestamp='" 1478 1685 # time-stamp-format: "%:y-%02m-%02d" 1479 1686 # time-stamp-end: "'"
+1304 -1254
build-aux/config.sub
··· 1 1 #! /bin/sh 2 2 # Configuration validation subroutine script. 3 - # Copyright 1992-2018 Free Software Foundation, Inc. 3 + # Copyright 1992-2020 Free Software Foundation, Inc. 4 4 5 - timestamp='2018-02-22' 5 + timestamp='2020-07-10' 6 6 7 7 # This file is free software; you can redistribute it and/or modify it 8 8 # under the terms of the GNU General Public License as published by ··· 67 67 version="\ 68 68 GNU config.sub ($timestamp) 69 69 70 - Copyright 1992-2018 Free Software Foundation, Inc. 70 + Copyright 1992-2020 Free Software Foundation, Inc. 71 71 72 72 This is free software; see the source for copying conditions. There is NO 73 73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ··· 89 89 - ) # Use stdin as input. 90 90 break ;; 91 91 -* ) 92 - echo "$me: invalid option $1$help" 92 + echo "$me: invalid option $1$help" >&2 93 93 exit 1 ;; 94 94 95 95 *local*) ··· 110 110 exit 1;; 111 111 esac 112 112 113 - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 114 - # Here we must recognize all the valid KERNEL-OS combinations. 115 - maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 116 - case $maybe_os in 117 - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 118 - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 119 - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 120 - kopensolaris*-gnu* | cloudabi*-eabi* | \ 121 - storm-chaos* | os2-emx* | rtmk-nova*) 122 - os=-$maybe_os 123 - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 124 - ;; 125 - android-linux) 126 - os=-linux-android 127 - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 128 - ;; 129 - *) 130 - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` 131 - if [ "$basic_machine" != "$1" ] 132 - then os=`echo "$1" | sed 's/.*-/-/'` 133 - else os=; fi 134 - ;; 135 - esac 113 + # Split fields of configuration type 114 + # shellcheck disable=SC2162 115 + IFS="-" read field1 field2 field3 field4 <<EOF 116 + $1 117 + EOF 136 118 137 - ### Let's recognize common machines as not being operating systems so 138 - ### that things like config.sub decstation-3100 work. We also 139 - ### recognize some manufacturers as not being operating systems, so we 140 - ### can provide default operating systems below. 141 - case $os in 142 - -sun*os*) 143 - # Prevent following clause from handling this invalid input. 144 - ;; 145 - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 146 - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 147 - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 148 - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 149 - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 150 - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 151 - -apple | -axis | -knuth | -cray | -microblaze*) 152 - os= 153 - basic_machine=$1 154 - ;; 155 - -bluegene*) 156 - os=-cnk 157 - ;; 158 - -sim | -cisco | -oki | -wec | -winbond) 159 - os= 160 - basic_machine=$1 161 - ;; 162 - -scout) 163 - ;; 164 - -wrs) 165 - os=-vxworks 166 - basic_machine=$1 167 - ;; 168 - -chorusos*) 169 - os=-chorusos 170 - basic_machine=$1 171 - ;; 172 - -chorusrdb) 173 - os=-chorusrdb 174 - basic_machine=$1 175 - ;; 176 - -hiux*) 177 - os=-hiuxwe2 178 - ;; 179 - -sco6) 180 - os=-sco5v6 181 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 182 - ;; 183 - -sco5) 184 - os=-sco3.2v5 185 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 186 - ;; 187 - -sco4) 188 - os=-sco3.2v4 189 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 190 - ;; 191 - -sco3.2.[4-9]*) 192 - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 193 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 194 - ;; 195 - -sco3.2v[4-9]*) 196 - # Don't forget version if it is 3.2v4 or newer. 197 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 198 - ;; 199 - -sco5v6*) 200 - # Don't forget version if it is 3.2v4 or newer. 201 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 202 - ;; 203 - -sco*) 204 - os=-sco3.2v2 205 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 206 - ;; 207 - -udk*) 208 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 209 - ;; 210 - -isc) 211 - os=-isc2.2 212 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 213 - ;; 214 - -clix*) 215 - basic_machine=clipper-intergraph 119 + # Separate into logical components for further validation 120 + case $1 in 121 + *-*-*-*-*) 122 + echo Invalid configuration \`"$1"\': more than four components >&2 123 + exit 1 216 124 ;; 217 - -isc*) 218 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 125 + *-*-*-*) 126 + basic_machine=$field1-$field2 127 + basic_os=$field3-$field4 219 128 ;; 220 - -lynx*178) 221 - os=-lynxos178 129 + *-*-*) 130 + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two 131 + # parts 132 + maybe_os=$field2-$field3 133 + case $maybe_os in 134 + nto-qnx* | linux-* | uclinux-uclibc* \ 135 + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ 136 + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ 137 + | storm-chaos* | os2-emx* | rtmk-nova*) 138 + basic_machine=$field1 139 + basic_os=$maybe_os 140 + ;; 141 + android-linux) 142 + basic_machine=$field1-unknown 143 + basic_os=linux-android 144 + ;; 145 + *) 146 + basic_machine=$field1-$field2 147 + basic_os=$field3 148 + ;; 149 + esac 222 150 ;; 223 - -lynx*5) 224 - os=-lynxos5 151 + *-*) 152 + # A lone config we happen to match not fitting any pattern 153 + case $field1-$field2 in 154 + decstation-3100) 155 + basic_machine=mips-dec 156 + basic_os= 157 + ;; 158 + *-*) 159 + # Second component is usually, but not always the OS 160 + case $field2 in 161 + # Prevent following clause from handling this valid os 162 + sun*os*) 163 + basic_machine=$field1 164 + basic_os=$field2 165 + ;; 166 + # Manufacturers 167 + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ 168 + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ 169 + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ 170 + | convergent* | ncr* | news | 32* | 3600* | 3100* \ 171 + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ 172 + | ultra | tti* | harris | dolphin | highlevel | gould \ 173 + | cbm | ns | masscomp | apple | axis | knuth | cray \ 174 + | microblaze* | sim | cisco \ 175 + | oki | wec | wrs | winbond) 176 + basic_machine=$field1-$field2 177 + basic_os= 178 + ;; 179 + *) 180 + basic_machine=$field1 181 + basic_os=$field2 182 + ;; 183 + esac 184 + ;; 185 + esac 225 186 ;; 226 - -lynx*) 227 - os=-lynxos 228 - ;; 229 - -ptx*) 230 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` 231 - ;; 232 - -psos*) 233 - os=-psos 234 - ;; 235 - -mint | -mint[0-9]*) 236 - basic_machine=m68k-atari 237 - os=-mint 187 + *) 188 + # Convert single-component short-hands not valid as part of 189 + # multi-component configurations. 190 + case $field1 in 191 + 386bsd) 192 + basic_machine=i386-pc 193 + basic_os=bsd 194 + ;; 195 + a29khif) 196 + basic_machine=a29k-amd 197 + basic_os=udi 198 + ;; 199 + adobe68k) 200 + basic_machine=m68010-adobe 201 + basic_os=scout 202 + ;; 203 + alliant) 204 + basic_machine=fx80-alliant 205 + basic_os= 206 + ;; 207 + altos | altos3068) 208 + basic_machine=m68k-altos 209 + basic_os= 210 + ;; 211 + am29k) 212 + basic_machine=a29k-none 213 + basic_os=bsd 214 + ;; 215 + amdahl) 216 + basic_machine=580-amdahl 217 + basic_os=sysv 218 + ;; 219 + amiga) 220 + basic_machine=m68k-unknown 221 + basic_os= 222 + ;; 223 + amigaos | amigados) 224 + basic_machine=m68k-unknown 225 + basic_os=amigaos 226 + ;; 227 + amigaunix | amix) 228 + basic_machine=m68k-unknown 229 + basic_os=sysv4 230 + ;; 231 + apollo68) 232 + basic_machine=m68k-apollo 233 + basic_os=sysv 234 + ;; 235 + apollo68bsd) 236 + basic_machine=m68k-apollo 237 + basic_os=bsd 238 + ;; 239 + aros) 240 + basic_machine=i386-pc 241 + basic_os=aros 242 + ;; 243 + aux) 244 + basic_machine=m68k-apple 245 + basic_os=aux 246 + ;; 247 + balance) 248 + basic_machine=ns32k-sequent 249 + basic_os=dynix 250 + ;; 251 + blackfin) 252 + basic_machine=bfin-unknown 253 + basic_os=linux 254 + ;; 255 + cegcc) 256 + basic_machine=arm-unknown 257 + basic_os=cegcc 258 + ;; 259 + convex-c1) 260 + basic_machine=c1-convex 261 + basic_os=bsd 262 + ;; 263 + convex-c2) 264 + basic_machine=c2-convex 265 + basic_os=bsd 266 + ;; 267 + convex-c32) 268 + basic_machine=c32-convex 269 + basic_os=bsd 270 + ;; 271 + convex-c34) 272 + basic_machine=c34-convex 273 + basic_os=bsd 274 + ;; 275 + convex-c38) 276 + basic_machine=c38-convex 277 + basic_os=bsd 278 + ;; 279 + cray) 280 + basic_machine=j90-cray 281 + basic_os=unicos 282 + ;; 283 + crds | unos) 284 + basic_machine=m68k-crds 285 + basic_os= 286 + ;; 287 + da30) 288 + basic_machine=m68k-da30 289 + basic_os= 290 + ;; 291 + decstation | pmax | pmin | dec3100 | decstatn) 292 + basic_machine=mips-dec 293 + basic_os= 294 + ;; 295 + delta88) 296 + basic_machine=m88k-motorola 297 + basic_os=sysv3 298 + ;; 299 + dicos) 300 + basic_machine=i686-pc 301 + basic_os=dicos 302 + ;; 303 + djgpp) 304 + basic_machine=i586-pc 305 + basic_os=msdosdjgpp 306 + ;; 307 + ebmon29k) 308 + basic_machine=a29k-amd 309 + basic_os=ebmon 310 + ;; 311 + es1800 | OSE68k | ose68k | ose | OSE) 312 + basic_machine=m68k-ericsson 313 + basic_os=ose 314 + ;; 315 + gmicro) 316 + basic_machine=tron-gmicro 317 + basic_os=sysv 318 + ;; 319 + go32) 320 + basic_machine=i386-pc 321 + basic_os=go32 322 + ;; 323 + h8300hms) 324 + basic_machine=h8300-hitachi 325 + basic_os=hms 326 + ;; 327 + h8300xray) 328 + basic_machine=h8300-hitachi 329 + basic_os=xray 330 + ;; 331 + h8500hms) 332 + basic_machine=h8500-hitachi 333 + basic_os=hms 334 + ;; 335 + harris) 336 + basic_machine=m88k-harris 337 + basic_os=sysv3 338 + ;; 339 + hp300 | hp300hpux) 340 + basic_machine=m68k-hp 341 + basic_os=hpux 342 + ;; 343 + hp300bsd) 344 + basic_machine=m68k-hp 345 + basic_os=bsd 346 + ;; 347 + hppaosf) 348 + basic_machine=hppa1.1-hp 349 + basic_os=osf 350 + ;; 351 + hppro) 352 + basic_machine=hppa1.1-hp 353 + basic_os=proelf 354 + ;; 355 + i386mach) 356 + basic_machine=i386-mach 357 + basic_os=mach 358 + ;; 359 + isi68 | isi) 360 + basic_machine=m68k-isi 361 + basic_os=sysv 362 + ;; 363 + m68knommu) 364 + basic_machine=m68k-unknown 365 + basic_os=linux 366 + ;; 367 + magnum | m3230) 368 + basic_machine=mips-mips 369 + basic_os=sysv 370 + ;; 371 + merlin) 372 + basic_machine=ns32k-utek 373 + basic_os=sysv 374 + ;; 375 + mingw64) 376 + basic_machine=x86_64-pc 377 + basic_os=mingw64 378 + ;; 379 + mingw32) 380 + basic_machine=i686-pc 381 + basic_os=mingw32 382 + ;; 383 + mingw32ce) 384 + basic_machine=arm-unknown 385 + basic_os=mingw32ce 386 + ;; 387 + monitor) 388 + basic_machine=m68k-rom68k 389 + basic_os=coff 390 + ;; 391 + morphos) 392 + basic_machine=powerpc-unknown 393 + basic_os=morphos 394 + ;; 395 + moxiebox) 396 + basic_machine=moxie-unknown 397 + basic_os=moxiebox 398 + ;; 399 + msdos) 400 + basic_machine=i386-pc 401 + basic_os=msdos 402 + ;; 403 + msys) 404 + basic_machine=i686-pc 405 + basic_os=msys 406 + ;; 407 + mvs) 408 + basic_machine=i370-ibm 409 + basic_os=mvs 410 + ;; 411 + nacl) 412 + basic_machine=le32-unknown 413 + basic_os=nacl 414 + ;; 415 + ncr3000) 416 + basic_machine=i486-ncr 417 + basic_os=sysv4 418 + ;; 419 + netbsd386) 420 + basic_machine=i386-pc 421 + basic_os=netbsd 422 + ;; 423 + netwinder) 424 + basic_machine=armv4l-rebel 425 + basic_os=linux 426 + ;; 427 + news | news700 | news800 | news900) 428 + basic_machine=m68k-sony 429 + basic_os=newsos 430 + ;; 431 + news1000) 432 + basic_machine=m68030-sony 433 + basic_os=newsos 434 + ;; 435 + necv70) 436 + basic_machine=v70-nec 437 + basic_os=sysv 438 + ;; 439 + nh3000) 440 + basic_machine=m68k-harris 441 + basic_os=cxux 442 + ;; 443 + nh[45]000) 444 + basic_machine=m88k-harris 445 + basic_os=cxux 446 + ;; 447 + nindy960) 448 + basic_machine=i960-intel 449 + basic_os=nindy 450 + ;; 451 + mon960) 452 + basic_machine=i960-intel 453 + basic_os=mon960 454 + ;; 455 + nonstopux) 456 + basic_machine=mips-compaq 457 + basic_os=nonstopux 458 + ;; 459 + os400) 460 + basic_machine=powerpc-ibm 461 + basic_os=os400 462 + ;; 463 + OSE68000 | ose68000) 464 + basic_machine=m68000-ericsson 465 + basic_os=ose 466 + ;; 467 + os68k) 468 + basic_machine=m68k-none 469 + basic_os=os68k 470 + ;; 471 + paragon) 472 + basic_machine=i860-intel 473 + basic_os=osf 474 + ;; 475 + parisc) 476 + basic_machine=hppa-unknown 477 + basic_os=linux 478 + ;; 479 + psp) 480 + basic_machine=mipsallegrexel-sony 481 + basic_os=psp 482 + ;; 483 + pw32) 484 + basic_machine=i586-unknown 485 + basic_os=pw32 486 + ;; 487 + rdos | rdos64) 488 + basic_machine=x86_64-pc 489 + basic_os=rdos 490 + ;; 491 + rdos32) 492 + basic_machine=i386-pc 493 + basic_os=rdos 494 + ;; 495 + rom68k) 496 + basic_machine=m68k-rom68k 497 + basic_os=coff 498 + ;; 499 + sa29200) 500 + basic_machine=a29k-amd 501 + basic_os=udi 502 + ;; 503 + sei) 504 + basic_machine=mips-sei 505 + basic_os=seiux 506 + ;; 507 + sequent) 508 + basic_machine=i386-sequent 509 + basic_os= 510 + ;; 511 + sps7) 512 + basic_machine=m68k-bull 513 + basic_os=sysv2 514 + ;; 515 + st2000) 516 + basic_machine=m68k-tandem 517 + basic_os= 518 + ;; 519 + stratus) 520 + basic_machine=i860-stratus 521 + basic_os=sysv4 522 + ;; 523 + sun2) 524 + basic_machine=m68000-sun 525 + basic_os= 526 + ;; 527 + sun2os3) 528 + basic_machine=m68000-sun 529 + basic_os=sunos3 530 + ;; 531 + sun2os4) 532 + basic_machine=m68000-sun 533 + basic_os=sunos4 534 + ;; 535 + sun3) 536 + basic_machine=m68k-sun 537 + basic_os= 538 + ;; 539 + sun3os3) 540 + basic_machine=m68k-sun 541 + basic_os=sunos3 542 + ;; 543 + sun3os4) 544 + basic_machine=m68k-sun 545 + basic_os=sunos4 546 + ;; 547 + sun4) 548 + basic_machine=sparc-sun 549 + basic_os= 550 + ;; 551 + sun4os3) 552 + basic_machine=sparc-sun 553 + basic_os=sunos3 554 + ;; 555 + sun4os4) 556 + basic_machine=sparc-sun 557 + basic_os=sunos4 558 + ;; 559 + sun4sol2) 560 + basic_machine=sparc-sun 561 + basic_os=solaris2 562 + ;; 563 + sun386 | sun386i | roadrunner) 564 + basic_machine=i386-sun 565 + basic_os= 566 + ;; 567 + sv1) 568 + basic_machine=sv1-cray 569 + basic_os=unicos 570 + ;; 571 + symmetry) 572 + basic_machine=i386-sequent 573 + basic_os=dynix 574 + ;; 575 + t3e) 576 + basic_machine=alphaev5-cray 577 + basic_os=unicos 578 + ;; 579 + t90) 580 + basic_machine=t90-cray 581 + basic_os=unicos 582 + ;; 583 + toad1) 584 + basic_machine=pdp10-xkl 585 + basic_os=tops20 586 + ;; 587 + tpf) 588 + basic_machine=s390x-ibm 589 + basic_os=tpf 590 + ;; 591 + udi29k) 592 + basic_machine=a29k-amd 593 + basic_os=udi 594 + ;; 595 + ultra3) 596 + basic_machine=a29k-nyu 597 + basic_os=sym1 598 + ;; 599 + v810 | necv810) 600 + basic_machine=v810-nec 601 + basic_os=none 602 + ;; 603 + vaxv) 604 + basic_machine=vax-dec 605 + basic_os=sysv 606 + ;; 607 + vms) 608 + basic_machine=vax-dec 609 + basic_os=vms 610 + ;; 611 + vsta) 612 + basic_machine=i386-pc 613 + basic_os=vsta 614 + ;; 615 + vxworks960) 616 + basic_machine=i960-wrs 617 + basic_os=vxworks 618 + ;; 619 + vxworks68) 620 + basic_machine=m68k-wrs 621 + basic_os=vxworks 622 + ;; 623 + vxworks29k) 624 + basic_machine=a29k-wrs 625 + basic_os=vxworks 626 + ;; 627 + xbox) 628 + basic_machine=i686-pc 629 + basic_os=mingw32 630 + ;; 631 + ymp) 632 + basic_machine=ymp-cray 633 + basic_os=unicos 634 + ;; 635 + *) 636 + basic_machine=$1 637 + basic_os= 638 + ;; 639 + esac 238 640 ;; 239 641 esac 240 642 241 - # Decode aliases for certain CPU-COMPANY combinations. 643 + # Decode 1-component or ad-hoc basic machines 242 644 case $basic_machine in 243 - # Recognize the basic CPU types without company name. 244 - # Some are omitted here because they have special meanings below. 245 - 1750a | 580 \ 246 - | a29k \ 247 - | aarch64 | aarch64_be \ 248 - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 249 - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 250 - | am33_2.0 \ 251 - | arc | arceb \ 252 - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 253 - | avr | avr32 \ 254 - | ba \ 255 - | be32 | be64 \ 256 - | bfin \ 257 - | c4x | c8051 | clipper \ 258 - | d10v | d30v | dlx | dsp16xx \ 259 - | e2k | epiphany \ 260 - | fido | fr30 | frv | ft32 \ 261 - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 262 - | hexagon \ 263 - | i370 | i860 | i960 | ia16 | ia64 \ 264 - | ip2k | iq2000 \ 265 - | k1om \ 266 - | le32 | le64 \ 267 - | lm32 \ 268 - | m32c | m32r | m32rle | m68000 | m68k | m88k \ 269 - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 270 - | mips | mipsbe | mipseb | mipsel | mipsle \ 271 - | mips16 \ 272 - | mips64 | mips64el \ 273 - | mips64octeon | mips64octeonel \ 274 - | mips64orion | mips64orionel \ 275 - | mips64r5900 | mips64r5900el \ 276 - | mips64vr | mips64vrel \ 277 - | mips64vr4100 | mips64vr4100el \ 278 - | mips64vr4300 | mips64vr4300el \ 279 - | mips64vr5000 | mips64vr5000el \ 280 - | mips64vr5900 | mips64vr5900el \ 281 - | mipsisa32 | mipsisa32el \ 282 - | mipsisa32r2 | mipsisa32r2el \ 283 - | mipsisa32r6 | mipsisa32r6el \ 284 - | mipsisa64 | mipsisa64el \ 285 - | mipsisa64r2 | mipsisa64r2el \ 286 - | mipsisa64r6 | mipsisa64r6el \ 287 - | mipsisa64sb1 | mipsisa64sb1el \ 288 - | mipsisa64sr71k | mipsisa64sr71kel \ 289 - | mipsr5900 | mipsr5900el \ 290 - | mipstx39 | mipstx39el \ 291 - | mn10200 | mn10300 \ 292 - | moxie \ 293 - | mt \ 294 - | msp430 \ 295 - | nds32 | nds32le | nds32be \ 296 - | nios | nios2 | nios2eb | nios2el \ 297 - | ns16k | ns32k \ 298 - | open8 | or1k | or1knd | or32 \ 299 - | pdp10 | pj | pjl \ 300 - | powerpc | powerpc64 | powerpc64le | powerpcle \ 301 - | pru \ 302 - | pyramid \ 303 - | riscv32 | riscv64 \ 304 - | rl78 | rx \ 305 - | score \ 306 - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 307 - | sh64 | sh64le \ 308 - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 309 - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 310 - | spu \ 311 - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 312 - | ubicom32 \ 313 - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 314 - | visium \ 315 - | wasm32 \ 316 - | x86 | xc16x | xstormy16 | xtensa \ 317 - | z8k | z80) 318 - basic_machine=$basic_machine-unknown 319 - ;; 320 - c54x) 321 - basic_machine=tic54x-unknown 322 - ;; 323 - c55x) 324 - basic_machine=tic55x-unknown 325 - ;; 326 - c6x) 327 - basic_machine=tic6x-unknown 328 - ;; 329 - leon|leon[3-9]) 330 - basic_machine=sparc-$basic_machine 331 - ;; 332 - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 333 - basic_machine=$basic_machine-unknown 334 - os=-none 645 + # Here we handle the default manufacturer of certain CPU types. It is in 646 + # some cases the only manufacturer, in others, it is the most popular. 647 + w89k) 648 + cpu=hppa1.1 649 + vendor=winbond 335 650 ;; 336 - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) 651 + op50n) 652 + cpu=hppa1.1 653 + vendor=oki 337 654 ;; 338 - ms1) 339 - basic_machine=mt-unknown 655 + op60c) 656 + cpu=hppa1.1 657 + vendor=oki 340 658 ;; 341 - 342 - strongarm | thumb | xscale) 343 - basic_machine=arm-unknown 659 + ibm*) 660 + cpu=i370 661 + vendor=ibm 344 662 ;; 345 - xgate) 346 - basic_machine=$basic_machine-unknown 347 - os=-none 663 + orion105) 664 + cpu=clipper 665 + vendor=highlevel 348 666 ;; 349 - xscaleeb) 350 - basic_machine=armeb-unknown 667 + mac | mpw | mac-mpw) 668 + cpu=m68k 669 + vendor=apple 351 670 ;; 352 - 353 - xscaleel) 354 - basic_machine=armel-unknown 671 + pmac | pmac-mpw) 672 + cpu=powerpc 673 + vendor=apple 355 674 ;; 356 675 357 - # We use `pc' rather than `unknown' 358 - # because (1) that's what they normally are, and 359 - # (2) the word "unknown" tends to confuse beginning users. 360 - i*86 | x86_64) 361 - basic_machine=$basic_machine-pc 362 - ;; 363 - # Object if more than one company name word. 364 - *-*-*) 365 - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 366 - exit 1 367 - ;; 368 - # Recognize the basic CPU types with company name. 369 - 580-* \ 370 - | a29k-* \ 371 - | aarch64-* | aarch64_be-* \ 372 - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 373 - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 374 - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 375 - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 376 - | avr-* | avr32-* \ 377 - | ba-* \ 378 - | be32-* | be64-* \ 379 - | bfin-* | bs2000-* \ 380 - | c[123]* | c30-* | [cjt]90-* | c4x-* \ 381 - | c8051-* | clipper-* | craynv-* | cydra-* \ 382 - | d10v-* | d30v-* | dlx-* \ 383 - | e2k-* | elxsi-* \ 384 - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 385 - | h8300-* | h8500-* \ 386 - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 387 - | hexagon-* \ 388 - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ 389 - | ip2k-* | iq2000-* \ 390 - | k1om-* \ 391 - | le32-* | le64-* \ 392 - | lm32-* \ 393 - | m32c-* | m32r-* | m32rle-* \ 394 - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 395 - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 396 - | microblaze-* | microblazeel-* \ 397 - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 398 - | mips16-* \ 399 - | mips64-* | mips64el-* \ 400 - | mips64octeon-* | mips64octeonel-* \ 401 - | mips64orion-* | mips64orionel-* \ 402 - | mips64r5900-* | mips64r5900el-* \ 403 - | mips64vr-* | mips64vrel-* \ 404 - | mips64vr4100-* | mips64vr4100el-* \ 405 - | mips64vr4300-* | mips64vr4300el-* \ 406 - | mips64vr5000-* | mips64vr5000el-* \ 407 - | mips64vr5900-* | mips64vr5900el-* \ 408 - | mipsisa32-* | mipsisa32el-* \ 409 - | mipsisa32r2-* | mipsisa32r2el-* \ 410 - | mipsisa32r6-* | mipsisa32r6el-* \ 411 - | mipsisa64-* | mipsisa64el-* \ 412 - | mipsisa64r2-* | mipsisa64r2el-* \ 413 - | mipsisa64r6-* | mipsisa64r6el-* \ 414 - | mipsisa64sb1-* | mipsisa64sb1el-* \ 415 - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 416 - | mipsr5900-* | mipsr5900el-* \ 417 - | mipstx39-* | mipstx39el-* \ 418 - | mmix-* \ 419 - | mt-* \ 420 - | msp430-* \ 421 - | nds32-* | nds32le-* | nds32be-* \ 422 - | nios-* | nios2-* | nios2eb-* | nios2el-* \ 423 - | none-* | np1-* | ns16k-* | ns32k-* \ 424 - | open8-* \ 425 - | or1k*-* \ 426 - | orion-* \ 427 - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 428 - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 429 - | pru-* \ 430 - | pyramid-* \ 431 - | riscv32-* | riscv64-* \ 432 - | rl78-* | romp-* | rs6000-* | rx-* \ 433 - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 434 - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 435 - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 436 - | sparclite-* \ 437 - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ 438 - | tahoe-* \ 439 - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 440 - | tile*-* \ 441 - | tron-* \ 442 - | ubicom32-* \ 443 - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 444 - | vax-* \ 445 - | visium-* \ 446 - | wasm32-* \ 447 - | we32k-* \ 448 - | x86-* | x86_64-* | xc16x-* | xps100-* \ 449 - | xstormy16-* | xtensa*-* \ 450 - | ymp-* \ 451 - | z8k-* | z80-*) 452 - ;; 453 - # Recognize the basic CPU types without company name, with glob match. 454 - xtensa*) 455 - basic_machine=$basic_machine-unknown 456 - ;; 457 676 # Recognize the various machine names and aliases which stand 458 677 # for a CPU type and a company and sometimes even an OS. 459 - 386bsd) 460 - basic_machine=i386-pc 461 - os=-bsd 462 - ;; 463 678 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 464 - basic_machine=m68000-att 679 + cpu=m68000 680 + vendor=att 465 681 ;; 466 682 3b*) 467 - basic_machine=we32k-att 468 - ;; 469 - a29khif) 470 - basic_machine=a29k-amd 471 - os=-udi 472 - ;; 473 - abacus) 474 - basic_machine=abacus-unknown 475 - ;; 476 - adobe68k) 477 - basic_machine=m68010-adobe 478 - os=-scout 479 - ;; 480 - alliant | fx80) 481 - basic_machine=fx80-alliant 482 - ;; 483 - altos | altos3068) 484 - basic_machine=m68k-altos 485 - ;; 486 - am29k) 487 - basic_machine=a29k-none 488 - os=-bsd 489 - ;; 490 - amd64) 491 - basic_machine=x86_64-pc 492 - ;; 493 - amd64-*) 494 - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 495 - ;; 496 - amdahl) 497 - basic_machine=580-amdahl 498 - os=-sysv 499 - ;; 500 - amiga | amiga-*) 501 - basic_machine=m68k-unknown 502 - ;; 503 - amigaos | amigados) 504 - basic_machine=m68k-unknown 505 - os=-amigaos 506 - ;; 507 - amigaunix | amix) 508 - basic_machine=m68k-unknown 509 - os=-sysv4 510 - ;; 511 - apollo68) 512 - basic_machine=m68k-apollo 513 - os=-sysv 514 - ;; 515 - apollo68bsd) 516 - basic_machine=m68k-apollo 517 - os=-bsd 518 - ;; 519 - aros) 520 - basic_machine=i386-pc 521 - os=-aros 522 - ;; 523 - asmjs) 524 - basic_machine=asmjs-unknown 525 - ;; 526 - aux) 527 - basic_machine=m68k-apple 528 - os=-aux 529 - ;; 530 - balance) 531 - basic_machine=ns32k-sequent 532 - os=-dynix 533 - ;; 534 - blackfin) 535 - basic_machine=bfin-unknown 536 - os=-linux 537 - ;; 538 - blackfin-*) 539 - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` 540 - os=-linux 683 + cpu=we32k 684 + vendor=att 541 685 ;; 542 686 bluegene*) 543 - basic_machine=powerpc-ibm 544 - os=-cnk 545 - ;; 546 - c54x-*) 547 - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 548 - ;; 549 - c55x-*) 550 - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 551 - ;; 552 - c6x-*) 553 - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 554 - ;; 555 - c90) 556 - basic_machine=c90-cray 557 - os=-unicos 558 - ;; 559 - cegcc) 560 - basic_machine=arm-unknown 561 - os=-cegcc 562 - ;; 563 - convex-c1) 564 - basic_machine=c1-convex 565 - os=-bsd 566 - ;; 567 - convex-c2) 568 - basic_machine=c2-convex 569 - os=-bsd 570 - ;; 571 - convex-c32) 572 - basic_machine=c32-convex 573 - os=-bsd 574 - ;; 575 - convex-c34) 576 - basic_machine=c34-convex 577 - os=-bsd 578 - ;; 579 - convex-c38) 580 - basic_machine=c38-convex 581 - os=-bsd 582 - ;; 583 - cray | j90) 584 - basic_machine=j90-cray 585 - os=-unicos 586 - ;; 587 - craynv) 588 - basic_machine=craynv-cray 589 - os=-unicosmp 590 - ;; 591 - cr16 | cr16-*) 592 - basic_machine=cr16-unknown 593 - os=-elf 594 - ;; 595 - crds | unos) 596 - basic_machine=m68k-crds 597 - ;; 598 - crisv32 | crisv32-* | etraxfs*) 599 - basic_machine=crisv32-axis 600 - ;; 601 - cris | cris-* | etrax*) 602 - basic_machine=cris-axis 603 - ;; 604 - crx) 605 - basic_machine=crx-unknown 606 - os=-elf 607 - ;; 608 - da30 | da30-*) 609 - basic_machine=m68k-da30 610 - ;; 611 - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 612 - basic_machine=mips-dec 687 + cpu=powerpc 688 + vendor=ibm 689 + basic_os=cnk 613 690 ;; 614 691 decsystem10* | dec10*) 615 - basic_machine=pdp10-dec 616 - os=-tops10 692 + cpu=pdp10 693 + vendor=dec 694 + basic_os=tops10 617 695 ;; 618 696 decsystem20* | dec20*) 619 - basic_machine=pdp10-dec 620 - os=-tops20 697 + cpu=pdp10 698 + vendor=dec 699 + basic_os=tops20 621 700 ;; 622 701 delta | 3300 | motorola-3300 | motorola-delta \ 623 702 | 3300-motorola | delta-motorola) 624 - basic_machine=m68k-motorola 625 - ;; 626 - delta88) 627 - basic_machine=m88k-motorola 628 - os=-sysv3 629 - ;; 630 - dicos) 631 - basic_machine=i686-pc 632 - os=-dicos 633 - ;; 634 - djgpp) 635 - basic_machine=i586-pc 636 - os=-msdosdjgpp 637 - ;; 638 - dpx20 | dpx20-*) 639 - basic_machine=rs6000-bull 640 - os=-bosx 703 + cpu=m68k 704 + vendor=motorola 641 705 ;; 642 706 dpx2*) 643 - basic_machine=m68k-bull 644 - os=-sysv3 645 - ;; 646 - e500v[12]) 647 - basic_machine=powerpc-unknown 648 - os=$os"spe" 649 - ;; 650 - e500v[12]-*) 651 - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 652 - os=$os"spe" 653 - ;; 654 - ebmon29k) 655 - basic_machine=a29k-amd 656 - os=-ebmon 657 - ;; 658 - elxsi) 659 - basic_machine=elxsi-elxsi 660 - os=-bsd 707 + cpu=m68k 708 + vendor=bull 709 + basic_os=sysv3 661 710 ;; 662 711 encore | umax | mmax) 663 - basic_machine=ns32k-encore 712 + cpu=ns32k 713 + vendor=encore 664 714 ;; 665 - es1800 | OSE68k | ose68k | ose | OSE) 666 - basic_machine=m68k-ericsson 667 - os=-ose 715 + elxsi) 716 + cpu=elxsi 717 + vendor=elxsi 718 + basic_os=${basic_os:-bsd} 668 719 ;; 669 720 fx2800) 670 - basic_machine=i860-alliant 721 + cpu=i860 722 + vendor=alliant 671 723 ;; 672 724 genix) 673 - basic_machine=ns32k-ns 674 - ;; 675 - gmicro) 676 - basic_machine=tron-gmicro 677 - os=-sysv 678 - ;; 679 - go32) 680 - basic_machine=i386-pc 681 - os=-go32 725 + cpu=ns32k 726 + vendor=ns 682 727 ;; 683 728 h3050r* | hiux*) 684 - basic_machine=hppa1.1-hitachi 685 - os=-hiuxwe2 686 - ;; 687 - h8300hms) 688 - basic_machine=h8300-hitachi 689 - os=-hms 690 - ;; 691 - h8300xray) 692 - basic_machine=h8300-hitachi 693 - os=-xray 694 - ;; 695 - h8500hms) 696 - basic_machine=h8500-hitachi 697 - os=-hms 698 - ;; 699 - harris) 700 - basic_machine=m88k-harris 701 - os=-sysv3 702 - ;; 703 - hp300-*) 704 - basic_machine=m68k-hp 705 - ;; 706 - hp300bsd) 707 - basic_machine=m68k-hp 708 - os=-bsd 709 - ;; 710 - hp300hpux) 711 - basic_machine=m68k-hp 712 - os=-hpux 729 + cpu=hppa1.1 730 + vendor=hitachi 731 + basic_os=hiuxwe2 713 732 ;; 714 733 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 715 - basic_machine=hppa1.0-hp 734 + cpu=hppa1.0 735 + vendor=hp 716 736 ;; 717 737 hp9k2[0-9][0-9] | hp9k31[0-9]) 718 - basic_machine=m68000-hp 738 + cpu=m68000 739 + vendor=hp 719 740 ;; 720 741 hp9k3[2-9][0-9]) 721 - basic_machine=m68k-hp 742 + cpu=m68k 743 + vendor=hp 722 744 ;; 723 745 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 724 - basic_machine=hppa1.0-hp 746 + cpu=hppa1.0 747 + vendor=hp 725 748 ;; 726 749 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 727 - basic_machine=hppa1.1-hp 750 + cpu=hppa1.1 751 + vendor=hp 728 752 ;; 729 753 hp9k78[0-9] | hp78[0-9]) 730 754 # FIXME: really hppa2.0-hp 731 - basic_machine=hppa1.1-hp 755 + cpu=hppa1.1 756 + vendor=hp 732 757 ;; 733 758 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 734 759 # FIXME: really hppa2.0-hp 735 - basic_machine=hppa1.1-hp 760 + cpu=hppa1.1 761 + vendor=hp 736 762 ;; 737 763 hp9k8[0-9][13679] | hp8[0-9][13679]) 738 - basic_machine=hppa1.1-hp 764 + cpu=hppa1.1 765 + vendor=hp 739 766 ;; 740 767 hp9k8[0-9][0-9] | hp8[0-9][0-9]) 741 - basic_machine=hppa1.0-hp 742 - ;; 743 - hppaosf) 744 - basic_machine=hppa1.1-hp 745 - os=-osf 746 - ;; 747 - hppro) 748 - basic_machine=hppa1.1-hp 749 - os=-proelf 750 - ;; 751 - i370-ibm* | ibm*) 752 - basic_machine=i370-ibm 768 + cpu=hppa1.0 769 + vendor=hp 753 770 ;; 754 771 i*86v32) 755 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 756 - os=-sysv32 772 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 773 + vendor=pc 774 + basic_os=sysv32 757 775 ;; 758 776 i*86v4*) 759 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 760 - os=-sysv4 777 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 778 + vendor=pc 779 + basic_os=sysv4 761 780 ;; 762 781 i*86v) 763 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 764 - os=-sysv 782 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 783 + vendor=pc 784 + basic_os=sysv 765 785 ;; 766 786 i*86sol2) 767 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 768 - os=-solaris2 769 - ;; 770 - i386mach) 771 - basic_machine=i386-mach 772 - os=-mach 787 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 788 + vendor=pc 789 + basic_os=solaris2 773 790 ;; 774 - vsta) 775 - basic_machine=i386-unknown 776 - os=-vsta 791 + j90 | j90-cray) 792 + cpu=j90 793 + vendor=cray 794 + basic_os=${basic_os:-unicos} 777 795 ;; 778 796 iris | iris4d) 779 - basic_machine=mips-sgi 780 - case $os in 781 - -irix*) 797 + cpu=mips 798 + vendor=sgi 799 + case $basic_os in 800 + irix*) 782 801 ;; 783 802 *) 784 - os=-irix4 803 + basic_os=irix4 785 804 ;; 786 805 esac 787 806 ;; 788 - isi68 | isi) 789 - basic_machine=m68k-isi 790 - os=-sysv 791 - ;; 792 - leon-*|leon[3-9]-*) 793 - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` 794 - ;; 795 - m68knommu) 796 - basic_machine=m68k-unknown 797 - os=-linux 798 - ;; 799 - m68knommu-*) 800 - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` 801 - os=-linux 802 - ;; 803 - magnum | m3230) 804 - basic_machine=mips-mips 805 - os=-sysv 806 - ;; 807 - merlin) 808 - basic_machine=ns32k-utek 809 - os=-sysv 810 - ;; 811 - microblaze*) 812 - basic_machine=microblaze-xilinx 813 - ;; 814 - mingw64) 815 - basic_machine=x86_64-pc 816 - os=-mingw64 817 - ;; 818 - mingw32) 819 - basic_machine=i686-pc 820 - os=-mingw32 821 - ;; 822 - mingw32ce) 823 - basic_machine=arm-unknown 824 - os=-mingw32ce 825 - ;; 826 807 miniframe) 827 - basic_machine=m68000-convergent 828 - ;; 829 - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 830 - basic_machine=m68k-atari 831 - os=-mint 832 - ;; 833 - mips3*-*) 834 - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` 835 - ;; 836 - mips3*) 837 - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown 838 - ;; 839 - monitor) 840 - basic_machine=m68k-rom68k 841 - os=-coff 842 - ;; 843 - morphos) 844 - basic_machine=powerpc-unknown 845 - os=-morphos 846 - ;; 847 - moxiebox) 848 - basic_machine=moxie-unknown 849 - os=-moxiebox 850 - ;; 851 - msdos) 852 - basic_machine=i386-pc 853 - os=-msdos 854 - ;; 855 - ms1-*) 856 - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` 857 - ;; 858 - msys) 859 - basic_machine=i686-pc 860 - os=-msys 861 - ;; 862 - mvs) 863 - basic_machine=i370-ibm 864 - os=-mvs 865 - ;; 866 - nacl) 867 - basic_machine=le32-unknown 868 - os=-nacl 869 - ;; 870 - ncr3000) 871 - basic_machine=i486-ncr 872 - os=-sysv4 873 - ;; 874 - netbsd386) 875 - basic_machine=i386-unknown 876 - os=-netbsd 877 - ;; 878 - netwinder) 879 - basic_machine=armv4l-rebel 880 - os=-linux 881 - ;; 882 - news | news700 | news800 | news900) 883 - basic_machine=m68k-sony 884 - os=-newsos 808 + cpu=m68000 809 + vendor=convergent 885 810 ;; 886 - news1000) 887 - basic_machine=m68030-sony 888 - os=-newsos 811 + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) 812 + cpu=m68k 813 + vendor=atari 814 + basic_os=mint 889 815 ;; 890 816 news-3600 | risc-news) 891 - basic_machine=mips-sony 892 - os=-newsos 893 - ;; 894 - necv70) 895 - basic_machine=v70-nec 896 - os=-sysv 817 + cpu=mips 818 + vendor=sony 819 + basic_os=newsos 897 820 ;; 898 821 next | m*-next) 899 - basic_machine=m68k-next 900 - case $os in 901 - -nextstep* ) 822 + cpu=m68k 823 + vendor=next 824 + case $basic_os in 825 + openstep*) 826 + ;; 827 + nextstep*) 902 828 ;; 903 - -ns2*) 904 - os=-nextstep2 829 + ns2*) 830 + basic_os=nextstep2 905 831 ;; 906 832 *) 907 - os=-nextstep3 833 + basic_os=nextstep3 908 834 ;; 909 835 esac 910 836 ;; 911 - nh3000) 912 - basic_machine=m68k-harris 913 - os=-cxux 914 - ;; 915 - nh[45]000) 916 - basic_machine=m88k-harris 917 - os=-cxux 918 - ;; 919 - nindy960) 920 - basic_machine=i960-intel 921 - os=-nindy 922 - ;; 923 - mon960) 924 - basic_machine=i960-intel 925 - os=-mon960 926 - ;; 927 - nonstopux) 928 - basic_machine=mips-compaq 929 - os=-nonstopux 930 - ;; 931 837 np1) 932 - basic_machine=np1-gould 933 - ;; 934 - neo-tandem) 935 - basic_machine=neo-tandem 936 - ;; 937 - nse-tandem) 938 - basic_machine=nse-tandem 939 - ;; 940 - nsr-tandem) 941 - basic_machine=nsr-tandem 942 - ;; 943 - nsv-tandem) 944 - basic_machine=nsv-tandem 945 - ;; 946 - nsx-tandem) 947 - basic_machine=nsx-tandem 838 + cpu=np1 839 + vendor=gould 948 840 ;; 949 841 op50n-* | op60c-*) 950 - basic_machine=hppa1.1-oki 951 - os=-proelf 952 - ;; 953 - openrisc | openrisc-*) 954 - basic_machine=or32-unknown 955 - ;; 956 - os400) 957 - basic_machine=powerpc-ibm 958 - os=-os400 959 - ;; 960 - OSE68000 | ose68000) 961 - basic_machine=m68000-ericsson 962 - os=-ose 963 - ;; 964 - os68k) 965 - basic_machine=m68k-none 966 - os=-os68k 842 + cpu=hppa1.1 843 + vendor=oki 844 + basic_os=proelf 967 845 ;; 968 846 pa-hitachi) 969 - basic_machine=hppa1.1-hitachi 970 - os=-hiuxwe2 971 - ;; 972 - paragon) 973 - basic_machine=i860-intel 974 - os=-osf 975 - ;; 976 - parisc) 977 - basic_machine=hppa-unknown 978 - os=-linux 979 - ;; 980 - parisc-*) 981 - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` 982 - os=-linux 847 + cpu=hppa1.1 848 + vendor=hitachi 849 + basic_os=hiuxwe2 983 850 ;; 984 851 pbd) 985 - basic_machine=sparc-tti 852 + cpu=sparc 853 + vendor=tti 986 854 ;; 987 855 pbb) 988 - basic_machine=m68k-tti 989 - ;; 990 - pc532 | pc532-*) 991 - basic_machine=ns32k-pc532 992 - ;; 993 - pc98) 994 - basic_machine=i386-pc 995 - ;; 996 - pc98-*) 997 - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` 998 - ;; 999 - pentium | p5 | k5 | k6 | nexgen | viac3) 1000 - basic_machine=i586-pc 1001 - ;; 1002 - pentiumpro | p6 | 6x86 | athlon | athlon_*) 1003 - basic_machine=i686-pc 1004 - ;; 1005 - pentiumii | pentium2 | pentiumiii | pentium3) 1006 - basic_machine=i686-pc 1007 - ;; 1008 - pentium4) 1009 - basic_machine=i786-pc 1010 - ;; 1011 - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1012 - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1013 - ;; 1014 - pentiumpro-* | p6-* | 6x86-* | athlon-*) 1015 - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1016 - ;; 1017 - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1018 - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 856 + cpu=m68k 857 + vendor=tti 1019 858 ;; 1020 - pentium4-*) 1021 - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` 859 + pc532) 860 + cpu=ns32k 861 + vendor=pc532 1022 862 ;; 1023 863 pn) 1024 - basic_machine=pn-gould 1025 - ;; 1026 - power) basic_machine=power-ibm 1027 - ;; 1028 - ppc | ppcbe) basic_machine=powerpc-unknown 1029 - ;; 1030 - ppc-* | ppcbe-*) 1031 - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1032 - ;; 1033 - ppcle | powerpclittle) 1034 - basic_machine=powerpcle-unknown 864 + cpu=pn 865 + vendor=gould 1035 866 ;; 1036 - ppcle-* | powerpclittle-*) 1037 - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` 867 + power) 868 + cpu=power 869 + vendor=ibm 1038 870 ;; 1039 - ppc64) basic_machine=powerpc64-unknown 871 + ps2) 872 + cpu=i386 873 + vendor=ibm 1040 874 ;; 1041 - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 875 + rm[46]00) 876 + cpu=mips 877 + vendor=siemens 1042 878 ;; 1043 - ppc64le | powerpc64little) 1044 - basic_machine=powerpc64le-unknown 879 + rtpc | rtpc-*) 880 + cpu=romp 881 + vendor=ibm 1045 882 ;; 1046 - ppc64le-* | powerpc64little-*) 1047 - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` 883 + sde) 884 + cpu=mipsisa32 885 + vendor=sde 886 + basic_os=${basic_os:-elf} 1048 887 ;; 1049 - ps2) 1050 - basic_machine=i386-ibm 888 + simso-wrs) 889 + cpu=sparclite 890 + vendor=wrs 891 + basic_os=vxworks 1051 892 ;; 1052 - pw32) 1053 - basic_machine=i586-unknown 1054 - os=-pw32 893 + tower | tower-32) 894 + cpu=m68k 895 + vendor=ncr 1055 896 ;; 1056 - rdos | rdos64) 1057 - basic_machine=x86_64-pc 1058 - os=-rdos 897 + vpp*|vx|vx-*) 898 + cpu=f301 899 + vendor=fujitsu 1059 900 ;; 1060 - rdos32) 1061 - basic_machine=i386-pc 1062 - os=-rdos 901 + w65) 902 + cpu=w65 903 + vendor=wdc 1063 904 ;; 1064 - rom68k) 1065 - basic_machine=m68k-rom68k 1066 - os=-coff 905 + w89k-*) 906 + cpu=hppa1.1 907 + vendor=winbond 908 + basic_os=proelf 1067 909 ;; 1068 - rm[46]00) 1069 - basic_machine=mips-siemens 910 + none) 911 + cpu=none 912 + vendor=none 1070 913 ;; 1071 - rtpc | rtpc-*) 1072 - basic_machine=romp-ibm 914 + leon|leon[3-9]) 915 + cpu=sparc 916 + vendor=$basic_machine 1073 917 ;; 1074 - s390 | s390-*) 1075 - basic_machine=s390-ibm 918 + leon-*|leon[3-9]-*) 919 + cpu=sparc 920 + vendor=`echo "$basic_machine" | sed 's/-.*//'` 1076 921 ;; 1077 - s390x | s390x-*) 1078 - basic_machine=s390x-ibm 922 + 923 + *-*) 924 + # shellcheck disable=SC2162 925 + IFS="-" read cpu vendor <<EOF 926 + $basic_machine 927 + EOF 1079 928 ;; 1080 - sa29200) 1081 - basic_machine=a29k-amd 1082 - os=-udi 929 + # We use `pc' rather than `unknown' 930 + # because (1) that's what they normally are, and 931 + # (2) the word "unknown" tends to confuse beginning users. 932 + i*86 | x86_64) 933 + cpu=$basic_machine 934 + vendor=pc 1083 935 ;; 1084 - sb1) 1085 - basic_machine=mipsisa64sb1-unknown 936 + # These rules are duplicated from below for sake of the special case above; 937 + # i.e. things that normalized to x86 arches should also default to "pc" 938 + pc98) 939 + cpu=i386 940 + vendor=pc 1086 941 ;; 1087 - sb1el) 1088 - basic_machine=mipsisa64sb1el-unknown 942 + x64 | amd64) 943 + cpu=x86_64 944 + vendor=pc 1089 945 ;; 1090 - sde) 1091 - basic_machine=mipsisa32-sde 1092 - os=-elf 946 + # Recognize the basic CPU types without company name. 947 + *) 948 + cpu=$basic_machine 949 + vendor=unknown 1093 950 ;; 1094 - sei) 1095 - basic_machine=mips-sei 1096 - os=-seiux 951 + esac 952 + 953 + unset -v basic_machine 954 + 955 + # Decode basic machines in the full and proper CPU-Company form. 956 + case $cpu-$vendor in 957 + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in 958 + # some cases the only manufacturer, in others, it is the most popular. 959 + craynv-unknown) 960 + vendor=cray 961 + basic_os=${basic_os:-unicosmp} 1097 962 ;; 1098 - sequent) 1099 - basic_machine=i386-sequent 963 + c90-unknown | c90-cray) 964 + vendor=cray 965 + basic_os=${Basic_os:-unicos} 1100 966 ;; 1101 - sh5el) 1102 - basic_machine=sh5le-unknown 967 + fx80-unknown) 968 + vendor=alliant 1103 969 ;; 1104 - simso-wrs) 1105 - basic_machine=sparclite-wrs 1106 - os=-vxworks 970 + romp-unknown) 971 + vendor=ibm 1107 972 ;; 1108 - sps7) 1109 - basic_machine=m68k-bull 1110 - os=-sysv2 973 + mmix-unknown) 974 + vendor=knuth 1111 975 ;; 1112 - spur) 1113 - basic_machine=spur-unknown 976 + microblaze-unknown | microblazeel-unknown) 977 + vendor=xilinx 1114 978 ;; 1115 - st2000) 1116 - basic_machine=m68k-tandem 979 + rs6000-unknown) 980 + vendor=ibm 1117 981 ;; 1118 - stratus) 1119 - basic_machine=i860-stratus 1120 - os=-sysv4 982 + vax-unknown) 983 + vendor=dec 1121 984 ;; 1122 - strongarm-* | thumb-*) 1123 - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` 985 + pdp11-unknown) 986 + vendor=dec 1124 987 ;; 1125 - sun2) 1126 - basic_machine=m68000-sun 988 + we32k-unknown) 989 + vendor=att 1127 990 ;; 1128 - sun2os3) 1129 - basic_machine=m68000-sun 1130 - os=-sunos3 991 + cydra-unknown) 992 + vendor=cydrome 1131 993 ;; 1132 - sun2os4) 1133 - basic_machine=m68000-sun 1134 - os=-sunos4 994 + i370-ibm*) 995 + vendor=ibm 1135 996 ;; 1136 - sun3os3) 1137 - basic_machine=m68k-sun 1138 - os=-sunos3 997 + orion-unknown) 998 + vendor=highlevel 1139 999 ;; 1140 - sun3os4) 1141 - basic_machine=m68k-sun 1142 - os=-sunos4 1000 + xps-unknown | xps100-unknown) 1001 + cpu=xps100 1002 + vendor=honeywell 1143 1003 ;; 1144 - sun4os3) 1145 - basic_machine=sparc-sun 1146 - os=-sunos3 1004 + 1005 + # Here we normalize CPU types with a missing or matching vendor 1006 + dpx20-unknown | dpx20-bull) 1007 + cpu=rs6000 1008 + vendor=bull 1009 + basic_os=${basic_os:-bosx} 1147 1010 ;; 1148 - sun4os4) 1149 - basic_machine=sparc-sun 1150 - os=-sunos4 1011 + 1012 + # Here we normalize CPU types irrespective of the vendor 1013 + amd64-*) 1014 + cpu=x86_64 1151 1015 ;; 1152 - sun4sol2) 1153 - basic_machine=sparc-sun 1154 - os=-solaris2 1016 + blackfin-*) 1017 + cpu=bfin 1018 + basic_os=linux 1155 1019 ;; 1156 - sun3 | sun3-*) 1157 - basic_machine=m68k-sun 1020 + c54x-*) 1021 + cpu=tic54x 1158 1022 ;; 1159 - sun4) 1160 - basic_machine=sparc-sun 1023 + c55x-*) 1024 + cpu=tic55x 1161 1025 ;; 1162 - sun386 | sun386i | roadrunner) 1163 - basic_machine=i386-sun 1026 + c6x-*) 1027 + cpu=tic6x 1164 1028 ;; 1165 - sv1) 1166 - basic_machine=sv1-cray 1167 - os=-unicos 1029 + e500v[12]-*) 1030 + cpu=powerpc 1031 + basic_os=${basic_os}"spe" 1168 1032 ;; 1169 - symmetry) 1170 - basic_machine=i386-sequent 1171 - os=-dynix 1033 + mips3*-*) 1034 + cpu=mips64 1172 1035 ;; 1173 - t3e) 1174 - basic_machine=alphaev5-cray 1175 - os=-unicos 1036 + ms1-*) 1037 + cpu=mt 1176 1038 ;; 1177 - t90) 1178 - basic_machine=t90-cray 1179 - os=-unicos 1039 + m68knommu-*) 1040 + cpu=m68k 1041 + basic_os=linux 1180 1042 ;; 1181 - tile*) 1182 - basic_machine=$basic_machine-unknown 1183 - os=-linux-gnu 1043 + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) 1044 + cpu=s12z 1184 1045 ;; 1185 - tx39) 1186 - basic_machine=mipstx39-unknown 1046 + openrisc-*) 1047 + cpu=or32 1187 1048 ;; 1188 - tx39el) 1189 - basic_machine=mipstx39el-unknown 1049 + parisc-*) 1050 + cpu=hppa 1051 + basic_os=linux 1190 1052 ;; 1191 - toad1) 1192 - basic_machine=pdp10-xkl 1193 - os=-tops20 1053 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1054 + cpu=i586 1194 1055 ;; 1195 - tower | tower-32) 1196 - basic_machine=m68k-ncr 1056 + pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) 1057 + cpu=i686 1197 1058 ;; 1198 - tpf) 1199 - basic_machine=s390x-ibm 1200 - os=-tpf 1059 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1060 + cpu=i686 1201 1061 ;; 1202 - udi29k) 1203 - basic_machine=a29k-amd 1204 - os=-udi 1062 + pentium4-*) 1063 + cpu=i786 1205 1064 ;; 1206 - ultra3) 1207 - basic_machine=a29k-nyu 1208 - os=-sym1 1065 + pc98-*) 1066 + cpu=i386 1209 1067 ;; 1210 - v810 | necv810) 1211 - basic_machine=v810-nec 1212 - os=-none 1068 + ppc-* | ppcbe-*) 1069 + cpu=powerpc 1213 1070 ;; 1214 - vaxv) 1215 - basic_machine=vax-dec 1216 - os=-sysv 1071 + ppcle-* | powerpclittle-*) 1072 + cpu=powerpcle 1217 1073 ;; 1218 - vms) 1219 - basic_machine=vax-dec 1220 - os=-vms 1074 + ppc64-*) 1075 + cpu=powerpc64 1221 1076 ;; 1222 - vpp*|vx|vx-*) 1223 - basic_machine=f301-fujitsu 1077 + ppc64le-* | powerpc64little-*) 1078 + cpu=powerpc64le 1224 1079 ;; 1225 - vxworks960) 1226 - basic_machine=i960-wrs 1227 - os=-vxworks 1080 + sb1-*) 1081 + cpu=mipsisa64sb1 1228 1082 ;; 1229 - vxworks68) 1230 - basic_machine=m68k-wrs 1231 - os=-vxworks 1083 + sb1el-*) 1084 + cpu=mipsisa64sb1el 1232 1085 ;; 1233 - vxworks29k) 1234 - basic_machine=a29k-wrs 1235 - os=-vxworks 1086 + sh5e[lb]-*) 1087 + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` 1236 1088 ;; 1237 - w65*) 1238 - basic_machine=w65-wdc 1239 - os=-none 1089 + spur-*) 1090 + cpu=spur 1240 1091 ;; 1241 - w89k-*) 1242 - basic_machine=hppa1.1-winbond 1243 - os=-proelf 1092 + strongarm-* | thumb-*) 1093 + cpu=arm 1244 1094 ;; 1245 - x64) 1246 - basic_machine=x86_64-pc 1095 + tx39-*) 1096 + cpu=mipstx39 1247 1097 ;; 1248 - xbox) 1249 - basic_machine=i686-pc 1250 - os=-mingw32 1098 + tx39el-*) 1099 + cpu=mipstx39el 1251 1100 ;; 1252 - xps | xps100) 1253 - basic_machine=xps100-honeywell 1101 + x64-*) 1102 + cpu=x86_64 1254 1103 ;; 1255 1104 xscale-* | xscalee[bl]-*) 1256 - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` 1257 - ;; 1258 - ymp) 1259 - basic_machine=ymp-cray 1260 - os=-unicos 1105 + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` 1261 1106 ;; 1262 - none) 1263 - basic_machine=none-none 1264 - os=-none 1107 + arm64-*) 1108 + cpu=aarch64 1265 1109 ;; 1266 1110 1267 - # Here we handle the default manufacturer of certain CPU types. It is in 1268 - # some cases the only manufacturer, in others, it is the most popular. 1269 - w89k) 1270 - basic_machine=hppa1.1-winbond 1271 - ;; 1272 - op50n) 1273 - basic_machine=hppa1.1-oki 1274 - ;; 1275 - op60c) 1276 - basic_machine=hppa1.1-oki 1277 - ;; 1278 - romp) 1279 - basic_machine=romp-ibm 1280 - ;; 1281 - mmix) 1282 - basic_machine=mmix-knuth 1283 - ;; 1284 - rs6000) 1285 - basic_machine=rs6000-ibm 1111 + # Recognize the canonical CPU Types that limit and/or modify the 1112 + # company names they are paired with. 1113 + cr16-*) 1114 + basic_os=${basic_os:-elf} 1286 1115 ;; 1287 - vax) 1288 - basic_machine=vax-dec 1116 + crisv32-* | etraxfs*-*) 1117 + cpu=crisv32 1118 + vendor=axis 1289 1119 ;; 1290 - pdp11) 1291 - basic_machine=pdp11-dec 1120 + cris-* | etrax*-*) 1121 + cpu=cris 1122 + vendor=axis 1292 1123 ;; 1293 - we32k) 1294 - basic_machine=we32k-att 1124 + crx-*) 1125 + basic_os=${basic_os:-elf} 1295 1126 ;; 1296 - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1297 - basic_machine=sh-unknown 1127 + neo-tandem) 1128 + cpu=neo 1129 + vendor=tandem 1298 1130 ;; 1299 - cydra) 1300 - basic_machine=cydra-cydrome 1131 + nse-tandem) 1132 + cpu=nse 1133 + vendor=tandem 1301 1134 ;; 1302 - orion) 1303 - basic_machine=orion-highlevel 1135 + nsr-tandem) 1136 + cpu=nsr 1137 + vendor=tandem 1304 1138 ;; 1305 - orion105) 1306 - basic_machine=clipper-highlevel 1139 + nsv-tandem) 1140 + cpu=nsv 1141 + vendor=tandem 1307 1142 ;; 1308 - mac | mpw | mac-mpw) 1309 - basic_machine=m68k-apple 1143 + nsx-tandem) 1144 + cpu=nsx 1145 + vendor=tandem 1310 1146 ;; 1311 - pmac | pmac-mpw) 1312 - basic_machine=powerpc-apple 1147 + mipsallegrexel-sony) 1148 + cpu=mipsallegrexel 1149 + vendor=sony 1313 1150 ;; 1314 - *-unknown) 1315 - # Make sure to match an already-canonicalized machine name. 1151 + tile*-*) 1152 + basic_os=${basic_os:-linux-gnu} 1316 1153 ;; 1154 + 1317 1155 *) 1318 - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 1319 - exit 1 1156 + # Recognize the canonical CPU types that are allowed with any 1157 + # company name. 1158 + case $cpu in 1159 + 1750a | 580 \ 1160 + | a29k \ 1161 + | aarch64 | aarch64_be \ 1162 + | abacus \ 1163 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ 1164 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ 1165 + | alphapca5[67] | alpha64pca5[67] \ 1166 + | am33_2.0 \ 1167 + | amdgcn \ 1168 + | arc | arceb \ 1169 + | arm | arm[lb]e | arme[lb] | armv* \ 1170 + | avr | avr32 \ 1171 + | asmjs \ 1172 + | ba \ 1173 + | be32 | be64 \ 1174 + | bfin | bpf | bs2000 \ 1175 + | c[123]* | c30 | [cjt]90 | c4x \ 1176 + | c8051 | clipper | craynv | csky | cydra \ 1177 + | d10v | d30v | dlx | dsp16xx \ 1178 + | e2k | elxsi | epiphany \ 1179 + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ 1180 + | h8300 | h8500 \ 1181 + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 1182 + | hexagon \ 1183 + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ 1184 + | ip2k | iq2000 \ 1185 + | k1om \ 1186 + | le32 | le64 \ 1187 + | lm32 \ 1188 + | m32c | m32r | m32rle \ 1189 + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ 1190 + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ 1191 + | m88110 | m88k | maxq | mb | mcore | mep | metag \ 1192 + | microblaze | microblazeel \ 1193 + | mips | mipsbe | mipseb | mipsel | mipsle \ 1194 + | mips16 \ 1195 + | mips64 | mips64eb | mips64el \ 1196 + | mips64octeon | mips64octeonel \ 1197 + | mips64orion | mips64orionel \ 1198 + | mips64r5900 | mips64r5900el \ 1199 + | mips64vr | mips64vrel \ 1200 + | mips64vr4100 | mips64vr4100el \ 1201 + | mips64vr4300 | mips64vr4300el \ 1202 + | mips64vr5000 | mips64vr5000el \ 1203 + | mips64vr5900 | mips64vr5900el \ 1204 + | mipsisa32 | mipsisa32el \ 1205 + | mipsisa32r2 | mipsisa32r2el \ 1206 + | mipsisa32r6 | mipsisa32r6el \ 1207 + | mipsisa64 | mipsisa64el \ 1208 + | mipsisa64r2 | mipsisa64r2el \ 1209 + | mipsisa64r6 | mipsisa64r6el \ 1210 + | mipsisa64sb1 | mipsisa64sb1el \ 1211 + | mipsisa64sr71k | mipsisa64sr71kel \ 1212 + | mipsr5900 | mipsr5900el \ 1213 + | mipstx39 | mipstx39el \ 1214 + | mmix \ 1215 + | mn10200 | mn10300 \ 1216 + | moxie \ 1217 + | mt \ 1218 + | msp430 \ 1219 + | nds32 | nds32le | nds32be \ 1220 + | nfp \ 1221 + | nios | nios2 | nios2eb | nios2el \ 1222 + | none | np1 | ns16k | ns32k | nvptx \ 1223 + | open8 \ 1224 + | or1k* \ 1225 + | or32 \ 1226 + | orion \ 1227 + | picochip \ 1228 + | pdp10 | pdp11 | pj | pjl | pn | power \ 1229 + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ 1230 + | pru \ 1231 + | pyramid \ 1232 + | riscv | riscv32 | riscv64 \ 1233 + | rl78 | romp | rs6000 | rx \ 1234 + | s390 | s390x \ 1235 + | score \ 1236 + | sh | shl \ 1237 + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ 1238 + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ 1239 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ 1240 + | sparclite \ 1241 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ 1242 + | spu \ 1243 + | tahoe \ 1244 + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ 1245 + | tron \ 1246 + | ubicom32 \ 1247 + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ 1248 + | vax \ 1249 + | visium \ 1250 + | w65 \ 1251 + | wasm32 | wasm64 \ 1252 + | we32k \ 1253 + | x86 | x86_64 | xc16x | xgate | xps100 \ 1254 + | xstormy16 | xtensa* \ 1255 + | ymp \ 1256 + | z8k | z80) 1257 + ;; 1258 + 1259 + *) 1260 + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 1261 + exit 1 1262 + ;; 1263 + esac 1320 1264 ;; 1321 1265 esac 1322 1266 1323 1267 # Here we canonicalize certain aliases for manufacturers. 1324 - case $basic_machine in 1325 - *-digital*) 1326 - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` 1268 + case $vendor in 1269 + digital*) 1270 + vendor=dec 1327 1271 ;; 1328 - *-commodore*) 1329 - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` 1272 + commodore*) 1273 + vendor=cbm 1330 1274 ;; 1331 1275 *) 1332 1276 ;; ··· 1334 1278 1335 1279 # Decode manufacturer-specific aliases for certain operating systems. 1336 1280 1337 - if [ x"$os" != x"" ] 1281 + if [ x$basic_os != x ] 1338 1282 then 1283 + 1284 + # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just 1285 + # set os. 1286 + case $basic_os in 1287 + gnu/linux*) 1288 + kernel=linux 1289 + os=`echo $basic_os | sed -e 's|gnu/linux|gnu|'` 1290 + ;; 1291 + nto-qnx*) 1292 + kernel=nto 1293 + os=`echo $basic_os | sed -e 's|nto-qnx|qnx|'` 1294 + ;; 1295 + *-*) 1296 + # shellcheck disable=SC2162 1297 + IFS="-" read kernel os <<EOF 1298 + $basic_os 1299 + EOF 1300 + ;; 1301 + # Default OS when just kernel was specified 1302 + nto*) 1303 + kernel=nto 1304 + os=`echo $basic_os | sed -e 's|nto|qnx|'` 1305 + ;; 1306 + linux*) 1307 + kernel=linux 1308 + os=`echo $basic_os | sed -e 's|linux|gnu|'` 1309 + ;; 1310 + *) 1311 + kernel= 1312 + os=$basic_os 1313 + ;; 1314 + esac 1315 + 1316 + # Now, normalize the OS (knowing we just have one component, it's not a kernel, 1317 + # etc.) 1339 1318 case $os in 1340 1319 # First match some system type aliases that might get confused 1341 1320 # with valid system types. 1342 - # -solaris* is a basic system type, with this one exception. 1343 - -auroraux) 1344 - os=-auroraux 1321 + # solaris* is a basic system type, with this one exception. 1322 + auroraux) 1323 + os=auroraux 1345 1324 ;; 1346 - -solaris1 | -solaris1.*) 1347 - os=`echo $os | sed -e 's|solaris1|sunos4|'` 1325 + bluegene*) 1326 + os=cnk 1348 1327 ;; 1349 - -solaris) 1350 - os=-solaris2 1328 + solaris1 | solaris1.*) 1329 + os=`echo $os | sed -e 's|solaris1|sunos4|'` 1351 1330 ;; 1352 - -unixware*) 1353 - os=-sysv4.2uw 1331 + solaris) 1332 + os=solaris2 1354 1333 ;; 1355 - -gnu/linux*) 1356 - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1334 + unixware*) 1335 + os=sysv4.2uw 1357 1336 ;; 1358 1337 # es1800 is here to avoid being matched by es* (a different OS) 1359 - -es1800*) 1360 - os=-ose 1338 + es1800*) 1339 + os=ose 1361 1340 ;; 1362 - # Now accept the basic system types. 1363 - # The portable systems comes first. 1364 - # Each alternative MUST end in a * to match a version number. 1365 - # -sysv* is not here because it comes later, after sysvr4. 1366 - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1367 - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1368 - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1369 - | -sym* | -kopensolaris* | -plan9* \ 1370 - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1371 - | -aos* | -aros* | -cloudabi* | -sortix* \ 1372 - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1373 - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1374 - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ 1375 - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ 1376 - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1377 - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1378 - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1379 - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1380 - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ 1381 - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1382 - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1383 - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1384 - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 1385 - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ 1386 - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1387 - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1388 - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1389 - | -morphos* | -superux* | -rtmk* | -windiss* \ 1390 - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1391 - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ 1392 - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ 1393 - | -midnightbsd*) 1394 - # Remember, each alternative MUST END IN *, to match a version number. 1341 + # Some version numbers need modification 1342 + chorusos*) 1343 + os=chorusos 1395 1344 ;; 1396 - -qnx*) 1397 - case $basic_machine in 1398 - x86-* | i*86-*) 1345 + isc) 1346 + os=isc2.2 1347 + ;; 1348 + sco6) 1349 + os=sco5v6 1350 + ;; 1351 + sco5) 1352 + os=sco3.2v5 1353 + ;; 1354 + sco4) 1355 + os=sco3.2v4 1356 + ;; 1357 + sco3.2.[4-9]*) 1358 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 1359 + ;; 1360 + sco*v* | scout) 1361 + # Don't match below 1362 + ;; 1363 + sco*) 1364 + os=sco3.2v2 1365 + ;; 1366 + psos*) 1367 + os=psos 1368 + ;; 1369 + qnx*) 1370 + case $cpu in 1371 + x86 | i*86) 1399 1372 ;; 1400 1373 *) 1401 - os=-nto$os 1374 + os=nto-$os 1402 1375 ;; 1403 1376 esac 1404 1377 ;; 1405 - -nto-qnx*) 1378 + hiux*) 1379 + os=hiuxwe2 1406 1380 ;; 1407 - -nto*) 1408 - os=`echo $os | sed -e 's|nto|nto-qnx|'` 1381 + lynx*178) 1382 + os=lynxos178 1409 1383 ;; 1410 - -sim | -xray | -os68k* | -v88r* \ 1411 - | -windows* | -osx | -abug | -netware* | -os9* \ 1412 - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1384 + lynx*5) 1385 + os=lynxos5 1413 1386 ;; 1414 - -mac*) 1387 + lynxos*) 1388 + # don't get caught up in next wildcard 1389 + ;; 1390 + lynx*) 1391 + os=lynxos 1392 + ;; 1393 + mac[0-9]*) 1415 1394 os=`echo "$os" | sed -e 's|mac|macos|'` 1416 1395 ;; 1417 - -linux-dietlibc) 1418 - os=-linux-dietlibc 1396 + opened*) 1397 + os=openedition 1419 1398 ;; 1420 - -linux*) 1421 - os=`echo $os | sed -e 's|linux|linux-gnu|'` 1399 + os400*) 1400 + os=os400 1422 1401 ;; 1423 - -sunos5*) 1402 + sunos5*) 1424 1403 os=`echo "$os" | sed -e 's|sunos5|solaris2|'` 1425 1404 ;; 1426 - -sunos6*) 1405 + sunos6*) 1427 1406 os=`echo "$os" | sed -e 's|sunos6|solaris3|'` 1428 1407 ;; 1429 - -opened*) 1430 - os=-openedition 1431 - ;; 1432 - -os400*) 1433 - os=-os400 1434 - ;; 1435 - -wince*) 1436 - os=-wince 1437 - ;; 1438 - -utek*) 1439 - os=-bsd 1408 + wince*) 1409 + os=wince 1440 1410 ;; 1441 - -dynix*) 1442 - os=-bsd 1411 + utek*) 1412 + os=bsd 1443 1413 ;; 1444 - -acis*) 1445 - os=-aos 1414 + dynix*) 1415 + os=bsd 1446 1416 ;; 1447 - -atheos*) 1448 - os=-atheos 1417 + acis*) 1418 + os=aos 1449 1419 ;; 1450 - -syllable*) 1451 - os=-syllable 1420 + atheos*) 1421 + os=atheos 1452 1422 ;; 1453 - -386bsd) 1454 - os=-bsd 1423 + syllable*) 1424 + os=syllable 1455 1425 ;; 1456 - -ctix* | -uts*) 1457 - os=-sysv 1426 + 386bsd) 1427 + os=bsd 1458 1428 ;; 1459 - -nova*) 1460 - os=-rtmk-nova 1429 + ctix* | uts*) 1430 + os=sysv 1461 1431 ;; 1462 - -ns2) 1463 - os=-nextstep2 1432 + nova*) 1433 + os=rtmk-nova 1464 1434 ;; 1465 - -nsk*) 1466 - os=-nsk 1435 + ns2) 1436 + os=nextstep2 1467 1437 ;; 1468 1438 # Preserve the version number of sinix5. 1469 - -sinix5.*) 1439 + sinix5.*) 1470 1440 os=`echo $os | sed -e 's|sinix|sysv|'` 1471 1441 ;; 1472 - -sinix*) 1473 - os=-sysv4 1442 + sinix*) 1443 + os=sysv4 1474 1444 ;; 1475 - -tpf*) 1476 - os=-tpf 1445 + tpf*) 1446 + os=tpf 1477 1447 ;; 1478 - -triton*) 1479 - os=-sysv3 1448 + triton*) 1449 + os=sysv3 1480 1450 ;; 1481 - -oss*) 1482 - os=-sysv3 1483 - ;; 1484 - -svr4*) 1485 - os=-sysv4 1486 - ;; 1487 - -svr3) 1488 - os=-sysv3 1451 + oss*) 1452 + os=sysv3 1489 1453 ;; 1490 - -sysvr4) 1491 - os=-sysv4 1454 + svr4*) 1455 + os=sysv4 1492 1456 ;; 1493 - # This must come after -sysvr4. 1494 - -sysv*) 1457 + svr3) 1458 + os=sysv3 1495 1459 ;; 1496 - -ose*) 1497 - os=-ose 1460 + sysvr4) 1461 + os=sysv4 1498 1462 ;; 1499 - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1500 - os=-mint 1463 + ose*) 1464 + os=ose 1501 1465 ;; 1502 - -zvmoe) 1503 - os=-zvmoe 1466 + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) 1467 + os=mint 1504 1468 ;; 1505 - -dicos*) 1506 - os=-dicos 1469 + dicos*) 1470 + os=dicos 1507 1471 ;; 1508 - -pikeos*) 1472 + pikeos*) 1509 1473 # Until real need of OS specific support for 1510 1474 # particular features comes up, bare metal 1511 1475 # configurations are quite functional. 1512 - case $basic_machine in 1476 + case $cpu in 1513 1477 arm*) 1514 - os=-eabi 1478 + os=eabi 1515 1479 ;; 1516 1480 *) 1517 - os=-elf 1481 + os=elf 1518 1482 ;; 1519 1483 esac 1520 1484 ;; 1521 - -nacl*) 1522 - ;; 1523 - -ios) 1524 - ;; 1525 - -none) 1526 - ;; 1527 1485 *) 1528 - # Get rid of the `-' at the beginning of $os. 1529 - os=`echo $os | sed 's/[^-]*-//'` 1530 - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 1531 - exit 1 1486 + # No normalization, but not necessarily accepted, that comes below. 1532 1487 ;; 1533 1488 esac 1489 + 1534 1490 else 1535 1491 1536 1492 # Here we handle the default operating systems that come with various machines. ··· 1543 1499 # will signal an error saying that MANUFACTURER isn't an operating 1544 1500 # system, and we'll never get to this point. 1545 1501 1546 - case $basic_machine in 1502 + kernel= 1503 + case $cpu-$vendor in 1547 1504 score-*) 1548 - os=-elf 1505 + os=elf 1549 1506 ;; 1550 1507 spu-*) 1551 - os=-elf 1508 + os=elf 1552 1509 ;; 1553 1510 *-acorn) 1554 - os=-riscix1.2 1511 + os=riscix1.2 1555 1512 ;; 1556 1513 arm*-rebel) 1557 - os=-linux 1514 + kernel=linux 1515 + os=gnu 1558 1516 ;; 1559 1517 arm*-semi) 1560 - os=-aout 1518 + os=aout 1561 1519 ;; 1562 1520 c4x-* | tic4x-*) 1563 - os=-coff 1521 + os=coff 1564 1522 ;; 1565 1523 c8051-*) 1566 - os=-elf 1524 + os=elf 1525 + ;; 1526 + clipper-intergraph) 1527 + os=clix 1567 1528 ;; 1568 1529 hexagon-*) 1569 - os=-elf 1530 + os=elf 1570 1531 ;; 1571 1532 tic54x-*) 1572 - os=-coff 1533 + os=coff 1573 1534 ;; 1574 1535 tic55x-*) 1575 - os=-coff 1536 + os=coff 1576 1537 ;; 1577 1538 tic6x-*) 1578 - os=-coff 1539 + os=coff 1579 1540 ;; 1580 1541 # This must come before the *-dec entry. 1581 1542 pdp10-*) 1582 - os=-tops20 1543 + os=tops20 1583 1544 ;; 1584 1545 pdp11-*) 1585 - os=-none 1546 + os=none 1586 1547 ;; 1587 1548 *-dec | vax-*) 1588 - os=-ultrix4.2 1549 + os=ultrix4.2 1589 1550 ;; 1590 1551 m68*-apollo) 1591 - os=-domain 1552 + os=domain 1592 1553 ;; 1593 1554 i386-sun) 1594 - os=-sunos4.0.2 1555 + os=sunos4.0.2 1595 1556 ;; 1596 1557 m68000-sun) 1597 - os=-sunos3 1558 + os=sunos3 1598 1559 ;; 1599 1560 m68*-cisco) 1600 - os=-aout 1561 + os=aout 1601 1562 ;; 1602 1563 mep-*) 1603 - os=-elf 1564 + os=elf 1604 1565 ;; 1605 1566 mips*-cisco) 1606 - os=-elf 1567 + os=elf 1607 1568 ;; 1608 1569 mips*-*) 1609 - os=-elf 1570 + os=elf 1610 1571 ;; 1611 1572 or32-*) 1612 - os=-coff 1573 + os=coff 1613 1574 ;; 1614 1575 *-tti) # must be before sparc entry or we get the wrong os. 1615 - os=-sysv3 1576 + os=sysv3 1616 1577 ;; 1617 1578 sparc-* | *-sun) 1618 - os=-sunos4.1.1 1579 + os=sunos4.1.1 1619 1580 ;; 1620 1581 pru-*) 1621 - os=-elf 1582 + os=elf 1622 1583 ;; 1623 1584 *-be) 1624 - os=-beos 1585 + os=beos 1625 1586 ;; 1626 1587 *-ibm) 1627 - os=-aix 1588 + os=aix 1628 1589 ;; 1629 1590 *-knuth) 1630 - os=-mmixware 1591 + os=mmixware 1631 1592 ;; 1632 1593 *-wec) 1633 - os=-proelf 1594 + os=proelf 1634 1595 ;; 1635 1596 *-winbond) 1636 - os=-proelf 1597 + os=proelf 1637 1598 ;; 1638 1599 *-oki) 1639 - os=-proelf 1600 + os=proelf 1640 1601 ;; 1641 1602 *-hp) 1642 - os=-hpux 1603 + os=hpux 1643 1604 ;; 1644 1605 *-hitachi) 1645 - os=-hiux 1606 + os=hiux 1646 1607 ;; 1647 1608 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1648 - os=-sysv 1609 + os=sysv 1649 1610 ;; 1650 1611 *-cbm) 1651 - os=-amigaos 1612 + os=amigaos 1652 1613 ;; 1653 1614 *-dg) 1654 - os=-dgux 1615 + os=dgux 1655 1616 ;; 1656 1617 *-dolphin) 1657 - os=-sysv3 1618 + os=sysv3 1658 1619 ;; 1659 1620 m68k-ccur) 1660 - os=-rtu 1621 + os=rtu 1661 1622 ;; 1662 1623 m88k-omron*) 1663 - os=-luna 1624 + os=luna 1664 1625 ;; 1665 1626 *-next) 1666 - os=-nextstep 1627 + os=nextstep 1667 1628 ;; 1668 1629 *-sequent) 1669 - os=-ptx 1630 + os=ptx 1670 1631 ;; 1671 1632 *-crds) 1672 - os=-unos 1633 + os=unos 1673 1634 ;; 1674 1635 *-ns) 1675 - os=-genix 1636 + os=genix 1676 1637 ;; 1677 1638 i370-*) 1678 - os=-mvs 1639 + os=mvs 1679 1640 ;; 1680 1641 *-gould) 1681 - os=-sysv 1642 + os=sysv 1682 1643 ;; 1683 1644 *-highlevel) 1684 - os=-bsd 1645 + os=bsd 1685 1646 ;; 1686 1647 *-encore) 1687 - os=-bsd 1648 + os=bsd 1688 1649 ;; 1689 1650 *-sgi) 1690 - os=-irix 1651 + os=irix 1691 1652 ;; 1692 1653 *-siemens) 1693 - os=-sysv4 1654 + os=sysv4 1694 1655 ;; 1695 1656 *-masscomp) 1696 - os=-rtu 1657 + os=rtu 1697 1658 ;; 1698 1659 f30[01]-fujitsu | f700-fujitsu) 1699 - os=-uxpv 1660 + os=uxpv 1700 1661 ;; 1701 1662 *-rom68k) 1702 - os=-coff 1663 + os=coff 1703 1664 ;; 1704 1665 *-*bug) 1705 - os=-coff 1666 + os=coff 1706 1667 ;; 1707 1668 *-apple) 1708 - os=-macos 1669 + os=macos 1709 1670 ;; 1710 1671 *-atari*) 1711 - os=-mint 1672 + os=mint 1673 + ;; 1674 + *-wrs) 1675 + os=vxworks 1712 1676 ;; 1713 1677 *) 1714 - os=-none 1678 + os=none 1715 1679 ;; 1716 1680 esac 1681 + 1717 1682 fi 1718 1683 1684 + # Now, validate our (potentially fixed-up) OS. 1685 + case $os in 1686 + # Sometimes we do "kernel-abi", so those need to count as OSes. 1687 + musl* | newlib* | uclibc*) 1688 + ;; 1689 + # Likewise for "kernel-libc" 1690 + eabi | eabihf | gnueabi | gnueabihf) 1691 + ;; 1692 + # Now accept the basic system types. 1693 + # The portable systems comes first. 1694 + # Each alternative MUST end in a * to match a version number. 1695 + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ 1696 + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ 1697 + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ 1698 + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ 1699 + | hiux* | abug | nacl* | netware* | windows* \ 1700 + | os9* | macos* | osx* | ios* \ 1701 + | mpw* | magic* | mmixware* | mon960* | lnews* \ 1702 + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ 1703 + | aos* | aros* | cloudabi* | sortix* | twizzler* \ 1704 + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ 1705 + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ 1706 + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ 1707 + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ 1708 + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ 1709 + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ 1710 + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ 1711 + | udi* | lites* | ieee* | go32* | aux* | hcos* \ 1712 + | chorusrdb* | cegcc* | glidix* \ 1713 + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ 1714 + | midipix* | mingw32* | mingw64* | mint* \ 1715 + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ 1716 + | interix* | uwin* | mks* | rhapsody* | darwin* \ 1717 + | openstep* | oskit* | conix* | pw32* | nonstopux* \ 1718 + | storm-chaos* | tops10* | tenex* | tops20* | its* \ 1719 + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ 1720 + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ 1721 + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ 1722 + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ 1723 + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ 1724 + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ 1725 + | nsk* | powerunix* | genode* | zvmoe* ) 1726 + ;; 1727 + # This one is extra strict with allowed versions 1728 + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) 1729 + # Don't forget version if it is 3.2v4 or newer. 1730 + ;; 1731 + none) 1732 + ;; 1733 + *) 1734 + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 1735 + exit 1 1736 + ;; 1737 + esac 1738 + 1739 + # As a final step for OS-related things, validate the OS-kernel combination 1740 + # (given a valid OS), if there is a kernel. 1741 + case $kernel-$os in 1742 + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) 1743 + ;; 1744 + -dietlibc* | -newlib* | -musl* | -uclibc* ) 1745 + # These are just libc implementations, not actual OSes, and thus 1746 + # require a kernel. 1747 + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 1748 + exit 1 1749 + ;; 1750 + kfreebsd*-gnu* | kopensolaris*-gnu*) 1751 + ;; 1752 + nto-qnx*) 1753 + ;; 1754 + *-eabi* | *-gnueabi*) 1755 + ;; 1756 + -*) 1757 + # Blank kernel with real OS is always fine. 1758 + ;; 1759 + *-*) 1760 + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 1761 + exit 1 1762 + ;; 1763 + esac 1764 + 1719 1765 # Here we handle the case where we know the os, and the CPU type, but not the 1720 1766 # manufacturer. We pick the logical manufacturer. 1721 - vendor=unknown 1722 - case $basic_machine in 1723 - *-unknown) 1724 - case $os in 1725 - -riscix*) 1767 + case $vendor in 1768 + unknown) 1769 + case $cpu-$os in 1770 + *-riscix*) 1726 1771 vendor=acorn 1727 1772 ;; 1728 - -sunos*) 1773 + *-sunos*) 1729 1774 vendor=sun 1730 1775 ;; 1731 - -cnk*|-aix*) 1776 + *-cnk* | *-aix*) 1732 1777 vendor=ibm 1733 1778 ;; 1734 - -beos*) 1779 + *-beos*) 1735 1780 vendor=be 1736 1781 ;; 1737 - -hpux*) 1782 + *-hpux*) 1738 1783 vendor=hp 1739 1784 ;; 1740 - -mpeix*) 1785 + *-mpeix*) 1741 1786 vendor=hp 1742 1787 ;; 1743 - -hiux*) 1788 + *-hiux*) 1744 1789 vendor=hitachi 1745 1790 ;; 1746 - -unos*) 1791 + *-unos*) 1747 1792 vendor=crds 1748 1793 ;; 1749 - -dgux*) 1794 + *-dgux*) 1750 1795 vendor=dg 1751 1796 ;; 1752 - -luna*) 1797 + *-luna*) 1753 1798 vendor=omron 1754 1799 ;; 1755 - -genix*) 1800 + *-genix*) 1756 1801 vendor=ns 1757 1802 ;; 1758 - -mvs* | -opened*) 1803 + *-clix*) 1804 + vendor=intergraph 1805 + ;; 1806 + *-mvs* | *-opened*) 1759 1807 vendor=ibm 1760 1808 ;; 1761 - -os400*) 1809 + *-os400*) 1762 1810 vendor=ibm 1763 1811 ;; 1764 - -ptx*) 1812 + s390-* | s390x-*) 1813 + vendor=ibm 1814 + ;; 1815 + *-ptx*) 1765 1816 vendor=sequent 1766 1817 ;; 1767 - -tpf*) 1818 + *-tpf*) 1768 1819 vendor=ibm 1769 1820 ;; 1770 - -vxsim* | -vxworks* | -windiss*) 1821 + *-vxsim* | *-vxworks* | *-windiss*) 1771 1822 vendor=wrs 1772 1823 ;; 1773 - -aux*) 1824 + *-aux*) 1774 1825 vendor=apple 1775 1826 ;; 1776 - -hms*) 1827 + *-hms*) 1777 1828 vendor=hitachi 1778 1829 ;; 1779 - -mpw* | -macos*) 1830 + *-mpw* | *-macos*) 1780 1831 vendor=apple 1781 1832 ;; 1782 - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1833 + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) 1783 1834 vendor=atari 1784 1835 ;; 1785 - -vos*) 1836 + *-vos*) 1786 1837 vendor=stratus 1787 1838 ;; 1788 1839 esac 1789 - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` 1790 1840 ;; 1791 1841 esac 1792 1842 1793 - echo "$basic_machine$os" 1843 + echo "$cpu-$vendor-${kernel:+$kernel-}$os" 1794 1844 exit 1795 1845 1796 1846 # Local variables: 1797 - # eval: (add-hook 'write-file-functions 'time-stamp) 1847 + # eval: (add-hook 'before-save-hook 'time-stamp) 1798 1848 # time-stamp-start: "timestamp='" 1799 1849 # time-stamp-format: "%:y-%02m-%02d" 1800 1850 # time-stamp-end: "'"