fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

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

configure: Update config.guess and config.sub

+2778 -1885
+960 -621
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-2024 Free Software Foundation, Inc. 4 4 5 - timestamp='2018-01-26' 5 + # shellcheck disable=SC2006,SC2268 # see below for rationale 6 + 7 + timestamp='2024-07-27' 6 8 7 9 # This file is free software; you can redistribute it and/or modify it 8 10 # under the terms of the GNU General Public License as published by 9 - # the Free Software Foundation; either version 3 of the License, or 11 + # the Free Software Foundation, either version 3 of the License, or 10 12 # (at your option) any later version. 11 13 # 12 14 # This program is distributed in the hope that it will be useful, but ··· 27 29 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28 30 # 29 31 # You can get the latest version of this script from: 30 - # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 32 + # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess 31 33 # 32 34 # Please send patches to <config-patches@gnu.org>. 33 35 34 36 37 + # The "shellcheck disable" line above the timestamp inhibits complaints 38 + # about features and limitations of the classic Bourne shell that were 39 + # superseded or lifted in POSIX. However, this script identifies a wide 40 + # variety of pre-POSIX systems that do not have POSIX shells at all, and 41 + # even some reasonably current systems (Solaris 10 as case-in-point) still 42 + # have a pre-POSIX /bin/sh. 43 + 44 + 35 45 me=`echo "$0" | sed -e 's,.*/,,'` 36 46 37 47 usage="\ 38 48 Usage: $0 [OPTION] 39 49 40 - Output the configuration name of the system \`$me' is run on. 50 + Output the configuration name of the system '$me' is run on. 41 51 42 52 Options: 43 53 -h, --help print this help, then exit ··· 50 60 GNU config.guess ($timestamp) 51 61 52 62 Originally written by Per Bothner. 53 - Copyright 1992-2018 Free Software Foundation, Inc. 63 + Copyright 1992-2024 Free Software Foundation, Inc. 54 64 55 65 This is free software; see the source for copying conditions. There is NO 56 66 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57 67 58 68 help=" 59 - Try \`$me --help' for more information." 69 + Try '$me --help' for more information." 60 70 61 71 # Parse command line 62 72 while test $# -gt 0 ; do ··· 84 94 exit 1 85 95 fi 86 96 87 - trap 'exit 1' 1 2 15 97 + # Just in case it came from the environment. 98 + GUESS= 88 99 89 100 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90 101 # compiler to aid in system detection is discouraged as it requires 91 102 # temporary files to be created and, as you can see below, it is a 92 103 # headache to deal with in a portable fashion. 93 104 94 - # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95 - # use `HOST_CC' if defined, but it is deprecated. 105 + # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still 106 + # use 'HOST_CC' if defined, but it is deprecated. 96 107 97 108 # Portable tmp directory creation inspired by the Autoconf team. 98 109 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= ;' 110 + tmp= 111 + # shellcheck disable=SC2172 112 + trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 113 + 114 + set_cc_for_build() { 115 + # prevent multiple calls if $tmp is already set 116 + test "$tmp" && return 0 117 + : "${TMPDIR=/tmp}" 118 + # shellcheck disable=SC2039,SC3028 119 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 120 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || 121 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || 122 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } 123 + dummy=$tmp/dummy 124 + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in 125 + ,,) echo "int x;" > "$dummy.c" 126 + for driver in cc gcc c17 c99 c89 ; do 127 + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then 128 + CC_FOR_BUILD=$driver 129 + break 130 + fi 131 + done 132 + if test x"$CC_FOR_BUILD" = x ; then 133 + CC_FOR_BUILD=no_compiler_found 134 + fi 135 + ;; 136 + ,,*) CC_FOR_BUILD=$CC ;; 137 + ,*,*) CC_FOR_BUILD=$HOST_CC ;; 138 + esac 139 + } 123 140 124 141 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125 142 # (ghazi@noc.rutgers.edu 1994-08-24) 126 - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 143 + if test -f /.attbin/uname ; then 127 144 PATH=$PATH:/.attbin ; export PATH 128 145 fi 129 146 130 147 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131 148 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132 - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 149 + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133 150 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134 151 135 - case "$UNAME_SYSTEM" in 152 + case $UNAME_SYSTEM in 136 153 Linux|GNU|GNU/*) 137 - # If the system lacks a compiler, then just pick glibc. 138 - # We could probably try harder. 139 - LIBC=gnu 154 + LIBC=unknown 140 155 141 - eval "$set_cc_for_build" 156 + set_cc_for_build 142 157 cat <<-EOF > "$dummy.c" 158 + #if defined(__ANDROID__) 159 + LIBC=android 160 + #else 143 161 #include <features.h> 144 162 #if defined(__UCLIBC__) 145 163 LIBC=uclibc 146 164 #elif defined(__dietlibc__) 147 165 LIBC=dietlibc 166 + #elif defined(__GLIBC__) 167 + LIBC=gnu 168 + #elif defined(__LLVM_LIBC__) 169 + LIBC=llvm 148 170 #else 149 - LIBC=gnu 171 + #include <stdarg.h> 172 + /* First heuristic to detect musl libc. */ 173 + #ifdef __DEFINED_va_list 174 + LIBC=musl 175 + #endif 176 + #endif 150 177 #endif 151 178 EOF 152 - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" 179 + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 180 + eval "$cc_set_libc" 153 181 154 - # If ldd exists, use it to detect musl libc. 155 - if command -v ldd >/dev/null && \ 156 - ldd --version 2>&1 | grep -q ^musl 157 - then 158 - LIBC=musl 182 + # Second heuristic to detect musl libc. 183 + if [ "$LIBC" = unknown ] && 184 + command -v ldd >/dev/null && 185 + ldd --version 2>&1 | grep -q ^musl; then 186 + LIBC=musl 187 + fi 188 + 189 + # If the system lacks a compiler, then just pick glibc. 190 + # We could probably try harder. 191 + if [ "$LIBC" = unknown ]; then 192 + LIBC=gnu 159 193 fi 160 194 ;; 161 195 esac 162 196 163 197 # Note: order is significant - the case branches are not exclusive. 164 198 165 - case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in 199 + case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in 166 200 *:NetBSD:*:*) 167 201 # NetBSD (nbsd) targets should (where applicable) match one or 168 202 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, ··· 174 208 # 175 209 # Note: NetBSD doesn't particularly care about the vendor 176 210 # portion of the name. We always set it to "unknown". 177 - sysctl="sysctl -n hw.machine_arch" 178 211 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ 179 - "/sbin/$sysctl" 2>/dev/null || \ 180 - "/usr/sbin/$sysctl" 2>/dev/null || \ 212 + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ 213 + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ 181 214 echo unknown)` 182 - case "$UNAME_MACHINE_ARCH" in 215 + case $UNAME_MACHINE_ARCH in 216 + aarch64eb) machine=aarch64_be-unknown ;; 183 217 armeb) machine=armeb-unknown ;; 184 218 arm*) machine=arm-unknown ;; 185 219 sh3el) machine=shl-unknown ;; ··· 188 222 earmv*) 189 223 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` 190 224 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` 191 - machine="${arch}${endian}"-unknown 225 + machine=${arch}${endian}-unknown 192 226 ;; 193 - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; 227 + *) machine=$UNAME_MACHINE_ARCH-unknown ;; 194 228 esac 195 229 # The Operating System including object format, if it has switched 196 230 # to ELF recently (or will in the future) and ABI. 197 - case "$UNAME_MACHINE_ARCH" in 231 + case $UNAME_MACHINE_ARCH in 198 232 earm*) 199 233 os=netbsdelf 200 234 ;; 201 235 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 202 - eval "$set_cc_for_build" 236 + set_cc_for_build 203 237 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 204 238 | grep -q __ELF__ 205 239 then ··· 215 249 ;; 216 250 esac 217 251 # Determine ABI tags. 218 - case "$UNAME_MACHINE_ARCH" in 252 + case $UNAME_MACHINE_ARCH in 219 253 earm*) 220 254 expr='s/^earmv[0-9]/-eabi/;s/eb$//' 221 255 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ··· 226 260 # thus, need a distinct triplet. However, they do not need 227 261 # kernel version information, so it can be replaced with a 228 262 # suitable tag, in the style of linux-gnu. 229 - case "$UNAME_VERSION" in 263 + case $UNAME_VERSION in 230 264 Debian*) 231 265 release='-gnu' 232 266 ;; ··· 237 271 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 238 272 # contains redundant information, the shorter form: 239 273 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 240 - echo "$machine-${os}${release}${abi}" 241 - exit ;; 274 + GUESS=$machine-${os}${release}${abi-} 275 + ;; 242 276 *:Bitrig:*:*) 243 277 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 244 - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" 245 - exit ;; 278 + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE 279 + ;; 246 280 *:OpenBSD:*:*) 247 281 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 248 - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" 249 - exit ;; 282 + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE 283 + ;; 284 + *:SecBSD:*:*) 285 + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` 286 + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE 287 + ;; 250 288 *:LibertyBSD:*:*) 251 289 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` 252 - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" 253 - exit ;; 290 + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE 291 + ;; 254 292 *:MidnightBSD:*:*) 255 - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" 256 - exit ;; 293 + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE 294 + ;; 257 295 *:ekkoBSD:*:*) 258 - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" 259 - exit ;; 296 + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE 297 + ;; 260 298 *:SolidBSD:*:*) 261 - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" 262 - exit ;; 299 + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE 300 + ;; 301 + *:OS108:*:*) 302 + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE 303 + ;; 263 304 macppc:MirBSD:*:*) 264 - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" 265 - exit ;; 305 + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE 306 + ;; 266 307 *:MirBSD:*:*) 267 - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" 268 - exit ;; 308 + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE 309 + ;; 269 310 *:Sortix:*:*) 270 - echo "$UNAME_MACHINE"-unknown-sortix 271 - exit ;; 311 + GUESS=$UNAME_MACHINE-unknown-sortix 312 + ;; 313 + *:Twizzler:*:*) 314 + GUESS=$UNAME_MACHINE-unknown-twizzler 315 + ;; 272 316 *:Redox:*:*) 273 - echo "$UNAME_MACHINE"-unknown-redox 274 - exit ;; 317 + GUESS=$UNAME_MACHINE-unknown-redox 318 + ;; 275 319 mips:OSF1:*.*) 276 - echo mips-dec-osf1 277 - exit ;; 320 + GUESS=mips-dec-osf1 321 + ;; 278 322 alpha:OSF1:*:*) 323 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 324 + trap '' 0 279 325 case $UNAME_RELEASE in 280 326 *4.0) 281 327 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ··· 289 335 # covers most systems running today. This code pipes the CPU 290 336 # types through head -n 1, so we only detect the type of CPU 0. 291 337 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 292 - case "$ALPHA_CPU_TYPE" in 338 + case $ALPHA_CPU_TYPE in 293 339 "EV4 (21064)") 294 340 UNAME_MACHINE=alpha ;; 295 341 "EV4.5 (21064)") ··· 326 372 # A Tn.n version is a released field test version. 327 373 # A Xn.n version is an unreleased experimental baselevel. 328 374 # 1.2 uses "1.2" for uname -r. 329 - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" 330 - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 331 - exitcode=$? 332 - trap '' 0 333 - exit $exitcode ;; 375 + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` 376 + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL 377 + ;; 334 378 Amiga*:UNIX_System_V:4.0:*) 335 - echo m68k-unknown-sysv4 336 - exit ;; 379 + GUESS=m68k-unknown-sysv4 380 + ;; 337 381 *:[Aa]miga[Oo][Ss]:*:*) 338 - echo "$UNAME_MACHINE"-unknown-amigaos 339 - exit ;; 382 + GUESS=$UNAME_MACHINE-unknown-amigaos 383 + ;; 340 384 *:[Mm]orph[Oo][Ss]:*:*) 341 - echo "$UNAME_MACHINE"-unknown-morphos 342 - exit ;; 385 + GUESS=$UNAME_MACHINE-unknown-morphos 386 + ;; 343 387 *:OS/390:*:*) 344 - echo i370-ibm-openedition 345 - exit ;; 388 + GUESS=i370-ibm-openedition 389 + ;; 346 390 *:z/VM:*:*) 347 - echo s390-ibm-zvmoe 348 - exit ;; 391 + GUESS=s390-ibm-zvmoe 392 + ;; 349 393 *:OS400:*:*) 350 - echo powerpc-ibm-os400 351 - exit ;; 394 + GUESS=powerpc-ibm-os400 395 + ;; 352 396 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 353 - echo arm-acorn-riscix"$UNAME_RELEASE" 354 - exit ;; 397 + GUESS=arm-acorn-riscix$UNAME_RELEASE 398 + ;; 355 399 arm*:riscos:*:*|arm*:RISCOS:*:*) 356 - echo arm-unknown-riscos 357 - exit ;; 400 + GUESS=arm-unknown-riscos 401 + ;; 358 402 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 359 - echo hppa1.1-hitachi-hiuxmpp 360 - exit ;; 403 + GUESS=hppa1.1-hitachi-hiuxmpp 404 + ;; 361 405 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 362 406 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 363 - if test "`(/bin/universe) 2>/dev/null`" = att ; then 364 - echo pyramid-pyramid-sysv3 365 - else 366 - echo pyramid-pyramid-bsd 367 - fi 368 - exit ;; 407 + case `(/bin/universe) 2>/dev/null` in 408 + att) GUESS=pyramid-pyramid-sysv3 ;; 409 + *) GUESS=pyramid-pyramid-bsd ;; 410 + esac 411 + ;; 369 412 NILE*:*:*:dcosx) 370 - echo pyramid-pyramid-svr4 371 - exit ;; 413 + GUESS=pyramid-pyramid-svr4 414 + ;; 372 415 DRS?6000:unix:4.0:6*) 373 - echo sparc-icl-nx6 374 - exit ;; 416 + GUESS=sparc-icl-nx6 417 + ;; 375 418 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 376 419 case `/usr/bin/uname -p` in 377 - sparc) echo sparc-icl-nx7; exit ;; 378 - esac ;; 420 + sparc) GUESS=sparc-icl-nx7 ;; 421 + esac 422 + ;; 379 423 s390x:SunOS:*:*) 380 - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" 381 - exit ;; 424 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` 425 + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL 426 + ;; 382 427 sun4H:SunOS:5.*:*) 383 - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 384 - exit ;; 428 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` 429 + GUESS=sparc-hal-solaris2$SUN_REL 430 + ;; 385 431 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 386 - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" 387 - exit ;; 432 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` 433 + GUESS=sparc-sun-solaris2$SUN_REL 434 + ;; 388 435 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 389 - echo i386-pc-auroraux"$UNAME_RELEASE" 390 - exit ;; 436 + GUESS=i386-pc-auroraux$UNAME_RELEASE 437 + ;; 391 438 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 392 - eval "$set_cc_for_build" 439 + set_cc_for_build 393 440 SUN_ARCH=i386 394 441 # If there is a compiler, see if it is configured for 64-bit objects. 395 442 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 396 443 # This test works for both compilers. 397 - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 444 + if test "$CC_FOR_BUILD" != no_compiler_found; then 398 445 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 399 - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 446 + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ 400 447 grep IS_64BIT_ARCH >/dev/null 401 448 then 402 449 SUN_ARCH=x86_64 403 450 fi 404 451 fi 405 - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 406 - exit ;; 452 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` 453 + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL 454 + ;; 407 455 sun4*:SunOS:6*:*) 408 456 # According to config.sub, this is the proper way to canonicalize 409 457 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 410 458 # it's likely to be more like Solaris than SunOS4. 411 - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 412 - exit ;; 459 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` 460 + GUESS=sparc-sun-solaris3$SUN_REL 461 + ;; 413 462 sun4*:SunOS:*:*) 414 - case "`/usr/bin/arch -k`" in 463 + case `/usr/bin/arch -k` in 415 464 Series*|S4*) 416 465 UNAME_RELEASE=`uname -v` 417 466 ;; 418 467 esac 419 - # Japanese Language versions have a version number like `4.1.3-JL'. 420 - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" 421 - exit ;; 468 + # Japanese Language versions have a version number like '4.1.3-JL'. 469 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` 470 + GUESS=sparc-sun-sunos$SUN_REL 471 + ;; 422 472 sun3*:SunOS:*:*) 423 - echo m68k-sun-sunos"$UNAME_RELEASE" 424 - exit ;; 473 + GUESS=m68k-sun-sunos$UNAME_RELEASE 474 + ;; 425 475 sun*:*:4.2BSD:*) 426 476 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 427 477 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 428 - case "`/bin/arch`" in 478 + case `/bin/arch` in 429 479 sun3) 430 - echo m68k-sun-sunos"$UNAME_RELEASE" 480 + GUESS=m68k-sun-sunos$UNAME_RELEASE 431 481 ;; 432 482 sun4) 433 - echo sparc-sun-sunos"$UNAME_RELEASE" 483 + GUESS=sparc-sun-sunos$UNAME_RELEASE 434 484 ;; 435 485 esac 436 - exit ;; 486 + ;; 437 487 aushp:SunOS:*:*) 438 - echo sparc-auspex-sunos"$UNAME_RELEASE" 439 - exit ;; 488 + GUESS=sparc-auspex-sunos$UNAME_RELEASE 489 + ;; 440 490 # The situation for MiNT is a little confusing. The machine name 441 491 # can be virtually everything (everything which is not 442 492 # "atarist" or "atariste" at least should have a processor ··· 446 496 # MiNT. But MiNT is downward compatible to TOS, so this should 447 497 # be no problem. 448 498 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 449 - echo m68k-atari-mint"$UNAME_RELEASE" 450 - exit ;; 499 + GUESS=m68k-atari-mint$UNAME_RELEASE 500 + ;; 451 501 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 452 - echo m68k-atari-mint"$UNAME_RELEASE" 453 - exit ;; 502 + GUESS=m68k-atari-mint$UNAME_RELEASE 503 + ;; 454 504 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 455 - echo m68k-atari-mint"$UNAME_RELEASE" 456 - exit ;; 505 + GUESS=m68k-atari-mint$UNAME_RELEASE 506 + ;; 457 507 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 458 - echo m68k-milan-mint"$UNAME_RELEASE" 459 - exit ;; 508 + GUESS=m68k-milan-mint$UNAME_RELEASE 509 + ;; 460 510 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 461 - echo m68k-hades-mint"$UNAME_RELEASE" 462 - exit ;; 511 + GUESS=m68k-hades-mint$UNAME_RELEASE 512 + ;; 463 513 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 464 - echo m68k-unknown-mint"$UNAME_RELEASE" 465 - exit ;; 514 + GUESS=m68k-unknown-mint$UNAME_RELEASE 515 + ;; 466 516 m68k:machten:*:*) 467 - echo m68k-apple-machten"$UNAME_RELEASE" 468 - exit ;; 517 + GUESS=m68k-apple-machten$UNAME_RELEASE 518 + ;; 469 519 powerpc:machten:*:*) 470 - echo powerpc-apple-machten"$UNAME_RELEASE" 471 - exit ;; 520 + GUESS=powerpc-apple-machten$UNAME_RELEASE 521 + ;; 472 522 RISC*:Mach:*:*) 473 - echo mips-dec-mach_bsd4.3 474 - exit ;; 523 + GUESS=mips-dec-mach_bsd4.3 524 + ;; 475 525 RISC*:ULTRIX:*:*) 476 - echo mips-dec-ultrix"$UNAME_RELEASE" 477 - exit ;; 526 + GUESS=mips-dec-ultrix$UNAME_RELEASE 527 + ;; 478 528 VAX*:ULTRIX*:*:*) 479 - echo vax-dec-ultrix"$UNAME_RELEASE" 480 - exit ;; 529 + GUESS=vax-dec-ultrix$UNAME_RELEASE 530 + ;; 481 531 2020:CLIX:*:* | 2430:CLIX:*:*) 482 - echo clipper-intergraph-clix"$UNAME_RELEASE" 483 - exit ;; 532 + GUESS=clipper-intergraph-clix$UNAME_RELEASE 533 + ;; 484 534 mips:*:*:UMIPS | mips:*:*:RISCos) 485 - eval "$set_cc_for_build" 535 + set_cc_for_build 486 536 sed 's/^ //' << EOF > "$dummy.c" 487 537 #ifdef __cplusplus 488 538 #include <stdio.h> /* for printf() prototype */ ··· 508 558 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && 509 559 SYSTEM_NAME=`"$dummy" "$dummyarg"` && 510 560 { echo "$SYSTEM_NAME"; exit; } 511 - echo mips-mips-riscos"$UNAME_RELEASE" 512 - exit ;; 561 + GUESS=mips-mips-riscos$UNAME_RELEASE 562 + ;; 513 563 Motorola:PowerMAX_OS:*:*) 514 - echo powerpc-motorola-powermax 515 - exit ;; 564 + GUESS=powerpc-motorola-powermax 565 + ;; 516 566 Motorola:*:4.3:PL8-*) 517 - echo powerpc-harris-powermax 518 - exit ;; 567 + GUESS=powerpc-harris-powermax 568 + ;; 519 569 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 520 - echo powerpc-harris-powermax 521 - exit ;; 570 + GUESS=powerpc-harris-powermax 571 + ;; 522 572 Night_Hawk:Power_UNIX:*:*) 523 - echo powerpc-harris-powerunix 524 - exit ;; 573 + GUESS=powerpc-harris-powerunix 574 + ;; 525 575 m88k:CX/UX:7*:*) 526 - echo m88k-harris-cxux7 527 - exit ;; 576 + GUESS=m88k-harris-cxux7 577 + ;; 528 578 m88k:*:4*:R4*) 529 - echo m88k-motorola-sysv4 530 - exit ;; 579 + GUESS=m88k-motorola-sysv4 580 + ;; 531 581 m88k:*:3*:R3*) 532 - echo m88k-motorola-sysv3 533 - exit ;; 582 + GUESS=m88k-motorola-sysv3 583 + ;; 534 584 AViiON:dgux:*:*) 535 585 # DG/UX returns AViiON for all architectures 536 586 UNAME_PROCESSOR=`/usr/bin/uname -p` 537 - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] 587 + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 538 588 then 539 - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ 540 - [ "$TARGET_BINARY_INTERFACE"x = x ] 589 + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ 590 + test "$TARGET_BINARY_INTERFACE"x = x 541 591 then 542 - echo m88k-dg-dgux"$UNAME_RELEASE" 592 + GUESS=m88k-dg-dgux$UNAME_RELEASE 543 593 else 544 - echo m88k-dg-dguxbcs"$UNAME_RELEASE" 594 + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE 545 595 fi 546 596 else 547 - echo i586-dg-dgux"$UNAME_RELEASE" 597 + GUESS=i586-dg-dgux$UNAME_RELEASE 548 598 fi 549 - exit ;; 599 + ;; 550 600 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 551 - echo m88k-dolphin-sysv3 552 - exit ;; 601 + GUESS=m88k-dolphin-sysv3 602 + ;; 553 603 M88*:*:R3*:*) 554 604 # Delta 88k system running SVR3 555 - echo m88k-motorola-sysv3 556 - exit ;; 605 + GUESS=m88k-motorola-sysv3 606 + ;; 557 607 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 558 - echo m88k-tektronix-sysv3 559 - exit ;; 608 + GUESS=m88k-tektronix-sysv3 609 + ;; 560 610 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 561 - echo m68k-tektronix-bsd 562 - exit ;; 611 + GUESS=m68k-tektronix-bsd 612 + ;; 563 613 *:IRIX*:*:*) 564 - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" 565 - exit ;; 614 + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` 615 + GUESS=mips-sgi-irix$IRIX_REL 616 + ;; 566 617 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 567 - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 568 - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 618 + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id 619 + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 569 620 i*86:AIX:*:*) 570 - echo i386-ibm-aix 571 - exit ;; 621 + GUESS=i386-ibm-aix 622 + ;; 572 623 ia64:AIX:*:*) 573 - if [ -x /usr/bin/oslevel ] ; then 624 + if test -x /usr/bin/oslevel ; then 574 625 IBM_REV=`/usr/bin/oslevel` 575 626 else 576 - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" 627 + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE 577 628 fi 578 - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" 579 - exit ;; 629 + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV 630 + ;; 580 631 *:AIX:2:3) 581 632 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 582 - eval "$set_cc_for_build" 633 + set_cc_for_build 583 634 sed 's/^ //' << EOF > "$dummy.c" 584 635 #include <sys/systemcfg.h> 585 636 586 - main() 637 + int 638 + main () 587 639 { 588 640 if (!__power_pc()) 589 641 exit(1); ··· 593 645 EOF 594 646 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` 595 647 then 596 - echo "$SYSTEM_NAME" 648 + GUESS=$SYSTEM_NAME 597 649 else 598 - echo rs6000-ibm-aix3.2.5 650 + GUESS=rs6000-ibm-aix3.2.5 599 651 fi 600 652 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 601 - echo rs6000-ibm-aix3.2.4 653 + GUESS=rs6000-ibm-aix3.2.4 602 654 else 603 - echo rs6000-ibm-aix3.2 655 + GUESS=rs6000-ibm-aix3.2 604 656 fi 605 - exit ;; 657 + ;; 606 658 *:AIX:*:[4567]) 607 659 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 608 660 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then ··· 610 662 else 611 663 IBM_ARCH=powerpc 612 664 fi 613 - if [ -x /usr/bin/lslpp ] ; then 614 - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 665 + if test -x /usr/bin/lslpp ; then 666 + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ 615 667 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 616 668 else 617 - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" 669 + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE 618 670 fi 619 - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" 620 - exit ;; 671 + GUESS=$IBM_ARCH-ibm-aix$IBM_REV 672 + ;; 621 673 *:AIX:*:*) 622 - echo rs6000-ibm-aix 623 - exit ;; 674 + GUESS=rs6000-ibm-aix 675 + ;; 624 676 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) 625 - echo romp-ibm-bsd4.4 626 - exit ;; 677 + GUESS=romp-ibm-bsd4.4 678 + ;; 627 679 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 628 - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to 629 - exit ;; # report: romp-ibm BSD 4.3 680 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to 681 + ;; # report: romp-ibm BSD 4.3 630 682 *:BOSX:*:*) 631 - echo rs6000-bull-bosx 632 - exit ;; 683 + GUESS=rs6000-bull-bosx 684 + ;; 633 685 DPX/2?00:B.O.S.:*:*) 634 - echo m68k-bull-sysv3 635 - exit ;; 686 + GUESS=m68k-bull-sysv3 687 + ;; 636 688 9000/[34]??:4.3bsd:1.*:*) 637 - echo m68k-hp-bsd 638 - exit ;; 689 + GUESS=m68k-hp-bsd 690 + ;; 639 691 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 640 - echo m68k-hp-bsd4.4 641 - exit ;; 692 + GUESS=m68k-hp-bsd4.4 693 + ;; 642 694 9000/[34678]??:HP-UX:*:*) 643 - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` 644 - case "$UNAME_MACHINE" in 695 + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` 696 + case $UNAME_MACHINE in 645 697 9000/31?) HP_ARCH=m68000 ;; 646 698 9000/[34]??) HP_ARCH=m68k ;; 647 699 9000/[678][0-9][0-9]) 648 - if [ -x /usr/bin/getconf ]; then 700 + if test -x /usr/bin/getconf; then 649 701 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 650 702 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 651 - case "$sc_cpu_version" in 703 + case $sc_cpu_version in 652 704 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 653 705 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 654 706 532) # CPU_PA_RISC2_0 655 - case "$sc_kernel_bits" in 707 + case $sc_kernel_bits in 656 708 32) HP_ARCH=hppa2.0n ;; 657 709 64) HP_ARCH=hppa2.0w ;; 658 710 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 659 711 esac ;; 660 712 esac 661 713 fi 662 - if [ "$HP_ARCH" = "" ]; then 663 - eval "$set_cc_for_build" 714 + if test "$HP_ARCH" = ""; then 715 + set_cc_for_build 664 716 sed 's/^ //' << EOF > "$dummy.c" 665 717 666 718 #define _HPUX_SOURCE 667 719 #include <stdlib.h> 668 720 #include <unistd.h> 669 721 670 - int main () 722 + int 723 + main () 671 724 { 672 725 #if defined(_SC_KERNEL_BITS) 673 726 long bits = sysconf(_SC_KERNEL_BITS); ··· 698 751 test -z "$HP_ARCH" && HP_ARCH=hppa 699 752 fi ;; 700 753 esac 701 - if [ "$HP_ARCH" = hppa2.0w ] 754 + if test "$HP_ARCH" = hppa2.0w 702 755 then 703 - eval "$set_cc_for_build" 756 + set_cc_for_build 704 757 705 758 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 706 759 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ··· 719 772 HP_ARCH=hppa64 720 773 fi 721 774 fi 722 - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" 723 - exit ;; 775 + GUESS=$HP_ARCH-hp-hpux$HPUX_REV 776 + ;; 724 777 ia64:HP-UX:*:*) 725 - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` 726 - echo ia64-hp-hpux"$HPUX_REV" 727 - exit ;; 778 + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` 779 + GUESS=ia64-hp-hpux$HPUX_REV 780 + ;; 728 781 3050*:HI-UX:*:*) 729 - eval "$set_cc_for_build" 782 + set_cc_for_build 730 783 sed 's/^ //' << EOF > "$dummy.c" 731 784 #include <unistd.h> 732 785 int ··· 754 807 EOF 755 808 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && 756 809 { echo "$SYSTEM_NAME"; exit; } 757 - echo unknown-hitachi-hiuxwe2 758 - exit ;; 810 + GUESS=unknown-hitachi-hiuxwe2 811 + ;; 759 812 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) 760 - echo hppa1.1-hp-bsd 761 - exit ;; 813 + GUESS=hppa1.1-hp-bsd 814 + ;; 762 815 9000/8??:4.3bsd:*:*) 763 - echo hppa1.0-hp-bsd 764 - exit ;; 816 + GUESS=hppa1.0-hp-bsd 817 + ;; 765 818 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 766 - echo hppa1.0-hp-mpeix 767 - exit ;; 819 + GUESS=hppa1.0-hp-mpeix 820 + ;; 768 821 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) 769 - echo hppa1.1-hp-osf 770 - exit ;; 822 + GUESS=hppa1.1-hp-osf 823 + ;; 771 824 hp8??:OSF1:*:*) 772 - echo hppa1.0-hp-osf 773 - exit ;; 825 + GUESS=hppa1.0-hp-osf 826 + ;; 774 827 i*86:OSF1:*:*) 775 - if [ -x /usr/sbin/sysversion ] ; then 776 - echo "$UNAME_MACHINE"-unknown-osf1mk 828 + if test -x /usr/sbin/sysversion ; then 829 + GUESS=$UNAME_MACHINE-unknown-osf1mk 777 830 else 778 - echo "$UNAME_MACHINE"-unknown-osf1 831 + GUESS=$UNAME_MACHINE-unknown-osf1 779 832 fi 780 - exit ;; 833 + ;; 781 834 parisc*:Lites*:*:*) 782 - echo hppa1.1-hp-lites 783 - exit ;; 835 + GUESS=hppa1.1-hp-lites 836 + ;; 784 837 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 785 - echo c1-convex-bsd 786 - exit ;; 838 + GUESS=c1-convex-bsd 839 + ;; 787 840 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 788 841 if getsysinfo -f scalar_acc 789 842 then echo c32-convex-bsd ··· 791 844 fi 792 845 exit ;; 793 846 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 794 - echo c34-convex-bsd 795 - exit ;; 847 + GUESS=c34-convex-bsd 848 + ;; 796 849 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 797 - echo c38-convex-bsd 798 - exit ;; 850 + GUESS=c38-convex-bsd 851 + ;; 799 852 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 800 - echo c4-convex-bsd 801 - exit ;; 853 + GUESS=c4-convex-bsd 854 + ;; 802 855 CRAY*Y-MP:*:*:*) 803 - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 804 - exit ;; 856 + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` 857 + GUESS=ymp-cray-unicos$CRAY_REL 858 + ;; 805 859 CRAY*[A-Z]90:*:*:*) 806 860 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ 807 861 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ ··· 809 863 -e 's/\.[^.]*$/.X/' 810 864 exit ;; 811 865 CRAY*TS:*:*:*) 812 - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 813 - exit ;; 866 + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` 867 + GUESS=t90-cray-unicos$CRAY_REL 868 + ;; 814 869 CRAY*T3E:*:*:*) 815 - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 816 - exit ;; 870 + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` 871 + GUESS=alphaev5-cray-unicosmk$CRAY_REL 872 + ;; 817 873 CRAY*SV1:*:*:*) 818 - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 819 - exit ;; 874 + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` 875 + GUESS=sv1-cray-unicos$CRAY_REL 876 + ;; 820 877 *:UNICOS/mp:*:*) 821 - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 822 - exit ;; 878 + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` 879 + GUESS=craynv-cray-unicosmp$CRAY_REL 880 + ;; 823 881 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 824 882 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` 825 883 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` 826 884 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` 827 - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 828 - exit ;; 885 + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} 886 + ;; 829 887 5000:UNIX_System_V:4.*:*) 830 888 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` 831 889 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` 832 - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 833 - exit ;; 890 + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} 891 + ;; 834 892 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 835 - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" 836 - exit ;; 893 + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE 894 + ;; 837 895 sparc*:BSD/OS:*:*) 838 - echo sparc-unknown-bsdi"$UNAME_RELEASE" 839 - exit ;; 896 + GUESS=sparc-unknown-bsdi$UNAME_RELEASE 897 + ;; 840 898 *:BSD/OS:*:*) 841 - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" 842 - exit ;; 899 + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE 900 + ;; 901 + arm:FreeBSD:*:*) 902 + UNAME_PROCESSOR=`uname -p` 903 + set_cc_for_build 904 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 905 + | grep -q __ARM_PCS_VFP 906 + then 907 + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` 908 + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi 909 + else 910 + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` 911 + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf 912 + fi 913 + ;; 843 914 *:FreeBSD:*:*) 844 - UNAME_PROCESSOR=`/usr/bin/uname -p` 845 - case "$UNAME_PROCESSOR" in 915 + UNAME_PROCESSOR=`uname -p` 916 + case $UNAME_PROCESSOR in 846 917 amd64) 847 918 UNAME_PROCESSOR=x86_64 ;; 848 919 i386) 849 920 UNAME_PROCESSOR=i586 ;; 850 921 esac 851 - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" 852 - exit ;; 922 + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` 923 + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL 924 + ;; 853 925 i*:CYGWIN*:*) 854 - echo "$UNAME_MACHINE"-pc-cygwin 855 - exit ;; 926 + GUESS=$UNAME_MACHINE-pc-cygwin 927 + ;; 856 928 *:MINGW64*:*) 857 - echo "$UNAME_MACHINE"-pc-mingw64 858 - exit ;; 929 + GUESS=$UNAME_MACHINE-pc-mingw64 930 + ;; 859 931 *:MINGW*:*) 860 - echo "$UNAME_MACHINE"-pc-mingw32 861 - exit ;; 932 + GUESS=$UNAME_MACHINE-pc-mingw32 933 + ;; 862 934 *:MSYS*:*) 863 - echo "$UNAME_MACHINE"-pc-msys 864 - exit ;; 935 + GUESS=$UNAME_MACHINE-pc-msys 936 + ;; 865 937 i*:PW*:*) 866 - echo "$UNAME_MACHINE"-pc-pw32 867 - exit ;; 938 + GUESS=$UNAME_MACHINE-pc-pw32 939 + ;; 940 + *:SerenityOS:*:*) 941 + GUESS=$UNAME_MACHINE-pc-serenity 942 + ;; 868 943 *:Interix*:*) 869 - case "$UNAME_MACHINE" in 944 + case $UNAME_MACHINE in 870 945 x86) 871 - echo i586-pc-interix"$UNAME_RELEASE" 872 - exit ;; 946 + GUESS=i586-pc-interix$UNAME_RELEASE 947 + ;; 873 948 authenticamd | genuineintel | EM64T) 874 - echo x86_64-unknown-interix"$UNAME_RELEASE" 875 - exit ;; 949 + GUESS=x86_64-unknown-interix$UNAME_RELEASE 950 + ;; 876 951 IA64) 877 - echo ia64-unknown-interix"$UNAME_RELEASE" 878 - exit ;; 952 + GUESS=ia64-unknown-interix$UNAME_RELEASE 953 + ;; 879 954 esac ;; 880 955 i*:UWIN*:*) 881 - echo "$UNAME_MACHINE"-pc-uwin 882 - exit ;; 956 + GUESS=$UNAME_MACHINE-pc-uwin 957 + ;; 883 958 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 884 - echo x86_64-unknown-cygwin 885 - exit ;; 959 + GUESS=x86_64-pc-cygwin 960 + ;; 886 961 prep*:SunOS:5.*:*) 887 - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" 888 - exit ;; 962 + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` 963 + GUESS=powerpcle-unknown-solaris2$SUN_REL 964 + ;; 889 965 *:GNU:*:*) 890 966 # the GNU system 891 - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" 892 - exit ;; 967 + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` 968 + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` 969 + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL 970 + ;; 893 971 *:GNU/*:*:*) 894 972 # other systems with GNU libc and userland 895 - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" 896 - exit ;; 897 - i*86:Minix:*:*) 898 - echo "$UNAME_MACHINE"-pc-minix 899 - exit ;; 973 + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` 974 + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` 975 + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC 976 + ;; 977 + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) 978 + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" 979 + ;; 980 + *:[Mm]anagarm:*:*) 981 + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" 982 + ;; 983 + *:Minix:*:*) 984 + GUESS=$UNAME_MACHINE-unknown-minix 985 + ;; 900 986 aarch64:Linux:*:*) 901 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 902 - exit ;; 987 + set_cc_for_build 988 + CPU=$UNAME_MACHINE 989 + LIBCABI=$LIBC 990 + if test "$CC_FOR_BUILD" != no_compiler_found; then 991 + ABI=64 992 + sed 's/^ //' << EOF > "$dummy.c" 993 + #ifdef __ARM_EABI__ 994 + #ifdef __ARM_PCS_VFP 995 + ABI=eabihf 996 + #else 997 + ABI=eabi 998 + #endif 999 + #endif 1000 + EOF 1001 + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` 1002 + eval "$cc_set_abi" 1003 + case $ABI in 1004 + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; 1005 + esac 1006 + fi 1007 + GUESS=$CPU-unknown-linux-$LIBCABI 1008 + ;; 903 1009 aarch64_be:Linux:*:*) 904 1010 UNAME_MACHINE=aarch64_be 905 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 906 - exit ;; 1011 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1012 + ;; 907 1013 alpha:Linux:*:*) 908 - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 1014 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in 909 1015 EV5) UNAME_MACHINE=alphaev5 ;; 910 1016 EV56) UNAME_MACHINE=alphaev56 ;; 911 1017 PCA56) UNAME_MACHINE=alphapca56 ;; ··· 916 1022 esac 917 1023 objdump --private-headers /bin/sh | grep -q ld.so.1 918 1024 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi 919 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 920 - exit ;; 921 - arc:Linux:*:* | arceb:Linux:*:*) 922 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 923 - exit ;; 1025 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1026 + ;; 1027 + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) 1028 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1029 + ;; 924 1030 arm*:Linux:*:*) 925 - eval "$set_cc_for_build" 1031 + set_cc_for_build 926 1032 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 927 1033 | grep -q __ARM_EABI__ 928 1034 then 929 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1035 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 930 1036 else 931 1037 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 932 1038 | grep -q __ARM_PCS_VFP 933 1039 then 934 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi 1040 + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi 935 1041 else 936 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf 1042 + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf 937 1043 fi 938 1044 fi 939 - exit ;; 1045 + ;; 940 1046 avr32*:Linux:*:*) 941 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 942 - exit ;; 1047 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1048 + ;; 943 1049 cris:Linux:*:*) 944 - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" 945 - exit ;; 1050 + GUESS=$UNAME_MACHINE-axis-linux-$LIBC 1051 + ;; 946 1052 crisv32:Linux:*:*) 947 - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" 948 - exit ;; 1053 + GUESS=$UNAME_MACHINE-axis-linux-$LIBC 1054 + ;; 949 1055 e2k:Linux:*:*) 950 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 951 - exit ;; 1056 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1057 + ;; 952 1058 frv:Linux:*:*) 953 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 954 - exit ;; 1059 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1060 + ;; 955 1061 hexagon:Linux:*:*) 956 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 957 - exit ;; 1062 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1063 + ;; 958 1064 i*86:Linux:*:*) 959 - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" 960 - exit ;; 1065 + GUESS=$UNAME_MACHINE-pc-linux-$LIBC 1066 + ;; 961 1067 ia64:Linux:*:*) 962 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 963 - exit ;; 1068 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1069 + ;; 964 1070 k1om:Linux:*:*) 965 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 966 - exit ;; 1071 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1072 + ;; 1073 + kvx:Linux:*:*) 1074 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1075 + ;; 1076 + kvx:cos:*:*) 1077 + GUESS=$UNAME_MACHINE-unknown-cos 1078 + ;; 1079 + kvx:mbr:*:*) 1080 + GUESS=$UNAME_MACHINE-unknown-mbr 1081 + ;; 1082 + loongarch32:Linux:*:* | loongarch64:Linux:*:*) 1083 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1084 + ;; 967 1085 m32r*:Linux:*:*) 968 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 969 - exit ;; 1086 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1087 + ;; 970 1088 m68*:Linux:*:*) 971 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 972 - exit ;; 1089 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1090 + ;; 973 1091 mips:Linux:*:* | mips64:Linux:*:*) 974 - eval "$set_cc_for_build" 1092 + set_cc_for_build 1093 + IS_GLIBC=0 1094 + test x"${LIBC}" = xgnu && IS_GLIBC=1 975 1095 sed 's/^ //' << EOF > "$dummy.c" 976 1096 #undef CPU 977 - #undef ${UNAME_MACHINE} 978 - #undef ${UNAME_MACHINE}el 1097 + #undef mips 1098 + #undef mipsel 1099 + #undef mips64 1100 + #undef mips64el 1101 + #if ${IS_GLIBC} && defined(_ABI64) 1102 + LIBCABI=gnuabi64 1103 + #else 1104 + #if ${IS_GLIBC} && defined(_ABIN32) 1105 + LIBCABI=gnuabin32 1106 + #else 1107 + LIBCABI=${LIBC} 1108 + #endif 1109 + #endif 1110 + 1111 + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 1112 + CPU=mipsisa64r6 1113 + #else 1114 + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 1115 + CPU=mipsisa32r6 1116 + #else 1117 + #if defined(__mips64) 1118 + CPU=mips64 1119 + #else 1120 + CPU=mips 1121 + #endif 1122 + #endif 1123 + #endif 1124 + 979 1125 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 980 - CPU=${UNAME_MACHINE}el 1126 + MIPS_ENDIAN=el 981 1127 #else 982 1128 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 983 - CPU=${UNAME_MACHINE} 1129 + MIPS_ENDIAN= 984 1130 #else 985 - CPU= 1131 + MIPS_ENDIAN= 986 1132 #endif 987 1133 #endif 988 1134 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; } 1135 + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` 1136 + eval "$cc_set_vars" 1137 + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } 991 1138 ;; 992 1139 mips64el:Linux:*:*) 993 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 994 - exit ;; 1140 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1141 + ;; 995 1142 openrisc*:Linux:*:*) 996 - echo or1k-unknown-linux-"$LIBC" 997 - exit ;; 1143 + GUESS=or1k-unknown-linux-$LIBC 1144 + ;; 998 1145 or32:Linux:*:* | or1k*:Linux:*:*) 999 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1000 - exit ;; 1146 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1147 + ;; 1001 1148 padre:Linux:*:*) 1002 - echo sparc-unknown-linux-"$LIBC" 1003 - exit ;; 1149 + GUESS=sparc-unknown-linux-$LIBC 1150 + ;; 1004 1151 parisc64:Linux:*:* | hppa64:Linux:*:*) 1005 - echo hppa64-unknown-linux-"$LIBC" 1006 - exit ;; 1152 + GUESS=hppa64-unknown-linux-$LIBC 1153 + ;; 1007 1154 parisc:Linux:*:* | hppa:Linux:*:*) 1008 1155 # Look for CPU level 1009 1156 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1010 - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; 1011 - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; 1012 - *) echo hppa-unknown-linux-"$LIBC" ;; 1157 + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; 1158 + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; 1159 + *) GUESS=hppa-unknown-linux-$LIBC ;; 1013 1160 esac 1014 - exit ;; 1161 + ;; 1015 1162 ppc64:Linux:*:*) 1016 - echo powerpc64-unknown-linux-"$LIBC" 1017 - exit ;; 1163 + GUESS=powerpc64-unknown-linux-$LIBC 1164 + ;; 1018 1165 ppc:Linux:*:*) 1019 - echo powerpc-unknown-linux-"$LIBC" 1020 - exit ;; 1166 + GUESS=powerpc-unknown-linux-$LIBC 1167 + ;; 1021 1168 ppc64le:Linux:*:*) 1022 - echo powerpc64le-unknown-linux-"$LIBC" 1023 - exit ;; 1169 + GUESS=powerpc64le-unknown-linux-$LIBC 1170 + ;; 1024 1171 ppcle:Linux:*:*) 1025 - echo powerpcle-unknown-linux-"$LIBC" 1026 - exit ;; 1027 - riscv32:Linux:*:* | riscv64:Linux:*:*) 1028 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1029 - exit ;; 1172 + GUESS=powerpcle-unknown-linux-$LIBC 1173 + ;; 1174 + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) 1175 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1176 + ;; 1030 1177 s390:Linux:*:* | s390x:Linux:*:*) 1031 - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" 1032 - exit ;; 1178 + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC 1179 + ;; 1033 1180 sh64*:Linux:*:*) 1034 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1035 - exit ;; 1181 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1182 + ;; 1036 1183 sh*:Linux:*:*) 1037 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1038 - exit ;; 1184 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1185 + ;; 1039 1186 sparc:Linux:*:* | sparc64:Linux:*:*) 1040 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1041 - exit ;; 1187 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1188 + ;; 1042 1189 tile*:Linux:*:*) 1043 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1044 - exit ;; 1190 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1191 + ;; 1045 1192 vax:Linux:*:*) 1046 - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" 1047 - exit ;; 1193 + GUESS=$UNAME_MACHINE-dec-linux-$LIBC 1194 + ;; 1048 1195 x86_64:Linux:*:*) 1049 - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" 1050 - exit ;; 1196 + set_cc_for_build 1197 + CPU=$UNAME_MACHINE 1198 + LIBCABI=$LIBC 1199 + if test "$CC_FOR_BUILD" != no_compiler_found; then 1200 + ABI=64 1201 + sed 's/^ //' << EOF > "$dummy.c" 1202 + #ifdef __i386__ 1203 + ABI=x86 1204 + #else 1205 + #ifdef __ILP32__ 1206 + ABI=x32 1207 + #endif 1208 + #endif 1209 + EOF 1210 + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` 1211 + eval "$cc_set_abi" 1212 + case $ABI in 1213 + x86) CPU=i686 ;; 1214 + x32) LIBCABI=${LIBC}x32 ;; 1215 + esac 1216 + fi 1217 + GUESS=$CPU-pc-linux-$LIBCABI 1218 + ;; 1051 1219 xtensa*:Linux:*:*) 1052 - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1053 - exit ;; 1220 + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC 1221 + ;; 1054 1222 i*86:DYNIX/ptx:4*:*) 1055 1223 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1056 1224 # earlier versions are messed up and put the nodename in both 1057 1225 # sysname and nodename. 1058 - echo i386-sequent-sysv4 1059 - exit ;; 1226 + GUESS=i386-sequent-sysv4 1227 + ;; 1060 1228 i*86:UNIX_SV:4.2MP:2.*) 1061 1229 # Unixware is an offshoot of SVR4, but it has its own version 1062 1230 # number series starting with 2... 1063 1231 # I am not positive that other SVR4 systems won't match this, 1064 1232 # I just have to hope. -- rms. 1065 1233 # Use sysv4.2uw... so that sysv4* matches it. 1066 - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" 1067 - exit ;; 1234 + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION 1235 + ;; 1068 1236 i*86:OS/2:*:*) 1069 - # If we were able to find `uname', then EMX Unix compatibility 1237 + # If we were able to find 'uname', then EMX Unix compatibility 1070 1238 # is probably installed. 1071 - echo "$UNAME_MACHINE"-pc-os2-emx 1072 - exit ;; 1239 + GUESS=$UNAME_MACHINE-pc-os2-emx 1240 + ;; 1073 1241 i*86:XTS-300:*:STOP) 1074 - echo "$UNAME_MACHINE"-unknown-stop 1075 - exit ;; 1242 + GUESS=$UNAME_MACHINE-unknown-stop 1243 + ;; 1076 1244 i*86:atheos:*:*) 1077 - echo "$UNAME_MACHINE"-unknown-atheos 1078 - exit ;; 1245 + GUESS=$UNAME_MACHINE-unknown-atheos 1246 + ;; 1079 1247 i*86:syllable:*:*) 1080 - echo "$UNAME_MACHINE"-pc-syllable 1081 - exit ;; 1248 + GUESS=$UNAME_MACHINE-pc-syllable 1249 + ;; 1082 1250 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1083 - echo i386-unknown-lynxos"$UNAME_RELEASE" 1084 - exit ;; 1251 + GUESS=i386-unknown-lynxos$UNAME_RELEASE 1252 + ;; 1085 1253 i*86:*DOS:*:*) 1086 - echo "$UNAME_MACHINE"-pc-msdosdjgpp 1087 - exit ;; 1254 + GUESS=$UNAME_MACHINE-pc-msdosdjgpp 1255 + ;; 1088 1256 i*86:*:4.*:*) 1089 1257 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` 1090 1258 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1091 - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" 1259 + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL 1092 1260 else 1093 - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" 1261 + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL 1094 1262 fi 1095 - exit ;; 1263 + ;; 1096 1264 i*86:*:5:[678]*) 1097 1265 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1098 1266 case `/bin/uname -X | grep "^Machine"` in ··· 1100 1268 *Pentium) UNAME_MACHINE=i586 ;; 1101 1269 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1102 1270 esac 1103 - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" 1104 - exit ;; 1271 + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1272 + ;; 1105 1273 i*86:*:3.2:*) 1106 1274 if test -f /usr/options/cb.name; then 1107 1275 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1108 - echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" 1276 + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL 1109 1277 elif /bin/uname -X 2>/dev/null >/dev/null ; then 1110 1278 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1111 1279 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ··· 1115 1283 && UNAME_MACHINE=i686 1116 1284 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1117 1285 && UNAME_MACHINE=i686 1118 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" 1286 + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL 1119 1287 else 1120 - echo "$UNAME_MACHINE"-pc-sysv32 1288 + GUESS=$UNAME_MACHINE-pc-sysv32 1121 1289 fi 1122 - exit ;; 1290 + ;; 1123 1291 pc:*:*:*) 1124 1292 # Left here for compatibility: 1125 1293 # uname -m prints for DJGPP always 'pc', but it prints nothing about ··· 1127 1295 # Note: whatever this is, it MUST be the same as what config.sub 1128 1296 # prints for the "djgpp" host, or else GDB configure will decide that 1129 1297 # this is a cross-build. 1130 - echo i586-pc-msdosdjgpp 1131 - exit ;; 1298 + GUESS=i586-pc-msdosdjgpp 1299 + ;; 1132 1300 Intel:Mach:3*:*) 1133 - echo i386-pc-mach3 1134 - exit ;; 1301 + GUESS=i386-pc-mach3 1302 + ;; 1135 1303 paragon:*:*:*) 1136 - echo i860-intel-osf1 1137 - exit ;; 1304 + GUESS=i860-intel-osf1 1305 + ;; 1138 1306 i860:*:4.*:*) # i860-SVR4 1139 1307 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1140 - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 1308 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 1141 1309 else # Add other i860-SVR4 vendors below as they are discovered. 1142 - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 1310 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 1143 1311 fi 1144 - exit ;; 1312 + ;; 1145 1313 mini*:CTIX:SYS*5:*) 1146 1314 # "miniframe" 1147 - echo m68010-convergent-sysv 1148 - exit ;; 1315 + GUESS=m68010-convergent-sysv 1316 + ;; 1149 1317 mc68k:UNIX:SYSTEM5:3.51m) 1150 - echo m68k-convergent-sysv 1151 - exit ;; 1318 + GUESS=m68k-convergent-sysv 1319 + ;; 1152 1320 M680?0:D-NIX:5.3:*) 1153 - echo m68k-diab-dnix 1154 - exit ;; 1321 + GUESS=m68k-diab-dnix 1322 + ;; 1155 1323 M68*:*:R3V[5678]*:*) 1156 1324 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1157 1325 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) ··· 1176 1344 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1177 1345 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 1178 1346 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1179 - echo m68k-unknown-lynxos"$UNAME_RELEASE" 1180 - exit ;; 1347 + GUESS=m68k-unknown-lynxos$UNAME_RELEASE 1348 + ;; 1181 1349 mc68030:UNIX_System_V:4.*:*) 1182 - echo m68k-atari-sysv4 1183 - exit ;; 1350 + GUESS=m68k-atari-sysv4 1351 + ;; 1184 1352 TSUNAMI:LynxOS:2.*:*) 1185 - echo sparc-unknown-lynxos"$UNAME_RELEASE" 1186 - exit ;; 1353 + GUESS=sparc-unknown-lynxos$UNAME_RELEASE 1354 + ;; 1187 1355 rs6000:LynxOS:2.*:*) 1188 - echo rs6000-unknown-lynxos"$UNAME_RELEASE" 1189 - exit ;; 1356 + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE 1357 + ;; 1190 1358 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1191 - echo powerpc-unknown-lynxos"$UNAME_RELEASE" 1192 - exit ;; 1359 + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE 1360 + ;; 1193 1361 SM[BE]S:UNIX_SV:*:*) 1194 - echo mips-dde-sysv"$UNAME_RELEASE" 1195 - exit ;; 1362 + GUESS=mips-dde-sysv$UNAME_RELEASE 1363 + ;; 1196 1364 RM*:ReliantUNIX-*:*:*) 1197 - echo mips-sni-sysv4 1198 - exit ;; 1365 + GUESS=mips-sni-sysv4 1366 + ;; 1199 1367 RM*:SINIX-*:*:*) 1200 - echo mips-sni-sysv4 1201 - exit ;; 1368 + GUESS=mips-sni-sysv4 1369 + ;; 1202 1370 *:SINIX-*:*:*) 1203 1371 if uname -p 2>/dev/null >/dev/null ; then 1204 1372 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1205 - echo "$UNAME_MACHINE"-sni-sysv4 1373 + GUESS=$UNAME_MACHINE-sni-sysv4 1206 1374 else 1207 - echo ns32k-sni-sysv 1375 + GUESS=ns32k-sni-sysv 1208 1376 fi 1209 - exit ;; 1210 - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1377 + ;; 1378 + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort 1211 1379 # says <Richard.M.Bartel@ccMail.Census.GOV> 1212 - echo i586-unisys-sysv4 1213 - exit ;; 1380 + GUESS=i586-unisys-sysv4 1381 + ;; 1214 1382 *:UNIX_System_V:4*:FTX*) 1215 1383 # From Gerald Hewes <hewes@openmarket.com>. 1216 1384 # How about differentiating between stratus architectures? -djm 1217 - echo hppa1.1-stratus-sysv4 1218 - exit ;; 1385 + GUESS=hppa1.1-stratus-sysv4 1386 + ;; 1219 1387 *:*:*:FTX*) 1220 1388 # From seanf@swdc.stratus.com. 1221 - echo i860-stratus-sysv4 1222 - exit ;; 1389 + GUESS=i860-stratus-sysv4 1390 + ;; 1223 1391 i*86:VOS:*:*) 1224 1392 # From Paul.Green@stratus.com. 1225 - echo "$UNAME_MACHINE"-stratus-vos 1226 - exit ;; 1393 + GUESS=$UNAME_MACHINE-stratus-vos 1394 + ;; 1227 1395 *:VOS:*:*) 1228 1396 # From Paul.Green@stratus.com. 1229 - echo hppa1.1-stratus-vos 1230 - exit ;; 1397 + GUESS=hppa1.1-stratus-vos 1398 + ;; 1231 1399 mc68*:A/UX:*:*) 1232 - echo m68k-apple-aux"$UNAME_RELEASE" 1233 - exit ;; 1400 + GUESS=m68k-apple-aux$UNAME_RELEASE 1401 + ;; 1234 1402 news*:NEWS-OS:6*:*) 1235 - echo mips-sony-newsos6 1236 - exit ;; 1403 + GUESS=mips-sony-newsos6 1404 + ;; 1237 1405 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1238 - if [ -d /usr/nec ]; then 1239 - echo mips-nec-sysv"$UNAME_RELEASE" 1406 + if test -d /usr/nec; then 1407 + GUESS=mips-nec-sysv$UNAME_RELEASE 1240 1408 else 1241 - echo mips-unknown-sysv"$UNAME_RELEASE" 1409 + GUESS=mips-unknown-sysv$UNAME_RELEASE 1242 1410 fi 1243 - exit ;; 1411 + ;; 1244 1412 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1245 - echo powerpc-be-beos 1246 - exit ;; 1413 + GUESS=powerpc-be-beos 1414 + ;; 1247 1415 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1248 - echo powerpc-apple-beos 1249 - exit ;; 1416 + GUESS=powerpc-apple-beos 1417 + ;; 1250 1418 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1251 - echo i586-pc-beos 1252 - exit ;; 1419 + GUESS=i586-pc-beos 1420 + ;; 1253 1421 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1254 - echo i586-pc-haiku 1255 - exit ;; 1256 - x86_64:Haiku:*:*) 1257 - echo x86_64-unknown-haiku 1258 - exit ;; 1422 + GUESS=i586-pc-haiku 1423 + ;; 1424 + ppc:Haiku:*:*) # Haiku running on Apple PowerPC 1425 + GUESS=powerpc-apple-haiku 1426 + ;; 1427 + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) 1428 + GUESS=$UNAME_MACHINE-unknown-haiku 1429 + ;; 1259 1430 SX-4:SUPER-UX:*:*) 1260 - echo sx4-nec-superux"$UNAME_RELEASE" 1261 - exit ;; 1431 + GUESS=sx4-nec-superux$UNAME_RELEASE 1432 + ;; 1262 1433 SX-5:SUPER-UX:*:*) 1263 - echo sx5-nec-superux"$UNAME_RELEASE" 1264 - exit ;; 1434 + GUESS=sx5-nec-superux$UNAME_RELEASE 1435 + ;; 1265 1436 SX-6:SUPER-UX:*:*) 1266 - echo sx6-nec-superux"$UNAME_RELEASE" 1267 - exit ;; 1437 + GUESS=sx6-nec-superux$UNAME_RELEASE 1438 + ;; 1268 1439 SX-7:SUPER-UX:*:*) 1269 - echo sx7-nec-superux"$UNAME_RELEASE" 1270 - exit ;; 1440 + GUESS=sx7-nec-superux$UNAME_RELEASE 1441 + ;; 1271 1442 SX-8:SUPER-UX:*:*) 1272 - echo sx8-nec-superux"$UNAME_RELEASE" 1273 - exit ;; 1443 + GUESS=sx8-nec-superux$UNAME_RELEASE 1444 + ;; 1274 1445 SX-8R:SUPER-UX:*:*) 1275 - echo sx8r-nec-superux"$UNAME_RELEASE" 1276 - exit ;; 1446 + GUESS=sx8r-nec-superux$UNAME_RELEASE 1447 + ;; 1277 1448 SX-ACE:SUPER-UX:*:*) 1278 - echo sxace-nec-superux"$UNAME_RELEASE" 1279 - exit ;; 1449 + GUESS=sxace-nec-superux$UNAME_RELEASE 1450 + ;; 1280 1451 Power*:Rhapsody:*:*) 1281 - echo powerpc-apple-rhapsody"$UNAME_RELEASE" 1282 - exit ;; 1452 + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE 1453 + ;; 1283 1454 *:Rhapsody:*:*) 1284 - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" 1285 - exit ;; 1455 + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE 1456 + ;; 1457 + arm64:Darwin:*:*) 1458 + GUESS=aarch64-apple-darwin$UNAME_RELEASE 1459 + ;; 1286 1460 *:Darwin:*:*) 1287 - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1288 - eval "$set_cc_for_build" 1289 - if test "$UNAME_PROCESSOR" = unknown ; then 1290 - UNAME_PROCESSOR=powerpc 1461 + UNAME_PROCESSOR=`uname -p` 1462 + case $UNAME_PROCESSOR in 1463 + unknown) UNAME_PROCESSOR=powerpc ;; 1464 + esac 1465 + if command -v xcode-select > /dev/null 2> /dev/null && \ 1466 + ! xcode-select --print-path > /dev/null 2> /dev/null ; then 1467 + # Avoid executing cc if there is no toolchain installed as 1468 + # cc will be a stub that puts up a graphical alert 1469 + # prompting the user to install developer tools. 1470 + CC_FOR_BUILD=no_compiler_found 1471 + else 1472 + set_cc_for_build 1291 1473 fi 1292 - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then 1293 - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 1294 - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1295 - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1296 - grep IS_64BIT_ARCH >/dev/null 1297 - then 1298 - case $UNAME_PROCESSOR in 1299 - i386) UNAME_PROCESSOR=x86_64 ;; 1300 - powerpc) UNAME_PROCESSOR=powerpc64 ;; 1301 - esac 1302 - fi 1303 - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc 1304 - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ 1305 - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1306 - grep IS_PPC >/dev/null 1307 - then 1308 - UNAME_PROCESSOR=powerpc 1309 - fi 1474 + if test "$CC_FOR_BUILD" != no_compiler_found; then 1475 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1476 + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1477 + grep IS_64BIT_ARCH >/dev/null 1478 + then 1479 + case $UNAME_PROCESSOR in 1480 + i386) UNAME_PROCESSOR=x86_64 ;; 1481 + powerpc) UNAME_PROCESSOR=powerpc64 ;; 1482 + esac 1483 + fi 1484 + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc 1485 + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ 1486 + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1487 + grep IS_PPC >/dev/null 1488 + then 1489 + UNAME_PROCESSOR=powerpc 1310 1490 fi 1311 1491 elif test "$UNAME_PROCESSOR" = i386 ; then 1312 - # Avoid executing cc on OS X 10.9, as it ships with a stub 1313 - # that puts up a graphical alert prompting to install 1314 - # developer tools. Any system running Mac OS X 10.7 or 1315 - # later (Darwin 11 and later) is required to have a 64-bit 1316 - # processor. This is not true of the ARM version of Darwin 1317 - # that Apple uses in portable devices. 1318 - UNAME_PROCESSOR=x86_64 1492 + # uname -m returns i386 or x86_64 1493 + UNAME_PROCESSOR=$UNAME_MACHINE 1319 1494 fi 1320 - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" 1321 - exit ;; 1495 + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE 1496 + ;; 1322 1497 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1323 1498 UNAME_PROCESSOR=`uname -p` 1324 1499 if test "$UNAME_PROCESSOR" = x86; then 1325 1500 UNAME_PROCESSOR=i386 1326 1501 UNAME_MACHINE=pc 1327 1502 fi 1328 - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" 1329 - exit ;; 1503 + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE 1504 + ;; 1330 1505 *:QNX:*:4*) 1331 - echo i386-pc-qnx 1332 - exit ;; 1506 + GUESS=i386-pc-qnx 1507 + ;; 1333 1508 NEO-*:NONSTOP_KERNEL:*:*) 1334 - echo neo-tandem-nsk"$UNAME_RELEASE" 1335 - exit ;; 1509 + GUESS=neo-tandem-nsk$UNAME_RELEASE 1510 + ;; 1336 1511 NSE-*:NONSTOP_KERNEL:*:*) 1337 - echo nse-tandem-nsk"$UNAME_RELEASE" 1338 - exit ;; 1512 + GUESS=nse-tandem-nsk$UNAME_RELEASE 1513 + ;; 1339 1514 NSR-*:NONSTOP_KERNEL:*:*) 1340 - echo nsr-tandem-nsk"$UNAME_RELEASE" 1341 - exit ;; 1515 + GUESS=nsr-tandem-nsk$UNAME_RELEASE 1516 + ;; 1342 1517 NSV-*:NONSTOP_KERNEL:*:*) 1343 - echo nsv-tandem-nsk"$UNAME_RELEASE" 1344 - exit ;; 1518 + GUESS=nsv-tandem-nsk$UNAME_RELEASE 1519 + ;; 1345 1520 NSX-*:NONSTOP_KERNEL:*:*) 1346 - echo nsx-tandem-nsk"$UNAME_RELEASE" 1347 - exit ;; 1521 + GUESS=nsx-tandem-nsk$UNAME_RELEASE 1522 + ;; 1348 1523 *:NonStop-UX:*:*) 1349 - echo mips-compaq-nonstopux 1350 - exit ;; 1524 + GUESS=mips-compaq-nonstopux 1525 + ;; 1351 1526 BS2000:POSIX*:*:*) 1352 - echo bs2000-siemens-sysv 1353 - exit ;; 1527 + GUESS=bs2000-siemens-sysv 1528 + ;; 1354 1529 DS/*:UNIX_System_V:*:*) 1355 - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" 1356 - exit ;; 1530 + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE 1531 + ;; 1357 1532 *:Plan9:*:*) 1358 1533 # "uname -m" is not consistent, so use $cputype instead. 386 1359 1534 # is converted to i386 for consistency with other x86 1360 1535 # operating systems. 1361 - if test "$cputype" = 386; then 1536 + if test "${cputype-}" = 386; then 1362 1537 UNAME_MACHINE=i386 1363 - else 1364 - UNAME_MACHINE="$cputype" 1538 + elif test "x${cputype-}" != x; then 1539 + UNAME_MACHINE=$cputype 1365 1540 fi 1366 - echo "$UNAME_MACHINE"-unknown-plan9 1367 - exit ;; 1541 + GUESS=$UNAME_MACHINE-unknown-plan9 1542 + ;; 1368 1543 *:TOPS-10:*:*) 1369 - echo pdp10-unknown-tops10 1370 - exit ;; 1544 + GUESS=pdp10-unknown-tops10 1545 + ;; 1371 1546 *:TENEX:*:*) 1372 - echo pdp10-unknown-tenex 1373 - exit ;; 1547 + GUESS=pdp10-unknown-tenex 1548 + ;; 1374 1549 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1375 - echo pdp10-dec-tops20 1376 - exit ;; 1550 + GUESS=pdp10-dec-tops20 1551 + ;; 1377 1552 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1378 - echo pdp10-xkl-tops20 1379 - exit ;; 1553 + GUESS=pdp10-xkl-tops20 1554 + ;; 1380 1555 *:TOPS-20:*:*) 1381 - echo pdp10-unknown-tops20 1382 - exit ;; 1556 + GUESS=pdp10-unknown-tops20 1557 + ;; 1383 1558 *:ITS:*:*) 1384 - echo pdp10-unknown-its 1385 - exit ;; 1559 + GUESS=pdp10-unknown-its 1560 + ;; 1386 1561 SEI:*:*:SEIUX) 1387 - echo mips-sei-seiux"$UNAME_RELEASE" 1388 - exit ;; 1562 + GUESS=mips-sei-seiux$UNAME_RELEASE 1563 + ;; 1389 1564 *:DragonFly:*:*) 1390 - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" 1391 - exit ;; 1565 + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` 1566 + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL 1567 + ;; 1392 1568 *:*VMS:*:*) 1393 1569 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1394 - case "$UNAME_MACHINE" in 1395 - A*) echo alpha-dec-vms ; exit ;; 1396 - I*) echo ia64-dec-vms ; exit ;; 1397 - V*) echo vax-dec-vms ; exit ;; 1570 + case $UNAME_MACHINE in 1571 + A*) GUESS=alpha-dec-vms ;; 1572 + I*) GUESS=ia64-dec-vms ;; 1573 + V*) GUESS=vax-dec-vms ;; 1398 1574 esac ;; 1399 1575 *:XENIX:*:SysV) 1400 - echo i386-pc-xenix 1401 - exit ;; 1576 + GUESS=i386-pc-xenix 1577 + ;; 1402 1578 i*86:skyos:*:*) 1403 - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" 1404 - exit ;; 1579 + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` 1580 + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL 1581 + ;; 1405 1582 i*86:rdos:*:*) 1406 - echo "$UNAME_MACHINE"-pc-rdos 1407 - exit ;; 1408 - i*86:AROS:*:*) 1409 - echo "$UNAME_MACHINE"-pc-aros 1410 - exit ;; 1583 + GUESS=$UNAME_MACHINE-pc-rdos 1584 + ;; 1585 + i*86:Fiwix:*:*) 1586 + GUESS=$UNAME_MACHINE-pc-fiwix 1587 + ;; 1588 + *:AROS:*:*) 1589 + GUESS=$UNAME_MACHINE-unknown-aros 1590 + ;; 1411 1591 x86_64:VMkernel:*:*) 1412 - echo "$UNAME_MACHINE"-unknown-esx 1413 - exit ;; 1592 + GUESS=$UNAME_MACHINE-unknown-esx 1593 + ;; 1414 1594 amd64:Isilon\ OneFS:*:*) 1415 - echo x86_64-unknown-onefs 1416 - exit ;; 1595 + GUESS=x86_64-unknown-onefs 1596 + ;; 1597 + *:Unleashed:*:*) 1598 + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE 1599 + ;; 1600 + *:Ironclad:*:*) 1601 + GUESS=$UNAME_MACHINE-unknown-ironclad 1602 + ;; 1417 1603 esac 1418 1604 1605 + # Do we have a guess based on uname results? 1606 + if test "x$GUESS" != x; then 1607 + echo "$GUESS" 1608 + exit 1609 + fi 1610 + 1611 + # No uname command or uname output not recognized. 1612 + set_cc_for_build 1613 + cat > "$dummy.c" <<EOF 1614 + #ifdef _SEQUENT_ 1615 + #include <sys/types.h> 1616 + #include <sys/utsname.h> 1617 + #endif 1618 + #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) 1619 + #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) 1620 + #include <signal.h> 1621 + #if defined(_SIZE_T_) || defined(SIGLOST) 1622 + #include <sys/utsname.h> 1623 + #endif 1624 + #endif 1625 + #endif 1626 + int 1627 + main () 1628 + { 1629 + #if defined (sony) 1630 + #if defined (MIPSEB) 1631 + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1632 + I don't know.... */ 1633 + printf ("mips-sony-bsd\n"); exit (0); 1634 + #else 1635 + #include <sys/param.h> 1636 + printf ("m68k-sony-newsos%s\n", 1637 + #ifdef NEWSOS4 1638 + "4" 1639 + #else 1640 + "" 1641 + #endif 1642 + ); exit (0); 1643 + #endif 1644 + #endif 1645 + 1646 + #if defined (NeXT) 1647 + #if !defined (__ARCHITECTURE__) 1648 + #define __ARCHITECTURE__ "m68k" 1649 + #endif 1650 + int version; 1651 + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1652 + if (version < 4) 1653 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1654 + else 1655 + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1656 + exit (0); 1657 + #endif 1658 + 1659 + #if defined (MULTIMAX) || defined (n16) 1660 + #if defined (UMAXV) 1661 + printf ("ns32k-encore-sysv\n"); exit (0); 1662 + #else 1663 + #if defined (CMU) 1664 + printf ("ns32k-encore-mach\n"); exit (0); 1665 + #else 1666 + printf ("ns32k-encore-bsd\n"); exit (0); 1667 + #endif 1668 + #endif 1669 + #endif 1670 + 1671 + #if defined (__386BSD__) 1672 + printf ("i386-pc-bsd\n"); exit (0); 1673 + #endif 1674 + 1675 + #if defined (sequent) 1676 + #if defined (i386) 1677 + printf ("i386-sequent-dynix\n"); exit (0); 1678 + #endif 1679 + #if defined (ns32000) 1680 + printf ("ns32k-sequent-dynix\n"); exit (0); 1681 + #endif 1682 + #endif 1683 + 1684 + #if defined (_SEQUENT_) 1685 + struct utsname un; 1686 + 1687 + uname(&un); 1688 + if (strncmp(un.version, "V2", 2) == 0) { 1689 + printf ("i386-sequent-ptx2\n"); exit (0); 1690 + } 1691 + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1692 + printf ("i386-sequent-ptx1\n"); exit (0); 1693 + } 1694 + printf ("i386-sequent-ptx\n"); exit (0); 1695 + #endif 1696 + 1697 + #if defined (vax) 1698 + #if !defined (ultrix) 1699 + #include <sys/param.h> 1700 + #if defined (BSD) 1701 + #if BSD == 43 1702 + printf ("vax-dec-bsd4.3\n"); exit (0); 1703 + #else 1704 + #if BSD == 199006 1705 + printf ("vax-dec-bsd4.3reno\n"); exit (0); 1706 + #else 1707 + printf ("vax-dec-bsd\n"); exit (0); 1708 + #endif 1709 + #endif 1710 + #else 1711 + printf ("vax-dec-bsd\n"); exit (0); 1712 + #endif 1713 + #else 1714 + #if defined(_SIZE_T_) || defined(SIGLOST) 1715 + struct utsname un; 1716 + uname (&un); 1717 + printf ("vax-dec-ultrix%s\n", un.release); exit (0); 1718 + #else 1719 + printf ("vax-dec-ultrix\n"); exit (0); 1720 + #endif 1721 + #endif 1722 + #endif 1723 + #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) 1724 + #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) 1725 + #if defined(_SIZE_T_) || defined(SIGLOST) 1726 + struct utsname *un; 1727 + uname (&un); 1728 + printf ("mips-dec-ultrix%s\n", un.release); exit (0); 1729 + #else 1730 + printf ("mips-dec-ultrix\n"); exit (0); 1731 + #endif 1732 + #endif 1733 + #endif 1734 + 1735 + #if defined (alliant) && defined (i860) 1736 + printf ("i860-alliant-bsd\n"); exit (0); 1737 + #endif 1738 + 1739 + exit (1); 1740 + } 1741 + EOF 1742 + 1743 + $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && 1744 + { echo "$SYSTEM_NAME"; exit; } 1745 + 1746 + # Apollos put the system type in the environment. 1747 + test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } 1748 + 1419 1749 echo "$0: unable to guess system type" >&2 1420 1750 1421 - case "$UNAME_MACHINE:$UNAME_SYSTEM" in 1751 + case $UNAME_MACHINE:$UNAME_SYSTEM in 1422 1752 mips:Linux | mips64:Linux) 1423 1753 # If we got here on MIPS GNU/Linux, output extra information. 1424 1754 cat >&2 <<EOF ··· 1435 1765 operating system you are using. If your script is old, overwrite *all* 1436 1766 copies of config.guess and config.sub with the latest versions from: 1437 1767 1438 - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 1768 + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess 1439 1769 and 1440 - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 1770 + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub 1771 + EOF 1772 + 1773 + our_year=`echo $timestamp | sed 's,-.*,,'` 1774 + thisyear=`date +%Y` 1775 + # shellcheck disable=SC2003 1776 + script_age=`expr "$thisyear" - "$our_year"` 1777 + if test "$script_age" -lt 3 ; then 1778 + cat >&2 <<EOF 1441 1779 1442 1780 If $0 has already been updated, send the following data and any 1443 1781 information you think might be pertinent to config-patches@gnu.org to ··· 1465 1803 UNAME_SYSTEM = "$UNAME_SYSTEM" 1466 1804 UNAME_VERSION = "$UNAME_VERSION" 1467 1805 EOF 1806 + fi 1468 1807 1469 1808 exit 1 1470 1809 1471 1810 # Local variables: 1472 - # eval: (add-hook 'write-file-functions 'time-stamp) 1811 + # eval: (add-hook 'before-save-hook 'time-stamp) 1473 1812 # time-stamp-start: "timestamp='" 1474 1813 # time-stamp-format: "%:y-%02m-%02d" 1475 1814 # time-stamp-end: "'"
+1818 -1264
config.sub
··· 1 1 #! /bin/sh 2 2 # Configuration validation subroutine script. 3 - # Copyright 1992-2018 Free Software Foundation, Inc. 3 + # Copyright 1992-2024 Free Software Foundation, Inc. 4 + 5 + # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale 4 6 5 - timestamp='2018-01-15' 7 + timestamp='2024-05-27' 6 8 7 9 # This file is free software; you can redistribute it and/or modify it 8 10 # under the terms of the GNU General Public License as published by 9 - # the Free Software Foundation; either version 3 of the License, or 11 + # the Free Software Foundation, either version 3 of the License, or 10 12 # (at your option) any later version. 11 13 # 12 14 # This program is distributed in the hope that it will be useful, but ··· 33 35 # Otherwise, we print the canonical config type on stdout and succeed. 34 36 35 37 # You can get the latest version of this script from: 36 - # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 38 + # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub 37 39 38 40 # This file is supposed to be the same for all GNU packages 39 41 # and recognize all the CPU types, system types and aliases ··· 50 52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 51 53 # It is wrong to echo any other type of specification. 52 54 55 + # The "shellcheck disable" line above the timestamp inhibits complaints 56 + # about features and limitations of the classic Bourne shell that were 57 + # superseded or lifted in POSIX. However, this script identifies a wide 58 + # variety of pre-POSIX systems that do not have POSIX shells at all, and 59 + # even some reasonably current systems (Solaris 10 as case-in-point) still 60 + # have a pre-POSIX /bin/sh. 61 + 53 62 me=`echo "$0" | sed -e 's,.*/,,'` 54 63 55 64 usage="\ ··· 67 76 version="\ 68 77 GNU config.sub ($timestamp) 69 78 70 - Copyright 1992-2018 Free Software Foundation, Inc. 79 + Copyright 1992-2024 Free Software Foundation, Inc. 71 80 72 81 This is free software; see the source for copying conditions. There is NO 73 82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 74 83 75 84 help=" 76 - Try \`$me --help' for more information." 85 + Try '$me --help' for more information." 77 86 78 87 # Parse command line 79 88 while test $# -gt 0 ; do ··· 89 98 - ) # Use stdin as input. 90 99 break ;; 91 100 -* ) 92 - echo "$me: invalid option $1$help" 101 + echo "$me: invalid option $1$help" >&2 93 102 exit 1 ;; 94 103 95 104 *local*) ··· 110 119 exit 1;; 111 120 esac 112 121 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 122 + # Split fields of configuration type 123 + saved_IFS=$IFS 124 + IFS="-" read field1 field2 field3 field4 <<EOF 125 + $1 126 + EOF 127 + IFS=$saved_IFS 136 128 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. 129 + # Separate into logical components for further validation 130 + case $1 in 131 + *-*-*-*-*) 132 + echo "Invalid configuration '$1': more than four components" >&2 133 + exit 1 144 134 ;; 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 135 + *-*-*-*) 136 + basic_machine=$field1-$field2 137 + basic_os=$field3-$field4 154 138 ;; 155 - -bluegene*) 156 - os=-cnk 139 + *-*-*) 140 + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two 141 + # parts 142 + maybe_os=$field2-$field3 143 + case $maybe_os in 144 + cloudabi*-eabi* \ 145 + | kfreebsd*-gnu* \ 146 + | knetbsd*-gnu* \ 147 + | kopensolaris*-gnu* \ 148 + | linux-* \ 149 + | managarm-* \ 150 + | netbsd*-eabi* \ 151 + | netbsd*-gnu* \ 152 + | nto-qnx* \ 153 + | os2-emx* \ 154 + | rtmk-nova* \ 155 + | storm-chaos* \ 156 + | uclinux-gnu* \ 157 + | uclinux-uclibc* \ 158 + | windows-* ) 159 + basic_machine=$field1 160 + basic_os=$maybe_os 161 + ;; 162 + android-linux) 163 + basic_machine=$field1-unknown 164 + basic_os=linux-android 165 + ;; 166 + *) 167 + basic_machine=$field1-$field2 168 + basic_os=$field3 169 + ;; 170 + esac 157 171 ;; 158 - -sim | -cisco | -oki | -wec | -winbond) 159 - os= 160 - basic_machine=$1 172 + *-*) 173 + case $field1-$field2 in 174 + # Shorthands that happen to contain a single dash 175 + convex-c[12] | convex-c3[248]) 176 + basic_machine=$field2-convex 177 + basic_os= 178 + ;; 179 + decstation-3100) 180 + basic_machine=mips-dec 181 + basic_os= 182 + ;; 183 + *-*) 184 + # Second component is usually, but not always the OS 185 + case $field2 in 186 + # Do not treat sunos as a manufacturer 187 + sun*os*) 188 + basic_machine=$field1 189 + basic_os=$field2 190 + ;; 191 + # Manufacturers 192 + 3100* \ 193 + | 32* \ 194 + | 3300* \ 195 + | 3600* \ 196 + | 7300* \ 197 + | acorn \ 198 + | altos* \ 199 + | apollo \ 200 + | apple \ 201 + | atari \ 202 + | att* \ 203 + | axis \ 204 + | be \ 205 + | bull \ 206 + | cbm \ 207 + | ccur \ 208 + | cisco \ 209 + | commodore \ 210 + | convergent* \ 211 + | convex* \ 212 + | cray \ 213 + | crds \ 214 + | dec* \ 215 + | delta* \ 216 + | dg \ 217 + | digital \ 218 + | dolphin \ 219 + | encore* \ 220 + | gould \ 221 + | harris \ 222 + | highlevel \ 223 + | hitachi* \ 224 + | hp \ 225 + | ibm* \ 226 + | intergraph \ 227 + | isi* \ 228 + | knuth \ 229 + | masscomp \ 230 + | microblaze* \ 231 + | mips* \ 232 + | motorola* \ 233 + | ncr* \ 234 + | news \ 235 + | next \ 236 + | ns \ 237 + | oki \ 238 + | omron* \ 239 + | pc533* \ 240 + | rebel \ 241 + | rom68k \ 242 + | rombug \ 243 + | semi \ 244 + | sequent* \ 245 + | siemens \ 246 + | sgi* \ 247 + | siemens \ 248 + | sim \ 249 + | sni \ 250 + | sony* \ 251 + | stratus \ 252 + | sun \ 253 + | sun[234]* \ 254 + | tektronix \ 255 + | tti* \ 256 + | ultra \ 257 + | unicom* \ 258 + | wec \ 259 + | winbond \ 260 + | wrs) 261 + basic_machine=$field1-$field2 262 + basic_os= 263 + ;; 264 + zephyr*) 265 + basic_machine=$field1-unknown 266 + basic_os=$field2 267 + ;; 268 + *) 269 + basic_machine=$field1 270 + basic_os=$field2 271 + ;; 272 + esac 273 + ;; 274 + esac 161 275 ;; 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 216 - ;; 217 - -isc*) 218 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 219 - ;; 220 - -lynx*178) 221 - os=-lynxos178 222 - ;; 223 - -lynx*5) 224 - os=-lynxos5 225 - ;; 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 276 + *) 277 + # Convert single-component short-hands not valid as part of 278 + # multi-component configurations. 279 + case $field1 in 280 + 386bsd) 281 + basic_machine=i386-pc 282 + basic_os=bsd 283 + ;; 284 + a29khif) 285 + basic_machine=a29k-amd 286 + basic_os=udi 287 + ;; 288 + adobe68k) 289 + basic_machine=m68010-adobe 290 + basic_os=scout 291 + ;; 292 + alliant) 293 + basic_machine=fx80-alliant 294 + basic_os= 295 + ;; 296 + altos | altos3068) 297 + basic_machine=m68k-altos 298 + basic_os= 299 + ;; 300 + am29k) 301 + basic_machine=a29k-none 302 + basic_os=bsd 303 + ;; 304 + amdahl) 305 + basic_machine=580-amdahl 306 + basic_os=sysv 307 + ;; 308 + amiga) 309 + basic_machine=m68k-unknown 310 + basic_os= 311 + ;; 312 + amigaos | amigados) 313 + basic_machine=m68k-unknown 314 + basic_os=amigaos 315 + ;; 316 + amigaunix | amix) 317 + basic_machine=m68k-unknown 318 + basic_os=sysv4 319 + ;; 320 + apollo68) 321 + basic_machine=m68k-apollo 322 + basic_os=sysv 323 + ;; 324 + apollo68bsd) 325 + basic_machine=m68k-apollo 326 + basic_os=bsd 327 + ;; 328 + aros) 329 + basic_machine=i386-pc 330 + basic_os=aros 331 + ;; 332 + aux) 333 + basic_machine=m68k-apple 334 + basic_os=aux 335 + ;; 336 + balance) 337 + basic_machine=ns32k-sequent 338 + basic_os=dynix 339 + ;; 340 + blackfin) 341 + basic_machine=bfin-unknown 342 + basic_os=linux 343 + ;; 344 + cegcc) 345 + basic_machine=arm-unknown 346 + basic_os=cegcc 347 + ;; 348 + cray) 349 + basic_machine=j90-cray 350 + basic_os=unicos 351 + ;; 352 + crds | unos) 353 + basic_machine=m68k-crds 354 + basic_os= 355 + ;; 356 + da30) 357 + basic_machine=m68k-da30 358 + basic_os= 359 + ;; 360 + decstation | pmax | pmin | dec3100 | decstatn) 361 + basic_machine=mips-dec 362 + basic_os= 363 + ;; 364 + delta88) 365 + basic_machine=m88k-motorola 366 + basic_os=sysv3 367 + ;; 368 + dicos) 369 + basic_machine=i686-pc 370 + basic_os=dicos 371 + ;; 372 + djgpp) 373 + basic_machine=i586-pc 374 + basic_os=msdosdjgpp 375 + ;; 376 + ebmon29k) 377 + basic_machine=a29k-amd 378 + basic_os=ebmon 379 + ;; 380 + es1800 | OSE68k | ose68k | ose | OSE) 381 + basic_machine=m68k-ericsson 382 + basic_os=ose 383 + ;; 384 + gmicro) 385 + basic_machine=tron-gmicro 386 + basic_os=sysv 387 + ;; 388 + go32) 389 + basic_machine=i386-pc 390 + basic_os=go32 391 + ;; 392 + h8300hms) 393 + basic_machine=h8300-hitachi 394 + basic_os=hms 395 + ;; 396 + h8300xray) 397 + basic_machine=h8300-hitachi 398 + basic_os=xray 399 + ;; 400 + h8500hms) 401 + basic_machine=h8500-hitachi 402 + basic_os=hms 403 + ;; 404 + harris) 405 + basic_machine=m88k-harris 406 + basic_os=sysv3 407 + ;; 408 + hp300 | hp300hpux) 409 + basic_machine=m68k-hp 410 + basic_os=hpux 411 + ;; 412 + hp300bsd) 413 + basic_machine=m68k-hp 414 + basic_os=bsd 415 + ;; 416 + hppaosf) 417 + basic_machine=hppa1.1-hp 418 + basic_os=osf 419 + ;; 420 + hppro) 421 + basic_machine=hppa1.1-hp 422 + basic_os=proelf 423 + ;; 424 + i386mach) 425 + basic_machine=i386-mach 426 + basic_os=mach 427 + ;; 428 + isi68 | isi) 429 + basic_machine=m68k-isi 430 + basic_os=sysv 431 + ;; 432 + m68knommu) 433 + basic_machine=m68k-unknown 434 + basic_os=linux 435 + ;; 436 + magnum | m3230) 437 + basic_machine=mips-mips 438 + basic_os=sysv 439 + ;; 440 + merlin) 441 + basic_machine=ns32k-utek 442 + basic_os=sysv 443 + ;; 444 + mingw64) 445 + basic_machine=x86_64-pc 446 + basic_os=mingw64 447 + ;; 448 + mingw32) 449 + basic_machine=i686-pc 450 + basic_os=mingw32 451 + ;; 452 + mingw32ce) 453 + basic_machine=arm-unknown 454 + basic_os=mingw32ce 455 + ;; 456 + monitor) 457 + basic_machine=m68k-rom68k 458 + basic_os=coff 459 + ;; 460 + morphos) 461 + basic_machine=powerpc-unknown 462 + basic_os=morphos 463 + ;; 464 + moxiebox) 465 + basic_machine=moxie-unknown 466 + basic_os=moxiebox 467 + ;; 468 + msdos) 469 + basic_machine=i386-pc 470 + basic_os=msdos 471 + ;; 472 + msys) 473 + basic_machine=i686-pc 474 + basic_os=msys 475 + ;; 476 + mvs) 477 + basic_machine=i370-ibm 478 + basic_os=mvs 479 + ;; 480 + nacl) 481 + basic_machine=le32-unknown 482 + basic_os=nacl 483 + ;; 484 + ncr3000) 485 + basic_machine=i486-ncr 486 + basic_os=sysv4 487 + ;; 488 + netbsd386) 489 + basic_machine=i386-pc 490 + basic_os=netbsd 491 + ;; 492 + netwinder) 493 + basic_machine=armv4l-rebel 494 + basic_os=linux 495 + ;; 496 + news | news700 | news800 | news900) 497 + basic_machine=m68k-sony 498 + basic_os=newsos 499 + ;; 500 + news1000) 501 + basic_machine=m68030-sony 502 + basic_os=newsos 503 + ;; 504 + necv70) 505 + basic_machine=v70-nec 506 + basic_os=sysv 507 + ;; 508 + nh3000) 509 + basic_machine=m68k-harris 510 + basic_os=cxux 511 + ;; 512 + nh[45]000) 513 + basic_machine=m88k-harris 514 + basic_os=cxux 515 + ;; 516 + nindy960) 517 + basic_machine=i960-intel 518 + basic_os=nindy 519 + ;; 520 + mon960) 521 + basic_machine=i960-intel 522 + basic_os=mon960 523 + ;; 524 + nonstopux) 525 + basic_machine=mips-compaq 526 + basic_os=nonstopux 527 + ;; 528 + os400) 529 + basic_machine=powerpc-ibm 530 + basic_os=os400 531 + ;; 532 + OSE68000 | ose68000) 533 + basic_machine=m68000-ericsson 534 + basic_os=ose 535 + ;; 536 + os68k) 537 + basic_machine=m68k-none 538 + basic_os=os68k 539 + ;; 540 + paragon) 541 + basic_machine=i860-intel 542 + basic_os=osf 543 + ;; 544 + parisc) 545 + basic_machine=hppa-unknown 546 + basic_os=linux 547 + ;; 548 + psp) 549 + basic_machine=mipsallegrexel-sony 550 + basic_os=psp 551 + ;; 552 + pw32) 553 + basic_machine=i586-unknown 554 + basic_os=pw32 555 + ;; 556 + rdos | rdos64) 557 + basic_machine=x86_64-pc 558 + basic_os=rdos 559 + ;; 560 + rdos32) 561 + basic_machine=i386-pc 562 + basic_os=rdos 563 + ;; 564 + rom68k) 565 + basic_machine=m68k-rom68k 566 + basic_os=coff 567 + ;; 568 + sa29200) 569 + basic_machine=a29k-amd 570 + basic_os=udi 571 + ;; 572 + sei) 573 + basic_machine=mips-sei 574 + basic_os=seiux 575 + ;; 576 + sequent) 577 + basic_machine=i386-sequent 578 + basic_os= 579 + ;; 580 + sps7) 581 + basic_machine=m68k-bull 582 + basic_os=sysv2 583 + ;; 584 + st2000) 585 + basic_machine=m68k-tandem 586 + basic_os= 587 + ;; 588 + stratus) 589 + basic_machine=i860-stratus 590 + basic_os=sysv4 591 + ;; 592 + sun2) 593 + basic_machine=m68000-sun 594 + basic_os= 595 + ;; 596 + sun2os3) 597 + basic_machine=m68000-sun 598 + basic_os=sunos3 599 + ;; 600 + sun2os4) 601 + basic_machine=m68000-sun 602 + basic_os=sunos4 603 + ;; 604 + sun3) 605 + basic_machine=m68k-sun 606 + basic_os= 607 + ;; 608 + sun3os3) 609 + basic_machine=m68k-sun 610 + basic_os=sunos3 611 + ;; 612 + sun3os4) 613 + basic_machine=m68k-sun 614 + basic_os=sunos4 615 + ;; 616 + sun4) 617 + basic_machine=sparc-sun 618 + basic_os= 619 + ;; 620 + sun4os3) 621 + basic_machine=sparc-sun 622 + basic_os=sunos3 623 + ;; 624 + sun4os4) 625 + basic_machine=sparc-sun 626 + basic_os=sunos4 627 + ;; 628 + sun4sol2) 629 + basic_machine=sparc-sun 630 + basic_os=solaris2 631 + ;; 632 + sun386 | sun386i | roadrunner) 633 + basic_machine=i386-sun 634 + basic_os= 635 + ;; 636 + sv1) 637 + basic_machine=sv1-cray 638 + basic_os=unicos 639 + ;; 640 + symmetry) 641 + basic_machine=i386-sequent 642 + basic_os=dynix 643 + ;; 644 + t3e) 645 + basic_machine=alphaev5-cray 646 + basic_os=unicos 647 + ;; 648 + t90) 649 + basic_machine=t90-cray 650 + basic_os=unicos 651 + ;; 652 + toad1) 653 + basic_machine=pdp10-xkl 654 + basic_os=tops20 655 + ;; 656 + tpf) 657 + basic_machine=s390x-ibm 658 + basic_os=tpf 659 + ;; 660 + udi29k) 661 + basic_machine=a29k-amd 662 + basic_os=udi 663 + ;; 664 + ultra3) 665 + basic_machine=a29k-nyu 666 + basic_os=sym1 667 + ;; 668 + v810 | necv810) 669 + basic_machine=v810-nec 670 + basic_os=none 671 + ;; 672 + vaxv) 673 + basic_machine=vax-dec 674 + basic_os=sysv 675 + ;; 676 + vms) 677 + basic_machine=vax-dec 678 + basic_os=vms 679 + ;; 680 + vsta) 681 + basic_machine=i386-pc 682 + basic_os=vsta 683 + ;; 684 + vxworks960) 685 + basic_machine=i960-wrs 686 + basic_os=vxworks 687 + ;; 688 + vxworks68) 689 + basic_machine=m68k-wrs 690 + basic_os=vxworks 691 + ;; 692 + vxworks29k) 693 + basic_machine=a29k-wrs 694 + basic_os=vxworks 695 + ;; 696 + xbox) 697 + basic_machine=i686-pc 698 + basic_os=mingw32 699 + ;; 700 + ymp) 701 + basic_machine=ymp-cray 702 + basic_os=unicos 703 + ;; 704 + *) 705 + basic_machine=$1 706 + basic_os= 707 + ;; 708 + esac 238 709 ;; 239 710 esac 240 711 241 - # Decode aliases for certain CPU-COMPANY combinations. 712 + # Decode 1-component or ad-hoc basic machines 242 713 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 714 + # Here we handle the default manufacturer of certain CPU types. It is in 715 + # some cases the only manufacturer, in others, it is the most popular. 716 + w89k) 717 + cpu=hppa1.1 718 + vendor=winbond 319 719 ;; 320 - c54x) 321 - basic_machine=tic54x-unknown 720 + op50n) 721 + cpu=hppa1.1 722 + vendor=oki 322 723 ;; 323 - c55x) 324 - basic_machine=tic55x-unknown 724 + op60c) 725 + cpu=hppa1.1 726 + vendor=oki 325 727 ;; 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 335 - ;; 336 - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) 337 - ;; 338 - ms1) 339 - basic_machine=mt-unknown 340 - ;; 341 - 342 - strongarm | thumb | xscale) 343 - basic_machine=arm-unknown 728 + ibm*) 729 + cpu=i370 730 + vendor=ibm 344 731 ;; 345 - xgate) 346 - basic_machine=$basic_machine-unknown 347 - os=-none 732 + orion105) 733 + cpu=clipper 734 + vendor=highlevel 348 735 ;; 349 - xscaleeb) 350 - basic_machine=armeb-unknown 736 + mac | mpw | mac-mpw) 737 + cpu=m68k 738 + vendor=apple 351 739 ;; 352 - 353 - xscaleel) 354 - basic_machine=armel-unknown 740 + pmac | pmac-mpw) 741 + cpu=powerpc 742 + vendor=apple 355 743 ;; 356 744 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 745 # Recognize the various machine names and aliases which stand 458 746 # for a CPU type and a company and sometimes even an OS. 459 - 386bsd) 460 - basic_machine=i386-pc 461 - os=-bsd 462 - ;; 463 747 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 464 - basic_machine=m68000-att 748 + cpu=m68000 749 + vendor=att 465 750 ;; 466 751 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 752 + cpu=we32k 753 + vendor=att 541 754 ;; 542 755 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 756 + cpu=powerpc 757 + vendor=ibm 758 + basic_os=cnk 613 759 ;; 614 760 decsystem10* | dec10*) 615 - basic_machine=pdp10-dec 616 - os=-tops10 761 + cpu=pdp10 762 + vendor=dec 763 + basic_os=tops10 617 764 ;; 618 765 decsystem20* | dec20*) 619 - basic_machine=pdp10-dec 620 - os=-tops20 621 - ;; 622 - delta | 3300 | motorola-3300 | motorola-delta \ 623 - | 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 641 - ;; 642 - dpx2*) 643 - basic_machine=m68k-bull 644 - os=-sysv3 766 + cpu=pdp10 767 + vendor=dec 768 + basic_os=tops20 645 769 ;; 646 - e500v[12]) 647 - basic_machine=powerpc-unknown 648 - os=$os"spe" 770 + delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) 771 + cpu=m68k 772 + vendor=motorola 649 773 ;; 650 - e500v[12]-*) 651 - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 652 - os=$os"spe" 774 + # This used to be dpx2*, but that gets the RS6000-based 775 + # DPX/20 and the x86-based DPX/2-100 wrong. See 776 + # https://oldskool.silicium.org/stations/bull_dpx20.htm 777 + # https://www.feb-patrimoine.com/english/bull_dpx2.htm 778 + # https://www.feb-patrimoine.com/english/unix_and_bull.htm 779 + dpx2 | dpx2[23]00 | dpx2[23]xx) 780 + cpu=m68k 781 + vendor=bull 653 782 ;; 654 - ebmon29k) 655 - basic_machine=a29k-amd 656 - os=-ebmon 783 + dpx2100 | dpx21xx) 784 + cpu=i386 785 + vendor=bull 657 786 ;; 658 - elxsi) 659 - basic_machine=elxsi-elxsi 660 - os=-bsd 787 + dpx20) 788 + cpu=rs6000 789 + vendor=bull 661 790 ;; 662 791 encore | umax | mmax) 663 - basic_machine=ns32k-encore 792 + cpu=ns32k 793 + vendor=encore 664 794 ;; 665 - es1800 | OSE68k | ose68k | ose | OSE) 666 - basic_machine=m68k-ericsson 667 - os=-ose 795 + elxsi) 796 + cpu=elxsi 797 + vendor=elxsi 798 + basic_os=${basic_os:-bsd} 668 799 ;; 669 800 fx2800) 670 - basic_machine=i860-alliant 801 + cpu=i860 802 + vendor=alliant 671 803 ;; 672 804 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 805 + cpu=ns32k 806 + vendor=ns 682 807 ;; 683 808 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 809 + cpu=hppa1.1 810 + vendor=hitachi 811 + basic_os=hiuxwe2 713 812 ;; 714 813 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 715 - basic_machine=hppa1.0-hp 814 + cpu=hppa1.0 815 + vendor=hp 716 816 ;; 717 817 hp9k2[0-9][0-9] | hp9k31[0-9]) 718 - basic_machine=m68000-hp 818 + cpu=m68000 819 + vendor=hp 719 820 ;; 720 821 hp9k3[2-9][0-9]) 721 - basic_machine=m68k-hp 822 + cpu=m68k 823 + vendor=hp 722 824 ;; 723 825 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 724 - basic_machine=hppa1.0-hp 826 + cpu=hppa1.0 827 + vendor=hp 725 828 ;; 726 829 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 727 - basic_machine=hppa1.1-hp 830 + cpu=hppa1.1 831 + vendor=hp 728 832 ;; 729 833 hp9k78[0-9] | hp78[0-9]) 730 834 # FIXME: really hppa2.0-hp 731 - basic_machine=hppa1.1-hp 835 + cpu=hppa1.1 836 + vendor=hp 732 837 ;; 733 838 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 734 839 # FIXME: really hppa2.0-hp 735 - basic_machine=hppa1.1-hp 840 + cpu=hppa1.1 841 + vendor=hp 736 842 ;; 737 843 hp9k8[0-9][13679] | hp8[0-9][13679]) 738 - basic_machine=hppa1.1-hp 844 + cpu=hppa1.1 845 + vendor=hp 739 846 ;; 740 847 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 848 + cpu=hppa1.0 849 + vendor=hp 753 850 ;; 754 851 i*86v32) 755 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 756 - os=-sysv32 852 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 853 + vendor=pc 854 + basic_os=sysv32 757 855 ;; 758 856 i*86v4*) 759 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 760 - os=-sysv4 857 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 858 + vendor=pc 859 + basic_os=sysv4 761 860 ;; 762 861 i*86v) 763 - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 764 - os=-sysv 862 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 863 + vendor=pc 864 + basic_os=sysv 765 865 ;; 766 866 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 867 + cpu=`echo "$1" | sed -e 's/86.*/86/'` 868 + vendor=pc 869 + basic_os=solaris2 773 870 ;; 774 - vsta) 775 - basic_machine=i386-unknown 776 - os=-vsta 871 + j90 | j90-cray) 872 + cpu=j90 873 + vendor=cray 874 + basic_os=${basic_os:-unicos} 777 875 ;; 778 876 iris | iris4d) 779 - basic_machine=mips-sgi 780 - case $os in 781 - -irix*) 877 + cpu=mips 878 + vendor=sgi 879 + case $basic_os in 880 + irix*) 782 881 ;; 783 882 *) 784 - os=-irix4 883 + basic_os=irix4 785 884 ;; 786 885 esac 787 886 ;; 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 887 miniframe) 827 - basic_machine=m68000-convergent 888 + cpu=m68000 889 + vendor=convergent 828 890 ;; 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 885 - ;; 886 - news1000) 887 - basic_machine=m68030-sony 888 - os=-newsos 891 + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) 892 + cpu=m68k 893 + vendor=atari 894 + basic_os=mint 889 895 ;; 890 896 news-3600 | risc-news) 891 - basic_machine=mips-sony 892 - os=-newsos 893 - ;; 894 - necv70) 895 - basic_machine=v70-nec 896 - os=-sysv 897 + cpu=mips 898 + vendor=sony 899 + basic_os=newsos 897 900 ;; 898 901 next | m*-next) 899 - basic_machine=m68k-next 900 - case $os in 901 - -nextstep* ) 902 - ;; 903 - -ns2*) 904 - os=-nextstep2 905 - ;; 906 - *) 907 - os=-nextstep3 908 - ;; 909 - esac 910 - ;; 911 - nh3000) 912 - basic_machine=m68k-harris 913 - os=-cxux 902 + cpu=m68k 903 + vendor=next 914 904 ;; 915 - nh[45]000) 916 - basic_machine=m88k-harris 917 - os=-cxux 905 + np1) 906 + cpu=np1 907 + vendor=gould 918 908 ;; 919 - nindy960) 920 - basic_machine=i960-intel 921 - os=-nindy 909 + op50n-* | op60c-*) 910 + cpu=hppa1.1 911 + vendor=oki 912 + basic_os=proelf 922 913 ;; 923 - mon960) 924 - basic_machine=i960-intel 925 - os=-mon960 914 + pa-hitachi) 915 + cpu=hppa1.1 916 + vendor=hitachi 917 + basic_os=hiuxwe2 926 918 ;; 927 - nonstopux) 928 - basic_machine=mips-compaq 929 - os=-nonstopux 919 + pbd) 920 + cpu=sparc 921 + vendor=tti 930 922 ;; 931 - np1) 932 - basic_machine=np1-gould 923 + pbb) 924 + cpu=m68k 925 + vendor=tti 933 926 ;; 934 - neo-tandem) 935 - basic_machine=neo-tandem 927 + pc532) 928 + cpu=ns32k 929 + vendor=pc532 936 930 ;; 937 - nse-tandem) 938 - basic_machine=nse-tandem 931 + pn) 932 + cpu=pn 933 + vendor=gould 939 934 ;; 940 - nsr-tandem) 941 - basic_machine=nsr-tandem 935 + power) 936 + cpu=power 937 + vendor=ibm 942 938 ;; 943 - nsv-tandem) 944 - basic_machine=nsv-tandem 939 + ps2) 940 + cpu=i386 941 + vendor=ibm 945 942 ;; 946 - nsx-tandem) 947 - basic_machine=nsx-tandem 943 + rm[46]00) 944 + cpu=mips 945 + vendor=siemens 948 946 ;; 949 - op50n-* | op60c-*) 950 - basic_machine=hppa1.1-oki 951 - os=-proelf 947 + rtpc | rtpc-*) 948 + cpu=romp 949 + vendor=ibm 952 950 ;; 953 - openrisc | openrisc-*) 954 - basic_machine=or32-unknown 951 + sde) 952 + cpu=mipsisa32 953 + vendor=sde 954 + basic_os=${basic_os:-elf} 955 955 ;; 956 - os400) 957 - basic_machine=powerpc-ibm 958 - os=-os400 956 + simso-wrs) 957 + cpu=sparclite 958 + vendor=wrs 959 + basic_os=vxworks 959 960 ;; 960 - OSE68000 | ose68000) 961 - basic_machine=m68000-ericsson 962 - os=-ose 961 + tower | tower-32) 962 + cpu=m68k 963 + vendor=ncr 963 964 ;; 964 - os68k) 965 - basic_machine=m68k-none 966 - os=-os68k 965 + vpp*|vx|vx-*) 966 + cpu=f301 967 + vendor=fujitsu 967 968 ;; 968 - pa-hitachi) 969 - basic_machine=hppa1.1-hitachi 970 - os=-hiuxwe2 969 + w65) 970 + cpu=w65 971 + vendor=wdc 971 972 ;; 972 - paragon) 973 - basic_machine=i860-intel 974 - os=-osf 973 + w89k-*) 974 + cpu=hppa1.1 975 + vendor=winbond 976 + basic_os=proelf 975 977 ;; 976 - parisc) 977 - basic_machine=hppa-unknown 978 - os=-linux 978 + none) 979 + cpu=none 980 + vendor=none 979 981 ;; 980 - parisc-*) 981 - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` 982 - os=-linux 982 + leon|leon[3-9]) 983 + cpu=sparc 984 + vendor=$basic_machine 983 985 ;; 984 - pbd) 985 - basic_machine=sparc-tti 986 + leon-*|leon[3-9]-*) 987 + cpu=sparc 988 + vendor=`echo "$basic_machine" | sed 's/-.*//'` 986 989 ;; 987 - pbb) 988 - basic_machine=m68k-tti 990 + 991 + *-*) 992 + saved_IFS=$IFS 993 + IFS="-" read cpu vendor <<EOF 994 + $basic_machine 995 + EOF 996 + IFS=$saved_IFS 989 997 ;; 990 - pc532 | pc532-*) 991 - basic_machine=ns32k-pc532 998 + # We use 'pc' rather than 'unknown' 999 + # because (1) that's what they normally are, and 1000 + # (2) the word "unknown" tends to confuse beginning users. 1001 + i*86 | x86_64) 1002 + cpu=$basic_machine 1003 + vendor=pc 992 1004 ;; 1005 + # These rules are duplicated from below for sake of the special case above; 1006 + # i.e. things that normalized to x86 arches should also default to "pc" 993 1007 pc98) 994 - basic_machine=i386-pc 1008 + cpu=i386 1009 + vendor=pc 995 1010 ;; 996 - pc98-*) 997 - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1011 + x64 | amd64) 1012 + cpu=x86_64 1013 + vendor=pc 998 1014 ;; 999 - pentium | p5 | k5 | k6 | nexgen | viac3) 1000 - basic_machine=i586-pc 1015 + # Recognize the basic CPU types without company name. 1016 + *) 1017 + cpu=$basic_machine 1018 + vendor=unknown 1001 1019 ;; 1002 - pentiumpro | p6 | 6x86 | athlon | athlon_*) 1003 - basic_machine=i686-pc 1020 + esac 1021 + 1022 + unset -v basic_machine 1023 + 1024 + # Decode basic machines in the full and proper CPU-Company form. 1025 + case $cpu-$vendor in 1026 + # Here we handle the default manufacturer of certain CPU types in canonical form. 1027 + # It is in some cases the only manufacturer, in others, it is the most popular. 1028 + c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown) 1029 + vendor=convex 1030 + basic_os=${basic_os:-bsd} 1004 1031 ;; 1005 - pentiumii | pentium2 | pentiumiii | pentium3) 1006 - basic_machine=i686-pc 1032 + craynv-unknown) 1033 + vendor=cray 1034 + basic_os=${basic_os:-unicosmp} 1007 1035 ;; 1008 - pentium4) 1009 - basic_machine=i786-pc 1036 + c90-unknown | c90-cray) 1037 + vendor=cray 1038 + basic_os=${basic_os:-unicos} 1010 1039 ;; 1011 - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1012 - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1040 + fx80-unknown) 1041 + vendor=alliant 1013 1042 ;; 1014 - pentiumpro-* | p6-* | 6x86-* | athlon-*) 1015 - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1043 + romp-unknown) 1044 + vendor=ibm 1016 1045 ;; 1017 - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1018 - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1046 + mmix-unknown) 1047 + vendor=knuth 1019 1048 ;; 1020 - pentium4-*) 1021 - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1049 + microblaze-unknown | microblazeel-unknown) 1050 + vendor=xilinx 1022 1051 ;; 1023 - pn) 1024 - basic_machine=pn-gould 1052 + rs6000-unknown) 1053 + vendor=ibm 1025 1054 ;; 1026 - power) basic_machine=power-ibm 1055 + vax-unknown) 1056 + vendor=dec 1027 1057 ;; 1028 - ppc | ppcbe) basic_machine=powerpc-unknown 1058 + pdp11-unknown) 1059 + vendor=dec 1029 1060 ;; 1030 - ppc-* | ppcbe-*) 1031 - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1061 + we32k-unknown) 1062 + vendor=att 1032 1063 ;; 1033 - ppcle | powerpclittle) 1034 - basic_machine=powerpcle-unknown 1064 + cydra-unknown) 1065 + vendor=cydrome 1035 1066 ;; 1036 - ppcle-* | powerpclittle-*) 1037 - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1067 + i370-ibm*) 1068 + vendor=ibm 1038 1069 ;; 1039 - ppc64) basic_machine=powerpc64-unknown 1070 + orion-unknown) 1071 + vendor=highlevel 1040 1072 ;; 1041 - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1073 + xps-unknown | xps100-unknown) 1074 + cpu=xps100 1075 + vendor=honeywell 1042 1076 ;; 1043 - ppc64le | powerpc64little) 1044 - basic_machine=powerpc64le-unknown 1077 + 1078 + # Here we normalize CPU types with a missing or matching vendor 1079 + armh-unknown | armh-alt) 1080 + cpu=armv7l 1081 + vendor=alt 1082 + basic_os=${basic_os:-linux-gnueabihf} 1045 1083 ;; 1046 - ppc64le-* | powerpc64little-*) 1047 - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1084 + 1085 + # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified 1086 + m68k-isi) 1087 + basic_os=${basic_os:-sysv} 1048 1088 ;; 1049 - ps2) 1050 - basic_machine=i386-ibm 1089 + m68k-sony) 1090 + basic_os=${basic_os:-newsos} 1051 1091 ;; 1052 - pw32) 1053 - basic_machine=i586-unknown 1054 - os=-pw32 1092 + m68k-tektronix) 1093 + basic_os=${basic_os:-bsd} 1055 1094 ;; 1056 - rdos | rdos64) 1057 - basic_machine=x86_64-pc 1058 - os=-rdos 1095 + m88k-harris) 1096 + basic_os=${basic_os:-sysv3} 1059 1097 ;; 1060 - rdos32) 1061 - basic_machine=i386-pc 1062 - os=-rdos 1098 + i386-bull | m68k-bull) 1099 + basic_os=${basic_os:-sysv3} 1063 1100 ;; 1064 - rom68k) 1065 - basic_machine=m68k-rom68k 1066 - os=-coff 1101 + rs6000-bull) 1102 + basic_os=${basic_os:-bosx} 1067 1103 ;; 1068 - rm[46]00) 1069 - basic_machine=mips-siemens 1104 + mips-sni) 1105 + basic_os=${basic_os:-sysv4} 1070 1106 ;; 1071 - rtpc | rtpc-*) 1072 - basic_machine=romp-ibm 1107 + 1108 + # Here we normalize CPU types irrespective of the vendor 1109 + amd64-*) 1110 + cpu=x86_64 1073 1111 ;; 1074 - s390 | s390-*) 1075 - basic_machine=s390-ibm 1112 + blackfin-*) 1113 + cpu=bfin 1114 + basic_os=${basic_os:-linux} 1076 1115 ;; 1077 - s390x | s390x-*) 1078 - basic_machine=s390x-ibm 1116 + c54x-*) 1117 + cpu=tic54x 1079 1118 ;; 1080 - sa29200) 1081 - basic_machine=a29k-amd 1082 - os=-udi 1119 + c55x-*) 1120 + cpu=tic55x 1083 1121 ;; 1084 - sb1) 1085 - basic_machine=mipsisa64sb1-unknown 1122 + c6x-*) 1123 + cpu=tic6x 1086 1124 ;; 1087 - sb1el) 1088 - basic_machine=mipsisa64sb1el-unknown 1125 + e500v[12]-*) 1126 + cpu=powerpc 1127 + basic_os=${basic_os}"spe" 1089 1128 ;; 1090 - sde) 1091 - basic_machine=mipsisa32-sde 1092 - os=-elf 1129 + mips3*-*) 1130 + cpu=mips64 1093 1131 ;; 1094 - sei) 1095 - basic_machine=mips-sei 1096 - os=-seiux 1132 + ms1-*) 1133 + cpu=mt 1097 1134 ;; 1098 - sequent) 1099 - basic_machine=i386-sequent 1135 + m68knommu-*) 1136 + cpu=m68k 1137 + basic_os=${basic_os:-linux} 1100 1138 ;; 1101 - sh5el) 1102 - basic_machine=sh5le-unknown 1139 + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) 1140 + cpu=s12z 1103 1141 ;; 1104 - simso-wrs) 1105 - basic_machine=sparclite-wrs 1106 - os=-vxworks 1142 + openrisc-*) 1143 + cpu=or32 1107 1144 ;; 1108 - sps7) 1109 - basic_machine=m68k-bull 1110 - os=-sysv2 1145 + parisc-*) 1146 + cpu=hppa 1147 + basic_os=${basic_os:-linux} 1111 1148 ;; 1112 - spur) 1113 - basic_machine=spur-unknown 1149 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1150 + cpu=i586 1114 1151 ;; 1115 - st2000) 1116 - basic_machine=m68k-tandem 1152 + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) 1153 + cpu=i686 1117 1154 ;; 1118 - stratus) 1119 - basic_machine=i860-stratus 1120 - os=-sysv4 1155 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1156 + cpu=i686 1121 1157 ;; 1122 - strongarm-* | thumb-*) 1123 - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1158 + pentium4-*) 1159 + cpu=i786 1124 1160 ;; 1125 - sun2) 1126 - basic_machine=m68000-sun 1161 + ppc-* | ppcbe-*) 1162 + cpu=powerpc 1127 1163 ;; 1128 - sun2os3) 1129 - basic_machine=m68000-sun 1130 - os=-sunos3 1164 + ppcle-* | powerpclittle-*) 1165 + cpu=powerpcle 1131 1166 ;; 1132 - sun2os4) 1133 - basic_machine=m68000-sun 1134 - os=-sunos4 1167 + ppc64-*) 1168 + cpu=powerpc64 1135 1169 ;; 1136 - sun3os3) 1137 - basic_machine=m68k-sun 1138 - os=-sunos3 1170 + ppc64le-* | powerpc64little-*) 1171 + cpu=powerpc64le 1139 1172 ;; 1140 - sun3os4) 1141 - basic_machine=m68k-sun 1142 - os=-sunos4 1173 + sb1-*) 1174 + cpu=mipsisa64sb1 1143 1175 ;; 1144 - sun4os3) 1145 - basic_machine=sparc-sun 1146 - os=-sunos3 1176 + sb1el-*) 1177 + cpu=mipsisa64sb1el 1147 1178 ;; 1148 - sun4os4) 1149 - basic_machine=sparc-sun 1150 - os=-sunos4 1179 + sh5e[lb]-*) 1180 + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` 1151 1181 ;; 1152 - sun4sol2) 1153 - basic_machine=sparc-sun 1154 - os=-solaris2 1182 + spur-*) 1183 + cpu=spur 1155 1184 ;; 1156 - sun3 | sun3-*) 1157 - basic_machine=m68k-sun 1185 + strongarm-* | thumb-*) 1186 + cpu=arm 1158 1187 ;; 1159 - sun4) 1160 - basic_machine=sparc-sun 1188 + tx39-*) 1189 + cpu=mipstx39 1161 1190 ;; 1162 - sun386 | sun386i | roadrunner) 1163 - basic_machine=i386-sun 1191 + tx39el-*) 1192 + cpu=mipstx39el 1164 1193 ;; 1165 - sv1) 1166 - basic_machine=sv1-cray 1167 - os=-unicos 1194 + xscale-* | xscalee[bl]-*) 1195 + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` 1168 1196 ;; 1169 - symmetry) 1170 - basic_machine=i386-sequent 1171 - os=-dynix 1197 + arm64-* | aarch64le-*) 1198 + cpu=aarch64 1172 1199 ;; 1173 - t3e) 1174 - basic_machine=alphaev5-cray 1175 - os=-unicos 1200 + 1201 + # Recognize the canonical CPU Types that limit and/or modify the 1202 + # company names they are paired with. 1203 + cr16-*) 1204 + basic_os=${basic_os:-elf} 1176 1205 ;; 1177 - t90) 1178 - basic_machine=t90-cray 1179 - os=-unicos 1206 + crisv32-* | etraxfs*-*) 1207 + cpu=crisv32 1208 + vendor=axis 1180 1209 ;; 1181 - tile*) 1182 - basic_machine=$basic_machine-unknown 1183 - os=-linux-gnu 1210 + cris-* | etrax*-*) 1211 + cpu=cris 1212 + vendor=axis 1184 1213 ;; 1185 - tx39) 1186 - basic_machine=mipstx39-unknown 1214 + crx-*) 1215 + basic_os=${basic_os:-elf} 1187 1216 ;; 1188 - tx39el) 1189 - basic_machine=mipstx39el-unknown 1217 + neo-tandem) 1218 + cpu=neo 1219 + vendor=tandem 1190 1220 ;; 1191 - toad1) 1192 - basic_machine=pdp10-xkl 1193 - os=-tops20 1221 + nse-tandem) 1222 + cpu=nse 1223 + vendor=tandem 1194 1224 ;; 1195 - tower | tower-32) 1196 - basic_machine=m68k-ncr 1225 + nsr-tandem) 1226 + cpu=nsr 1227 + vendor=tandem 1197 1228 ;; 1198 - tpf) 1199 - basic_machine=s390x-ibm 1200 - os=-tpf 1229 + nsv-tandem) 1230 + cpu=nsv 1231 + vendor=tandem 1201 1232 ;; 1202 - udi29k) 1203 - basic_machine=a29k-amd 1204 - os=-udi 1233 + nsx-tandem) 1234 + cpu=nsx 1235 + vendor=tandem 1205 1236 ;; 1206 - ultra3) 1207 - basic_machine=a29k-nyu 1208 - os=-sym1 1237 + mipsallegrexel-sony) 1238 + cpu=mipsallegrexel 1239 + vendor=sony 1209 1240 ;; 1210 - v810 | necv810) 1211 - basic_machine=v810-nec 1212 - os=-none 1241 + tile*-*) 1242 + basic_os=${basic_os:-linux-gnu} 1213 1243 ;; 1214 - vaxv) 1215 - basic_machine=vax-dec 1216 - os=-sysv 1217 - ;; 1218 - vms) 1219 - basic_machine=vax-dec 1220 - os=-vms 1221 - ;; 1222 - vpp*|vx|vx-*) 1223 - basic_machine=f301-fujitsu 1244 + 1245 + *) 1246 + # Recognize the canonical CPU types that are allowed with any 1247 + # company name. 1248 + case $cpu in 1249 + 1750a \ 1250 + | 580 \ 1251 + | [cjt]90 \ 1252 + | a29k \ 1253 + | aarch64 \ 1254 + | aarch64_be \ 1255 + | aarch64c \ 1256 + | abacus \ 1257 + | alpha \ 1258 + | alpha64 \ 1259 + | alpha64ev56 \ 1260 + | alpha64ev6[78] \ 1261 + | alpha64ev[4-8] \ 1262 + | alpha64pca5[67] \ 1263 + | alphaev56 \ 1264 + | alphaev6[78] \ 1265 + | alphaev[4-8] \ 1266 + | alphapca5[67] \ 1267 + | am33_2.0 \ 1268 + | amdgcn \ 1269 + | arc \ 1270 + | arc32 \ 1271 + | arc64 \ 1272 + | arceb \ 1273 + | arm \ 1274 + | arm64e \ 1275 + | arm64ec \ 1276 + | arm[lb]e \ 1277 + | arme[lb] \ 1278 + | armv* \ 1279 + | asmjs \ 1280 + | avr \ 1281 + | avr32 \ 1282 + | ba \ 1283 + | be32 \ 1284 + | be64 \ 1285 + | bfin \ 1286 + | bpf \ 1287 + | bs2000 \ 1288 + | c30 \ 1289 + | c4x \ 1290 + | c8051 \ 1291 + | c[123]* \ 1292 + | clipper \ 1293 + | craynv \ 1294 + | csky \ 1295 + | cydra \ 1296 + | d10v \ 1297 + | d30v \ 1298 + | dlx \ 1299 + | dsp16xx \ 1300 + | e2k \ 1301 + | elxsi \ 1302 + | epiphany \ 1303 + | f30[01] \ 1304 + | f700 \ 1305 + | fido \ 1306 + | fr30 \ 1307 + | frv \ 1308 + | ft32 \ 1309 + | fx80 \ 1310 + | h8300 \ 1311 + | h8500 \ 1312 + | hexagon \ 1313 + | hppa \ 1314 + | hppa1.[01] \ 1315 + | hppa2.0 \ 1316 + | hppa2.0[nw] \ 1317 + | hppa64 \ 1318 + | i*86 \ 1319 + | i370 \ 1320 + | i860 \ 1321 + | i960 \ 1322 + | ia16 \ 1323 + | ia64 \ 1324 + | ip2k \ 1325 + | iq2000 \ 1326 + | javascript \ 1327 + | k1om \ 1328 + | kvx \ 1329 + | le32 \ 1330 + | le64 \ 1331 + | lm32 \ 1332 + | loongarch32 \ 1333 + | loongarch64 \ 1334 + | m32c \ 1335 + | m32r \ 1336 + | m32rle \ 1337 + | m5200 \ 1338 + | m68000 \ 1339 + | m680[012346]0 \ 1340 + | m6811 \ 1341 + | m6812 \ 1342 + | m68360 \ 1343 + | m683?2 \ 1344 + | m68hc11 \ 1345 + | m68hc12 \ 1346 + | m68hcs12x \ 1347 + | m68k \ 1348 + | m88110 \ 1349 + | m88k \ 1350 + | maxq \ 1351 + | mb \ 1352 + | mcore \ 1353 + | mep \ 1354 + | metag \ 1355 + | microblaze \ 1356 + | microblazeel \ 1357 + | mips* \ 1358 + | mmix \ 1359 + | mn10200 \ 1360 + | mn10300 \ 1361 + | moxie \ 1362 + | msp430 \ 1363 + | mt \ 1364 + | nanomips* \ 1365 + | nds32 \ 1366 + | nds32be \ 1367 + | nds32le \ 1368 + | nfp \ 1369 + | nios \ 1370 + | nios2 \ 1371 + | nios2eb \ 1372 + | nios2el \ 1373 + | none \ 1374 + | np1 \ 1375 + | ns16k \ 1376 + | ns32k \ 1377 + | nvptx \ 1378 + | open8 \ 1379 + | or1k* \ 1380 + | or32 \ 1381 + | orion \ 1382 + | pdp10 \ 1383 + | pdp11 \ 1384 + | picochip \ 1385 + | pj \ 1386 + | pjl \ 1387 + | pn \ 1388 + | power \ 1389 + | powerpc \ 1390 + | powerpc64 \ 1391 + | powerpc64le \ 1392 + | powerpcle \ 1393 + | powerpcspe \ 1394 + | pru \ 1395 + | pyramid \ 1396 + | riscv \ 1397 + | riscv32 \ 1398 + | riscv32be \ 1399 + | riscv64 \ 1400 + | riscv64be \ 1401 + | rl78 \ 1402 + | romp \ 1403 + | rs6000 \ 1404 + | rx \ 1405 + | s390 \ 1406 + | s390x \ 1407 + | score \ 1408 + | sh \ 1409 + | sh64 \ 1410 + | sh64le \ 1411 + | sh[12345][lb]e \ 1412 + | sh[1234] \ 1413 + | sh[1234]e[lb] \ 1414 + | sh[23]e \ 1415 + | sh[23]ele \ 1416 + | sh[24]a \ 1417 + | sh[24]ae[lb] \ 1418 + | sh[lb]e \ 1419 + | she[lb] \ 1420 + | shl \ 1421 + | sparc \ 1422 + | sparc64 \ 1423 + | sparc64b \ 1424 + | sparc64v \ 1425 + | sparc86x \ 1426 + | sparclet \ 1427 + | sparclite \ 1428 + | sparcv8 \ 1429 + | sparcv9 \ 1430 + | sparcv9b \ 1431 + | sparcv9v \ 1432 + | spu \ 1433 + | sv1 \ 1434 + | sx* \ 1435 + | tahoe \ 1436 + | thumbv7* \ 1437 + | tic30 \ 1438 + | tic4x \ 1439 + | tic54x \ 1440 + | tic55x \ 1441 + | tic6x \ 1442 + | tic80 \ 1443 + | tron \ 1444 + | ubicom32 \ 1445 + | v70 \ 1446 + | v810 \ 1447 + | v850 \ 1448 + | v850e \ 1449 + | v850e1 \ 1450 + | v850e2 \ 1451 + | v850e2v3 \ 1452 + | v850es \ 1453 + | vax \ 1454 + | vc4 \ 1455 + | visium \ 1456 + | w65 \ 1457 + | wasm32 \ 1458 + | wasm64 \ 1459 + | we32k \ 1460 + | x86 \ 1461 + | x86_64 \ 1462 + | xc16x \ 1463 + | xgate \ 1464 + | xps100 \ 1465 + | xstormy16 \ 1466 + | xtensa* \ 1467 + | ymp \ 1468 + | z80 \ 1469 + | z8k) 1470 + ;; 1471 + 1472 + *) 1473 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 1474 + exit 1 1475 + ;; 1476 + esac 1224 1477 ;; 1225 - vxworks960) 1226 - basic_machine=i960-wrs 1227 - os=-vxworks 1478 + esac 1479 + 1480 + # Here we canonicalize certain aliases for manufacturers. 1481 + case $vendor in 1482 + digital*) 1483 + vendor=dec 1228 1484 ;; 1229 - vxworks68) 1230 - basic_machine=m68k-wrs 1231 - os=-vxworks 1485 + commodore*) 1486 + vendor=cbm 1232 1487 ;; 1233 - vxworks29k) 1234 - basic_machine=a29k-wrs 1235 - os=-vxworks 1488 + *) 1236 1489 ;; 1237 - w65*) 1238 - basic_machine=w65-wdc 1239 - os=-none 1490 + esac 1491 + 1492 + # Decode manufacturer-specific aliases for certain operating systems. 1493 + 1494 + if test x"$basic_os" != x 1495 + then 1496 + 1497 + # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just 1498 + # set os. 1499 + obj= 1500 + case $basic_os in 1501 + gnu/linux*) 1502 + kernel=linux 1503 + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` 1240 1504 ;; 1241 - w89k-*) 1242 - basic_machine=hppa1.1-winbond 1243 - os=-proelf 1505 + os2-emx) 1506 + kernel=os2 1507 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` 1244 1508 ;; 1245 - x64) 1246 - basic_machine=x86_64-pc 1509 + nto-qnx*) 1510 + kernel=nto 1511 + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` 1247 1512 ;; 1248 - xbox) 1249 - basic_machine=i686-pc 1250 - os=-mingw32 1513 + *-*) 1514 + saved_IFS=$IFS 1515 + IFS="-" read kernel os <<EOF 1516 + $basic_os 1517 + EOF 1518 + IFS=$saved_IFS 1251 1519 ;; 1252 - xps | xps100) 1253 - basic_machine=xps100-honeywell 1520 + # Default OS when just kernel was specified 1521 + nto*) 1522 + kernel=nto 1523 + os=`echo "$basic_os" | sed -e 's|nto|qnx|'` 1254 1524 ;; 1255 - xscale-* | xscalee[bl]-*) 1256 - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` 1525 + linux*) 1526 + kernel=linux 1527 + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` 1257 1528 ;; 1258 - ymp) 1259 - basic_machine=ymp-cray 1260 - os=-unicos 1529 + managarm*) 1530 + kernel=managarm 1531 + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` 1261 1532 ;; 1262 - none) 1263 - basic_machine=none-none 1264 - os=-none 1533 + *) 1534 + kernel= 1535 + os=$basic_os 1265 1536 ;; 1537 + esac 1266 1538 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 1539 + # Now, normalize the OS (knowing we just have one component, it's not a kernel, 1540 + # etc.) 1541 + case $os in 1542 + # First match some system type aliases that might get confused 1543 + # with valid system types. 1544 + # solaris* is a basic system type, with this one exception. 1545 + auroraux) 1546 + os=auroraux 1271 1547 ;; 1272 - op50n) 1273 - basic_machine=hppa1.1-oki 1548 + bluegene*) 1549 + os=cnk 1274 1550 ;; 1275 - op60c) 1276 - basic_machine=hppa1.1-oki 1551 + solaris1 | solaris1.*) 1552 + os=`echo "$os" | sed -e 's|solaris1|sunos4|'` 1277 1553 ;; 1278 - romp) 1279 - basic_machine=romp-ibm 1554 + solaris) 1555 + os=solaris2 1280 1556 ;; 1281 - mmix) 1282 - basic_machine=mmix-knuth 1557 + unixware*) 1558 + os=sysv4.2uw 1283 1559 ;; 1284 - rs6000) 1285 - basic_machine=rs6000-ibm 1560 + # The marketing names for NeXT's operating systems were 1561 + # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is 1562 + # mapped to 'openstep3', but 'openstep1' and 'openstep2' are 1563 + # mapped to 'nextstep' and 'nextstep2', consistent with the 1564 + # treatment of SunOS/Solaris. 1565 + ns | ns1 | nextstep | nextstep1 | openstep1) 1566 + os=nextstep 1286 1567 ;; 1287 - vax) 1288 - basic_machine=vax-dec 1568 + ns2 | nextstep2 | openstep2) 1569 + os=nextstep2 1289 1570 ;; 1290 - pdp11) 1291 - basic_machine=pdp11-dec 1571 + ns3 | nextstep3 | openstep | openstep3) 1572 + os=openstep3 1292 1573 ;; 1293 - we32k) 1294 - basic_machine=we32k-att 1574 + ns4 | nextstep4 | openstep4) 1575 + os=openstep4 1295 1576 ;; 1296 - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1297 - basic_machine=sh-unknown 1577 + # es1800 is here to avoid being matched by es* (a different OS) 1578 + es1800*) 1579 + os=ose 1298 1580 ;; 1299 - cydra) 1300 - basic_machine=cydra-cydrome 1581 + # Some version numbers need modification 1582 + chorusos*) 1583 + os=chorusos 1301 1584 ;; 1302 - orion) 1303 - basic_machine=orion-highlevel 1585 + isc) 1586 + os=isc2.2 1304 1587 ;; 1305 - orion105) 1306 - basic_machine=clipper-highlevel 1588 + sco6) 1589 + os=sco5v6 1307 1590 ;; 1308 - mac | mpw | mac-mpw) 1309 - basic_machine=m68k-apple 1591 + sco5) 1592 + os=sco3.2v5 1310 1593 ;; 1311 - pmac | pmac-mpw) 1312 - basic_machine=powerpc-apple 1594 + sco4) 1595 + os=sco3.2v4 1313 1596 ;; 1314 - *-unknown) 1315 - # Make sure to match an already-canonicalized machine name. 1597 + sco3.2.[4-9]*) 1598 + os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` 1316 1599 ;; 1317 - *) 1318 - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 1319 - exit 1 1600 + sco*v* | scout) 1601 + # Don't match below 1320 1602 ;; 1321 - esac 1322 - 1323 - # Here we canonicalize certain aliases for manufacturers. 1324 - case $basic_machine in 1325 - *-digital*) 1326 - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` 1603 + sco*) 1604 + os=sco3.2v2 1327 1605 ;; 1328 - *-commodore*) 1329 - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` 1606 + psos*) 1607 + os=psos 1330 1608 ;; 1331 - *) 1609 + qnx*) 1610 + os=qnx 1332 1611 ;; 1333 - esac 1334 - 1335 - # Decode manufacturer-specific aliases for certain operating systems. 1336 - 1337 - if [ x"$os" != x"" ] 1338 - then 1339 - case $os in 1340 - # First match some system type aliases that might get confused 1341 - # with valid system types. 1342 - # -solaris* is a basic system type, with this one exception. 1343 - -auroraux) 1344 - os=-auroraux 1612 + hiux*) 1613 + os=hiuxwe2 1345 1614 ;; 1346 - -solaris1 | -solaris1.*) 1347 - os=`echo $os | sed -e 's|solaris1|sunos4|'` 1615 + lynx*178) 1616 + os=lynxos178 1348 1617 ;; 1349 - -solaris) 1350 - os=-solaris2 1351 - ;; 1352 - -unixware*) 1353 - os=-sysv4.2uw 1618 + lynx*5) 1619 + os=lynxos5 1354 1620 ;; 1355 - -gnu/linux*) 1356 - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1621 + lynxos*) 1622 + # don't get caught up in next wildcard 1357 1623 ;; 1358 - # es1800 is here to avoid being matched by es* (a different OS) 1359 - -es1800*) 1360 - os=-ose 1624 + lynx*) 1625 + os=lynxos 1361 1626 ;; 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 - # Remember, each alternative MUST END IN *, to match a version number. 1394 - ;; 1395 - -qnx*) 1396 - case $basic_machine in 1397 - x86-* | i*86-*) 1398 - ;; 1399 - *) 1400 - os=-nto$os 1401 - ;; 1402 - esac 1403 - ;; 1404 - -nto-qnx*) 1405 - ;; 1406 - -nto*) 1407 - os=`echo $os | sed -e 's|nto|nto-qnx|'` 1408 - ;; 1409 - -sim | -xray | -os68k* | -v88r* \ 1410 - | -windows* | -osx | -abug | -netware* | -os9* \ 1411 - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1412 - ;; 1413 - -mac*) 1627 + mac[0-9]*) 1414 1628 os=`echo "$os" | sed -e 's|mac|macos|'` 1415 1629 ;; 1416 - -linux-dietlibc) 1417 - os=-linux-dietlibc 1630 + opened*) 1631 + os=openedition 1418 1632 ;; 1419 - -linux*) 1420 - os=`echo $os | sed -e 's|linux|linux-gnu|'` 1633 + os400*) 1634 + os=os400 1421 1635 ;; 1422 - -sunos5*) 1636 + sunos5*) 1423 1637 os=`echo "$os" | sed -e 's|sunos5|solaris2|'` 1424 1638 ;; 1425 - -sunos6*) 1639 + sunos6*) 1426 1640 os=`echo "$os" | sed -e 's|sunos6|solaris3|'` 1427 1641 ;; 1428 - -opened*) 1429 - os=-openedition 1430 - ;; 1431 - -os400*) 1432 - os=-os400 1433 - ;; 1434 - -wince*) 1435 - os=-wince 1436 - ;; 1437 - -utek*) 1438 - os=-bsd 1642 + wince*) 1643 + os=wince 1439 1644 ;; 1440 - -dynix*) 1441 - os=-bsd 1645 + utek*) 1646 + os=bsd 1647 + vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'` 1442 1648 ;; 1443 - -acis*) 1444 - os=-aos 1649 + dynix*) 1650 + os=bsd 1445 1651 ;; 1446 - -atheos*) 1447 - os=-atheos 1652 + acis*) 1653 + os=aos 1448 1654 ;; 1449 - -syllable*) 1450 - os=-syllable 1655 + atheos*) 1656 + os=atheos 1451 1657 ;; 1452 - -386bsd) 1453 - os=-bsd 1658 + syllable*) 1659 + os=syllable 1454 1660 ;; 1455 - -ctix* | -uts*) 1456 - os=-sysv 1661 + 386bsd) 1662 + os=bsd 1457 1663 ;; 1458 - -nova*) 1459 - os=-rtmk-nova 1664 + ctix*) 1665 + os=sysv 1666 + vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'` 1460 1667 ;; 1461 - -ns2) 1462 - os=-nextstep2 1668 + uts*) 1669 + os=sysv 1463 1670 ;; 1464 - -nsk*) 1465 - os=-nsk 1671 + nova*) 1672 + kernel=rtmk 1673 + os=nova 1466 1674 ;; 1467 1675 # Preserve the version number of sinix5. 1468 - -sinix5.*) 1469 - os=`echo $os | sed -e 's|sinix|sysv|'` 1676 + sinix5.*) 1677 + os=`echo "$os" | sed -e 's|sinix|sysv|'` 1678 + vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'` 1470 1679 ;; 1471 - -sinix*) 1472 - os=-sysv4 1680 + sinix*) 1681 + os=sysv4 1682 + vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'` 1473 1683 ;; 1474 - -tpf*) 1475 - os=-tpf 1684 + tpf*) 1685 + os=tpf 1476 1686 ;; 1477 - -triton*) 1478 - os=-sysv3 1687 + triton*) 1688 + os=sysv3 1479 1689 ;; 1480 - -oss*) 1481 - os=-sysv3 1690 + oss*) 1691 + os=sysv3 1482 1692 ;; 1483 - -svr4*) 1484 - os=-sysv4 1693 + svr4*) 1694 + os=sysv4 1485 1695 ;; 1486 - -svr3) 1487 - os=-sysv3 1696 + svr3) 1697 + os=sysv3 1488 1698 ;; 1489 - -sysvr4) 1490 - os=-sysv4 1699 + sysvr4) 1700 + os=sysv4 1491 1701 ;; 1492 - # This must come after -sysvr4. 1493 - -sysv*) 1494 - ;; 1495 - -ose*) 1496 - os=-ose 1497 - ;; 1498 - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1499 - os=-mint 1702 + ose*) 1703 + os=ose 1500 1704 ;; 1501 - -zvmoe) 1502 - os=-zvmoe 1705 + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) 1706 + os=mint 1503 1707 ;; 1504 - -dicos*) 1505 - os=-dicos 1708 + dicos*) 1709 + os=dicos 1506 1710 ;; 1507 - -pikeos*) 1711 + pikeos*) 1508 1712 # Until real need of OS specific support for 1509 1713 # particular features comes up, bare metal 1510 1714 # configurations are quite functional. 1511 - case $basic_machine in 1715 + case $cpu in 1512 1716 arm*) 1513 - os=-eabi 1717 + os=eabi 1514 1718 ;; 1515 1719 *) 1516 - os=-elf 1720 + os= 1721 + obj=elf 1517 1722 ;; 1518 1723 esac 1519 1724 ;; 1520 - -nacl*) 1521 - ;; 1522 - -ios) 1523 - ;; 1524 - -none) 1725 + aout* | coff* | elf* | pe*) 1726 + # These are machine code file formats, not OSes 1727 + obj=$os 1728 + os= 1525 1729 ;; 1526 1730 *) 1527 - # Get rid of the `-' at the beginning of $os. 1528 - os=`echo $os | sed 's/[^-]*-//'` 1529 - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 1530 - exit 1 1731 + # No normalization, but not necessarily accepted, that comes below. 1531 1732 ;; 1532 1733 esac 1734 + 1533 1735 else 1534 1736 1535 1737 # Here we handle the default operating systems that come with various machines. ··· 1542 1744 # will signal an error saying that MANUFACTURER isn't an operating 1543 1745 # system, and we'll never get to this point. 1544 1746 1545 - case $basic_machine in 1747 + kernel= 1748 + obj= 1749 + case $cpu-$vendor in 1546 1750 score-*) 1547 - os=-elf 1751 + os= 1752 + obj=elf 1548 1753 ;; 1549 1754 spu-*) 1550 - os=-elf 1755 + os= 1756 + obj=elf 1551 1757 ;; 1552 1758 *-acorn) 1553 - os=-riscix1.2 1759 + os=riscix1.2 1554 1760 ;; 1555 1761 arm*-rebel) 1556 - os=-linux 1762 + kernel=linux 1763 + os=gnu 1557 1764 ;; 1558 1765 arm*-semi) 1559 - os=-aout 1766 + os= 1767 + obj=aout 1560 1768 ;; 1561 1769 c4x-* | tic4x-*) 1562 - os=-coff 1770 + os= 1771 + obj=coff 1563 1772 ;; 1564 1773 c8051-*) 1565 - os=-elf 1774 + os= 1775 + obj=elf 1776 + ;; 1777 + clipper-intergraph) 1778 + os=clix 1566 1779 ;; 1567 1780 hexagon-*) 1568 - os=-elf 1781 + os= 1782 + obj=elf 1569 1783 ;; 1570 1784 tic54x-*) 1571 - os=-coff 1785 + os= 1786 + obj=coff 1572 1787 ;; 1573 1788 tic55x-*) 1574 - os=-coff 1789 + os= 1790 + obj=coff 1575 1791 ;; 1576 1792 tic6x-*) 1577 - os=-coff 1793 + os= 1794 + obj=coff 1578 1795 ;; 1579 1796 # This must come before the *-dec entry. 1580 1797 pdp10-*) 1581 - os=-tops20 1798 + os=tops20 1582 1799 ;; 1583 1800 pdp11-*) 1584 - os=-none 1801 + os=none 1585 1802 ;; 1586 1803 *-dec | vax-*) 1587 - os=-ultrix4.2 1804 + os=ultrix4.2 1588 1805 ;; 1589 1806 m68*-apollo) 1590 - os=-domain 1807 + os=domain 1591 1808 ;; 1592 1809 i386-sun) 1593 - os=-sunos4.0.2 1810 + os=sunos4.0.2 1594 1811 ;; 1595 1812 m68000-sun) 1596 - os=-sunos3 1813 + os=sunos3 1597 1814 ;; 1598 1815 m68*-cisco) 1599 - os=-aout 1816 + os= 1817 + obj=aout 1600 1818 ;; 1601 1819 mep-*) 1602 - os=-elf 1820 + os= 1821 + obj=elf 1822 + ;; 1823 + # The -sgi and -siemens entries must be before the mips- entry 1824 + # or we get the wrong os. 1825 + *-sgi) 1826 + os=irix 1827 + ;; 1828 + *-siemens) 1829 + os=sysv4 1603 1830 ;; 1604 1831 mips*-cisco) 1605 - os=-elf 1832 + os= 1833 + obj=elf 1606 1834 ;; 1607 - mips*-*) 1608 - os=-elf 1835 + mips*-*|nanomips*-*) 1836 + os= 1837 + obj=elf 1609 1838 ;; 1610 1839 or32-*) 1611 - os=-coff 1840 + os= 1841 + obj=coff 1612 1842 ;; 1613 - *-tti) # must be before sparc entry or we get the wrong os. 1614 - os=-sysv3 1843 + # This must be before the sparc-* entry or we get the wrong os. 1844 + *-tti) 1845 + os=sysv3 1615 1846 ;; 1616 1847 sparc-* | *-sun) 1617 - os=-sunos4.1.1 1848 + os=sunos4.1.1 1618 1849 ;; 1619 1850 pru-*) 1620 - os=-elf 1851 + os= 1852 + obj=elf 1621 1853 ;; 1622 1854 *-be) 1623 - os=-beos 1855 + os=beos 1624 1856 ;; 1625 1857 *-ibm) 1626 - os=-aix 1858 + os=aix 1627 1859 ;; 1628 1860 *-knuth) 1629 - os=-mmixware 1861 + os=mmixware 1630 1862 ;; 1631 1863 *-wec) 1632 - os=-proelf 1864 + os=proelf 1633 1865 ;; 1634 1866 *-winbond) 1635 - os=-proelf 1867 + os=proelf 1636 1868 ;; 1637 1869 *-oki) 1638 - os=-proelf 1870 + os=proelf 1639 1871 ;; 1640 1872 *-hp) 1641 - os=-hpux 1873 + os=hpux 1642 1874 ;; 1643 1875 *-hitachi) 1644 - os=-hiux 1876 + os=hiuxwe2 1645 1877 ;; 1646 1878 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1647 - os=-sysv 1879 + os=sysv 1648 1880 ;; 1649 1881 *-cbm) 1650 - os=-amigaos 1882 + os=amigaos 1651 1883 ;; 1652 1884 *-dg) 1653 - os=-dgux 1885 + os=dgux 1654 1886 ;; 1655 1887 *-dolphin) 1656 - os=-sysv3 1888 + os=sysv3 1657 1889 ;; 1658 1890 m68k-ccur) 1659 - os=-rtu 1891 + os=rtu 1660 1892 ;; 1661 1893 m88k-omron*) 1662 - os=-luna 1894 + os=luna 1663 1895 ;; 1664 1896 *-next) 1665 - os=-nextstep 1897 + os=nextstep 1666 1898 ;; 1667 1899 *-sequent) 1668 - os=-ptx 1900 + os=ptx 1669 1901 ;; 1670 1902 *-crds) 1671 - os=-unos 1903 + os=unos 1672 1904 ;; 1673 1905 *-ns) 1674 - os=-genix 1906 + os=genix 1675 1907 ;; 1676 1908 i370-*) 1677 - os=-mvs 1909 + os=mvs 1678 1910 ;; 1679 1911 *-gould) 1680 - os=-sysv 1912 + os=sysv 1681 1913 ;; 1682 1914 *-highlevel) 1683 - os=-bsd 1915 + os=bsd 1684 1916 ;; 1685 1917 *-encore) 1686 - os=-bsd 1687 - ;; 1688 - *-sgi) 1689 - os=-irix 1690 - ;; 1691 - *-siemens) 1692 - os=-sysv4 1918 + os=bsd 1693 1919 ;; 1694 1920 *-masscomp) 1695 - os=-rtu 1921 + os=rtu 1696 1922 ;; 1697 1923 f30[01]-fujitsu | f700-fujitsu) 1698 - os=-uxpv 1924 + os=uxpv 1699 1925 ;; 1700 1926 *-rom68k) 1701 - os=-coff 1927 + os= 1928 + obj=coff 1702 1929 ;; 1703 1930 *-*bug) 1704 - os=-coff 1931 + os= 1932 + obj=coff 1705 1933 ;; 1706 1934 *-apple) 1707 - os=-macos 1935 + os=macos 1708 1936 ;; 1709 1937 *-atari*) 1710 - os=-mint 1938 + os=mint 1939 + ;; 1940 + *-wrs) 1941 + os=vxworks 1711 1942 ;; 1712 1943 *) 1713 - os=-none 1944 + os=none 1714 1945 ;; 1715 1946 esac 1947 + 1716 1948 fi 1717 1949 1950 + # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). 1951 + 1952 + case $os in 1953 + # Sometimes we do "kernel-libc", so those need to count as OSes. 1954 + llvm* | musl* | newlib* | relibc* | uclibc*) 1955 + ;; 1956 + # Likewise for "kernel-abi" 1957 + eabi* | gnueabi*) 1958 + ;; 1959 + # VxWorks passes extra cpu info in the 4th filed. 1960 + simlinux | simwindows | spe) 1961 + ;; 1962 + # See `case $cpu-$os` validation below 1963 + ghcjs) 1964 + ;; 1965 + # Now accept the basic system types. 1966 + # Each alternative MUST end in a * to match a version number. 1967 + abug \ 1968 + | aix* \ 1969 + | amdhsa* \ 1970 + | amigados* \ 1971 + | amigaos* \ 1972 + | android* \ 1973 + | aof* \ 1974 + | aos* \ 1975 + | aros* \ 1976 + | atheos* \ 1977 + | auroraux* \ 1978 + | aux* \ 1979 + | beos* \ 1980 + | bitrig* \ 1981 + | bme* \ 1982 + | bosx* \ 1983 + | bsd* \ 1984 + | cegcc* \ 1985 + | chorusos* \ 1986 + | chorusrdb* \ 1987 + | clix* \ 1988 + | cloudabi* \ 1989 + | cnk* \ 1990 + | conix* \ 1991 + | cos* \ 1992 + | cxux* \ 1993 + | cygwin* \ 1994 + | darwin* \ 1995 + | dgux* \ 1996 + | dicos* \ 1997 + | dnix* \ 1998 + | domain* \ 1999 + | dragonfly* \ 2000 + | drops* \ 2001 + | ebmon* \ 2002 + | ecoff* \ 2003 + | ekkobsd* \ 2004 + | emscripten* \ 2005 + | emx* \ 2006 + | es* \ 2007 + | fiwix* \ 2008 + | freebsd* \ 2009 + | fuchsia* \ 2010 + | genix* \ 2011 + | genode* \ 2012 + | glidix* \ 2013 + | gnu* \ 2014 + | go32* \ 2015 + | haiku* \ 2016 + | hcos* \ 2017 + | hiux* \ 2018 + | hms* \ 2019 + | hpux* \ 2020 + | ieee* \ 2021 + | interix* \ 2022 + | ios* \ 2023 + | iris* \ 2024 + | irix* \ 2025 + | ironclad* \ 2026 + | isc* \ 2027 + | its* \ 2028 + | l4re* \ 2029 + | libertybsd* \ 2030 + | lites* \ 2031 + | lnews* \ 2032 + | luna* \ 2033 + | lynxos* \ 2034 + | mach* \ 2035 + | macos* \ 2036 + | magic* \ 2037 + | mbr* \ 2038 + | midipix* \ 2039 + | midnightbsd* \ 2040 + | mingw32* \ 2041 + | mingw64* \ 2042 + | minix* \ 2043 + | mint* \ 2044 + | mirbsd* \ 2045 + | mks* \ 2046 + | mlibc* \ 2047 + | mmixware* \ 2048 + | mon960* \ 2049 + | morphos* \ 2050 + | moss* \ 2051 + | moxiebox* \ 2052 + | mpeix* \ 2053 + | mpw* \ 2054 + | msdos* \ 2055 + | msys* \ 2056 + | mvs* \ 2057 + | nacl* \ 2058 + | netbsd* \ 2059 + | netware* \ 2060 + | newsos* \ 2061 + | nextstep* \ 2062 + | nindy* \ 2063 + | nonstopux* \ 2064 + | nova* \ 2065 + | nsk* \ 2066 + | nucleus* \ 2067 + | nx6 \ 2068 + | nx7 \ 2069 + | oabi* \ 2070 + | ohos* \ 2071 + | onefs* \ 2072 + | openbsd* \ 2073 + | openedition* \ 2074 + | openstep* \ 2075 + | os108* \ 2076 + | os2* \ 2077 + | os400* \ 2078 + | os68k* \ 2079 + | os9* \ 2080 + | ose* \ 2081 + | osf* \ 2082 + | oskit* \ 2083 + | osx* \ 2084 + | palmos* \ 2085 + | phoenix* \ 2086 + | plan9* \ 2087 + | powermax* \ 2088 + | powerunix* \ 2089 + | proelf* \ 2090 + | psos* \ 2091 + | psp* \ 2092 + | ptx* \ 2093 + | pw32* \ 2094 + | qnx* \ 2095 + | rdos* \ 2096 + | redox* \ 2097 + | rhapsody* \ 2098 + | riscix* \ 2099 + | riscos* \ 2100 + | rtems* \ 2101 + | rtmk* \ 2102 + | rtu* \ 2103 + | scout* \ 2104 + | secbsd* \ 2105 + | sei* \ 2106 + | serenity* \ 2107 + | sim* \ 2108 + | skyos* \ 2109 + | solaris* \ 2110 + | solidbsd* \ 2111 + | sortix* \ 2112 + | storm-chaos* \ 2113 + | sunos \ 2114 + | sunos[34]* \ 2115 + | superux* \ 2116 + | syllable* \ 2117 + | sym* \ 2118 + | sysv* \ 2119 + | tenex* \ 2120 + | tirtos* \ 2121 + | toppers* \ 2122 + | tops10* \ 2123 + | tops20* \ 2124 + | tpf* \ 2125 + | tvos* \ 2126 + | twizzler* \ 2127 + | uclinux* \ 2128 + | udi* \ 2129 + | udk* \ 2130 + | ultrix* \ 2131 + | unicos* \ 2132 + | uniplus* \ 2133 + | unleashed* \ 2134 + | unos* \ 2135 + | uwin* \ 2136 + | uxpv* \ 2137 + | v88r* \ 2138 + |*vms* \ 2139 + | vos* \ 2140 + | vsta* \ 2141 + | vxsim* \ 2142 + | vxworks* \ 2143 + | wasi* \ 2144 + | watchos* \ 2145 + | wince* \ 2146 + | windiss* \ 2147 + | windows* \ 2148 + | winnt* \ 2149 + | xenix* \ 2150 + | xray* \ 2151 + | zephyr* \ 2152 + | zvmoe* ) 2153 + ;; 2154 + # This one is extra strict with allowed versions 2155 + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) 2156 + # Don't forget version if it is 3.2v4 or newer. 2157 + ;; 2158 + # This refers to builds using the UEFI calling convention 2159 + # (which depends on the architecture) and PE file format. 2160 + # Note that this is both a different calling convention and 2161 + # different file format than that of GNU-EFI 2162 + # (x86_64-w64-mingw32). 2163 + uefi) 2164 + ;; 2165 + none) 2166 + ;; 2167 + kernel* | msvc* ) 2168 + # Restricted further below 2169 + ;; 2170 + '') 2171 + if test x"$obj" = x 2172 + then 2173 + echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 2174 + fi 2175 + ;; 2176 + *) 2177 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 2178 + exit 1 2179 + ;; 2180 + esac 2181 + 2182 + case $obj in 2183 + aout* | coff* | elf* | pe*) 2184 + ;; 2185 + '') 2186 + # empty is fine 2187 + ;; 2188 + *) 2189 + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 2190 + exit 1 2191 + ;; 2192 + esac 2193 + 2194 + # Here we handle the constraint that a (synthetic) cpu and os are 2195 + # valid only in combination with each other and nowhere else. 2196 + case $cpu-$os in 2197 + # The "javascript-unknown-ghcjs" triple is used by GHC; we 2198 + # accept it here in order to tolerate that, but reject any 2199 + # variations. 2200 + javascript-ghcjs) 2201 + ;; 2202 + javascript-* | *-ghcjs) 2203 + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 2204 + exit 1 2205 + ;; 2206 + esac 2207 + 2208 + # As a final step for OS-related things, validate the OS-kernel combination 2209 + # (given a valid OS), if there is a kernel. 2210 + case $kernel-$os-$obj in 2211 + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ 2212 + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ 2213 + | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) 2214 + ;; 2215 + uclinux-uclibc*- | uclinux-gnu*- ) 2216 + ;; 2217 + managarm-mlibc*- | managarm-kernel*- ) 2218 + ;; 2219 + windows*-msvc*-) 2220 + ;; 2221 + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ 2222 + | -uclibc*- ) 2223 + # These are just libc implementations, not actual OSes, and thus 2224 + # require a kernel. 2225 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 2226 + exit 1 2227 + ;; 2228 + -kernel*- ) 2229 + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 2230 + exit 1 2231 + ;; 2232 + *-kernel*- ) 2233 + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 2234 + exit 1 2235 + ;; 2236 + *-msvc*- ) 2237 + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 2238 + exit 1 2239 + ;; 2240 + kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) 2241 + ;; 2242 + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) 2243 + ;; 2244 + nto-qnx*-) 2245 + ;; 2246 + os2-emx-) 2247 + ;; 2248 + rtmk-nova-) 2249 + ;; 2250 + *-eabi*- | *-gnueabi*-) 2251 + ;; 2252 + none--*) 2253 + # None (no kernel, i.e. freestanding / bare metal), 2254 + # can be paired with an machine code file format 2255 + ;; 2256 + -*-) 2257 + # Blank kernel with real OS is always fine. 2258 + ;; 2259 + --*) 2260 + # Blank kernel and OS with real machine code file format is always fine. 2261 + ;; 2262 + *-*-*) 2263 + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 2264 + exit 1 2265 + ;; 2266 + esac 2267 + 1718 2268 # Here we handle the case where we know the os, and the CPU type, but not the 1719 2269 # manufacturer. We pick the logical manufacturer. 1720 - vendor=unknown 1721 - case $basic_machine in 1722 - *-unknown) 1723 - case $os in 1724 - -riscix*) 2270 + case $vendor in 2271 + unknown) 2272 + case $cpu-$os in 2273 + *-riscix*) 1725 2274 vendor=acorn 1726 2275 ;; 1727 - -sunos*) 2276 + *-sunos* | *-solaris*) 1728 2277 vendor=sun 1729 2278 ;; 1730 - -cnk*|-aix*) 2279 + *-cnk* | *-aix*) 1731 2280 vendor=ibm 1732 2281 ;; 1733 - -beos*) 2282 + *-beos*) 1734 2283 vendor=be 1735 2284 ;; 1736 - -hpux*) 2285 + *-hpux*) 1737 2286 vendor=hp 1738 2287 ;; 1739 - -mpeix*) 2288 + *-mpeix*) 1740 2289 vendor=hp 1741 2290 ;; 1742 - -hiux*) 2291 + *-hiux*) 1743 2292 vendor=hitachi 1744 2293 ;; 1745 - -unos*) 2294 + *-unos*) 1746 2295 vendor=crds 1747 2296 ;; 1748 - -dgux*) 2297 + *-dgux*) 1749 2298 vendor=dg 1750 2299 ;; 1751 - -luna*) 2300 + *-luna*) 1752 2301 vendor=omron 1753 2302 ;; 1754 - -genix*) 2303 + *-genix*) 1755 2304 vendor=ns 1756 2305 ;; 1757 - -mvs* | -opened*) 2306 + *-clix*) 2307 + vendor=intergraph 2308 + ;; 2309 + *-mvs* | *-opened*) 1758 2310 vendor=ibm 1759 2311 ;; 1760 - -os400*) 2312 + *-os400*) 1761 2313 vendor=ibm 1762 2314 ;; 1763 - -ptx*) 2315 + s390-* | s390x-*) 2316 + vendor=ibm 2317 + ;; 2318 + *-ptx*) 1764 2319 vendor=sequent 1765 2320 ;; 1766 - -tpf*) 2321 + *-tpf*) 1767 2322 vendor=ibm 1768 2323 ;; 1769 - -vxsim* | -vxworks* | -windiss*) 2324 + *-vxsim* | *-vxworks* | *-windiss*) 1770 2325 vendor=wrs 1771 2326 ;; 1772 - -aux*) 2327 + *-aux*) 1773 2328 vendor=apple 1774 2329 ;; 1775 - -hms*) 2330 + *-hms*) 1776 2331 vendor=hitachi 1777 2332 ;; 1778 - -mpw* | -macos*) 2333 + *-mpw* | *-macos*) 1779 2334 vendor=apple 1780 2335 ;; 1781 - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 2336 + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) 1782 2337 vendor=atari 1783 2338 ;; 1784 - -vos*) 2339 + *-vos*) 1785 2340 vendor=stratus 1786 2341 ;; 1787 2342 esac 1788 - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` 1789 2343 ;; 1790 2344 esac 1791 2345 1792 - echo "$basic_machine$os" 2346 + echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" 1793 2347 exit 1794 2348 1795 2349 # Local variables: 1796 - # eval: (add-hook 'write-file-functions 'time-stamp) 2350 + # eval: (add-hook 'before-save-hook 'time-stamp) 1797 2351 # time-stamp-start: "timestamp='" 1798 2352 # time-stamp-format: "%:y-%02m-%02d" 1799 2353 # time-stamp-end: "'"