Fossil SCM
Update config.guess and config.guess to make it possible to compile Fossil for LoongArch
Commit
09c91cd5e908623d4a7c99b4975d6b11ca165f7c5bd8427a7622b6859aa7072b
Parent
ad47a447c812777…
2 files changed
+957
-626
+1623
-1464
+957
-626
| --- autosetup/autosetup-config.guess | ||
| +++ autosetup/autosetup-config.guess | ||
| @@ -1,14 +1,16 @@ | ||
| 1 | 1 | #! /bin/sh |
| 2 | 2 | # Attempt to guess a canonical system name. |
| 3 | -# Copyright 1992-2018 Free Software Foundation, Inc. | |
| 3 | +# Copyright 1992-2023 Free Software Foundation, Inc. | |
| 4 | 4 | |
| 5 | -timestamp='2018-03-08' | |
| 5 | +# shellcheck disable=SC2006,SC2268 # see below for rationale | |
| 6 | + | |
| 7 | +timestamp='2023-08-22' | |
| 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 |
| 13 | 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -25,21 +27,29 @@ | ||
| 25 | 27 | # of the GNU General Public License, version 3 ("GPLv3"). |
| 26 | 28 | # |
| 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 <[email protected]>. |
| 33 | 35 | |
| 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 | + | |
| 34 | 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 |
| 44 | 54 | -t, --time-stamp print date of last modification, then exit |
| 45 | 55 | -v, --version print version number, then exit |
| @@ -48,17 +58,17 @@ | ||
| 48 | 58 | |
| 49 | 59 | version="\ |
| 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-2023 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 |
| 63 | 73 | case $1 in |
| 64 | 74 | --time-stamp | --time* | -t ) |
| @@ -82,89 +92,111 @@ | ||
| 82 | 92 | if test $# != 0; then |
| 83 | 93 | echo "$me: too many arguments$help" >&2 |
| 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 c89 c99 ; do | |
| 127 | + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then | |
| 128 | + CC_FOR_BUILD=$driver | |
| 129 | + break | |
| 130 | + fi | |
| 131 | + done | |
| 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 | # ([email protected] 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 |
| 148 | - #else | |
| 166 | + #elif defined(__GLIBC__) | |
| 149 | 167 | LIBC=gnu |
| 168 | + #else | |
| 169 | + #include <stdarg.h> | |
| 170 | + /* First heuristic to detect musl libc. */ | |
| 171 | + #ifdef __DEFINED_va_list | |
| 172 | + LIBC=musl | |
| 173 | + #endif | |
| 174 | + #endif | |
| 150 | 175 | #endif |
| 151 | 176 | EOF |
| 152 | - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" | |
| 177 | + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` | |
| 178 | + eval "$cc_set_libc" | |
| 179 | + | |
| 180 | + # Second heuristic to detect musl libc. | |
| 181 | + if [ "$LIBC" = unknown ] && | |
| 182 | + command -v ldd >/dev/null && | |
| 183 | + ldd --version 2>&1 | grep -q ^musl; then | |
| 184 | + LIBC=musl | |
| 185 | + fi | |
| 153 | 186 | |
| 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 | |
| 187 | + # If the system lacks a compiler, then just pick glibc. | |
| 188 | + # We could probably try harder. | |
| 189 | + if [ "$LIBC" = unknown ]; then | |
| 190 | + LIBC=gnu | |
| 159 | 191 | fi |
| 160 | 192 | ;; |
| 161 | 193 | esac |
| 162 | 194 | |
| 163 | 195 | # Note: order is significant - the case branches are not exclusive. |
| 164 | 196 | |
| 165 | -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in | |
| 197 | +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in | |
| 166 | 198 | *:NetBSD:*:*) |
| 167 | 199 | # NetBSD (nbsd) targets should (where applicable) match one or |
| 168 | 200 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
| 169 | 201 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
| 170 | 202 | # switched to ELF, *-*-netbsd* would select the old |
| @@ -172,36 +204,36 @@ | ||
| 172 | 204 | # compatibility and a consistent mechanism for selecting the |
| 173 | 205 | # object file format. |
| 174 | 206 | # |
| 175 | 207 | # Note: NetBSD doesn't particularly care about the vendor |
| 176 | 208 | # portion of the name. We always set it to "unknown". |
| 177 | - sysctl="sysctl -n hw.machine_arch" | |
| 178 | 209 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
| 179 | - "/sbin/$sysctl" 2>/dev/null || \ | |
| 180 | - "/usr/sbin/$sysctl" 2>/dev/null || \ | |
| 210 | + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | |
| 211 | + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ | |
| 181 | 212 | echo unknown)` |
| 182 | - case "$UNAME_MACHINE_ARCH" in | |
| 213 | + case $UNAME_MACHINE_ARCH in | |
| 214 | + aarch64eb) machine=aarch64_be-unknown ;; | |
| 183 | 215 | armeb) machine=armeb-unknown ;; |
| 184 | 216 | arm*) machine=arm-unknown ;; |
| 185 | 217 | sh3el) machine=shl-unknown ;; |
| 186 | 218 | sh3eb) machine=sh-unknown ;; |
| 187 | 219 | sh5el) machine=sh5le-unknown ;; |
| 188 | 220 | earmv*) |
| 189 | 221 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
| 190 | 222 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
| 191 | - machine="${arch}${endian}"-unknown | |
| 223 | + machine=${arch}${endian}-unknown | |
| 192 | 224 | ;; |
| 193 | - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; | |
| 225 | + *) machine=$UNAME_MACHINE_ARCH-unknown ;; | |
| 194 | 226 | esac |
| 195 | 227 | # The Operating System including object format, if it has switched |
| 196 | 228 | # to ELF recently (or will in the future) and ABI. |
| 197 | - case "$UNAME_MACHINE_ARCH" in | |
| 229 | + case $UNAME_MACHINE_ARCH in | |
| 198 | 230 | earm*) |
| 199 | 231 | os=netbsdelf |
| 200 | 232 | ;; |
| 201 | 233 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
| 202 | - eval "$set_cc_for_build" | |
| 234 | + set_cc_for_build | |
| 203 | 235 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 204 | 236 | | grep -q __ELF__ |
| 205 | 237 | then |
| 206 | 238 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
| 207 | 239 | # Return netbsd for either. FIX? |
| @@ -213,11 +245,11 @@ | ||
| 213 | 245 | *) |
| 214 | 246 | os=netbsd |
| 215 | 247 | ;; |
| 216 | 248 | esac |
| 217 | 249 | # Determine ABI tags. |
| 218 | - case "$UNAME_MACHINE_ARCH" in | |
| 250 | + case $UNAME_MACHINE_ARCH in | |
| 219 | 251 | earm*) |
| 220 | 252 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
| 221 | 253 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
| 222 | 254 | ;; |
| 223 | 255 | esac |
| @@ -224,11 +256,11 @@ | ||
| 224 | 256 | # The OS release |
| 225 | 257 | # Debian GNU/NetBSD machines have a different userland, and |
| 226 | 258 | # thus, need a distinct triplet. However, they do not need |
| 227 | 259 | # kernel version information, so it can be replaced with a |
| 228 | 260 | # suitable tag, in the style of linux-gnu. |
| 229 | - case "$UNAME_VERSION" in | |
| 261 | + case $UNAME_VERSION in | |
| 230 | 262 | Debian*) |
| 231 | 263 | release='-gnu' |
| 232 | 264 | ;; |
| 233 | 265 | *) |
| 234 | 266 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` |
| @@ -235,49 +267,61 @@ | ||
| 235 | 267 | ;; |
| 236 | 268 | esac |
| 237 | 269 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 238 | 270 | # contains redundant information, the shorter form: |
| 239 | 271 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
| 240 | - echo "$machine-${os}${release}${abi}" | |
| 241 | - exit ;; | |
| 272 | + GUESS=$machine-${os}${release}${abi-} | |
| 273 | + ;; | |
| 242 | 274 | *:Bitrig:*:*) |
| 243 | 275 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
| 244 | - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" | |
| 245 | - exit ;; | |
| 276 | + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE | |
| 277 | + ;; | |
| 246 | 278 | *:OpenBSD:*:*) |
| 247 | 279 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
| 248 | - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" | |
| 249 | - exit ;; | |
| 280 | + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE | |
| 281 | + ;; | |
| 282 | + *:SecBSD:*:*) | |
| 283 | + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` | |
| 284 | + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE | |
| 285 | + ;; | |
| 250 | 286 | *:LibertyBSD:*:*) |
| 251 | 287 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
| 252 | - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" | |
| 253 | - exit ;; | |
| 288 | + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE | |
| 289 | + ;; | |
| 254 | 290 | *:MidnightBSD:*:*) |
| 255 | - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" | |
| 256 | - exit ;; | |
| 291 | + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE | |
| 292 | + ;; | |
| 257 | 293 | *:ekkoBSD:*:*) |
| 258 | - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" | |
| 259 | - exit ;; | |
| 294 | + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE | |
| 295 | + ;; | |
| 260 | 296 | *:SolidBSD:*:*) |
| 261 | - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" | |
| 262 | - exit ;; | |
| 297 | + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE | |
| 298 | + ;; | |
| 299 | + *:OS108:*:*) | |
| 300 | + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE | |
| 301 | + ;; | |
| 263 | 302 | macppc:MirBSD:*:*) |
| 264 | - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" | |
| 265 | - exit ;; | |
| 303 | + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE | |
| 304 | + ;; | |
| 266 | 305 | *:MirBSD:*:*) |
| 267 | - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" | |
| 268 | - exit ;; | |
| 306 | + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE | |
| 307 | + ;; | |
| 269 | 308 | *:Sortix:*:*) |
| 270 | - echo "$UNAME_MACHINE"-unknown-sortix | |
| 271 | - exit ;; | |
| 309 | + GUESS=$UNAME_MACHINE-unknown-sortix | |
| 310 | + ;; | |
| 311 | + *:Twizzler:*:*) | |
| 312 | + GUESS=$UNAME_MACHINE-unknown-twizzler | |
| 313 | + ;; | |
| 272 | 314 | *:Redox:*:*) |
| 273 | - echo "$UNAME_MACHINE"-unknown-redox | |
| 274 | - exit ;; | |
| 315 | + GUESS=$UNAME_MACHINE-unknown-redox | |
| 316 | + ;; | |
| 275 | 317 | mips:OSF1:*.*) |
| 276 | - echo mips-dec-osf1 | |
| 277 | - exit ;; | |
| 318 | + GUESS=mips-dec-osf1 | |
| 319 | + ;; | |
| 278 | 320 | alpha:OSF1:*:*) |
| 321 | + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
| 322 | + trap '' 0 | |
| 279 | 323 | case $UNAME_RELEASE in |
| 280 | 324 | *4.0) |
| 281 | 325 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
| 282 | 326 | ;; |
| 283 | 327 | *5.*) |
| @@ -287,11 +331,11 @@ | ||
| 287 | 331 | # According to Compaq, /usr/sbin/psrinfo has been available on |
| 288 | 332 | # OSF/1 and Tru64 systems produced since 1995. I hope that |
| 289 | 333 | # covers most systems running today. This code pipes the CPU |
| 290 | 334 | # types through head -n 1, so we only detect the type of CPU 0. |
| 291 | 335 | 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 | |
| 336 | + case $ALPHA_CPU_TYPE in | |
| 293 | 337 | "EV4 (21064)") |
| 294 | 338 | UNAME_MACHINE=alpha ;; |
| 295 | 339 | "EV4.5 (21064)") |
| 296 | 340 | UNAME_MACHINE=alpha ;; |
| 297 | 341 | "LCA4 (21066/21068)") |
| @@ -324,167 +368,171 @@ | ||
| 324 | 368 | # A Pn.n version is a patched version. |
| 325 | 369 | # A Vn.n version is a released version. |
| 326 | 370 | # A Tn.n version is a released field test version. |
| 327 | 371 | # A Xn.n version is an unreleased experimental baselevel. |
| 328 | 372 | # 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 ;; | |
| 373 | + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` | |
| 374 | + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL | |
| 375 | + ;; | |
| 334 | 376 | Amiga*:UNIX_System_V:4.0:*) |
| 335 | - echo m68k-unknown-sysv4 | |
| 336 | - exit ;; | |
| 377 | + GUESS=m68k-unknown-sysv4 | |
| 378 | + ;; | |
| 337 | 379 | *:[Aa]miga[Oo][Ss]:*:*) |
| 338 | - echo "$UNAME_MACHINE"-unknown-amigaos | |
| 339 | - exit ;; | |
| 380 | + GUESS=$UNAME_MACHINE-unknown-amigaos | |
| 381 | + ;; | |
| 340 | 382 | *:[Mm]orph[Oo][Ss]:*:*) |
| 341 | - echo "$UNAME_MACHINE"-unknown-morphos | |
| 342 | - exit ;; | |
| 383 | + GUESS=$UNAME_MACHINE-unknown-morphos | |
| 384 | + ;; | |
| 343 | 385 | *:OS/390:*:*) |
| 344 | - echo i370-ibm-openedition | |
| 345 | - exit ;; | |
| 386 | + GUESS=i370-ibm-openedition | |
| 387 | + ;; | |
| 346 | 388 | *:z/VM:*:*) |
| 347 | - echo s390-ibm-zvmoe | |
| 348 | - exit ;; | |
| 389 | + GUESS=s390-ibm-zvmoe | |
| 390 | + ;; | |
| 349 | 391 | *:OS400:*:*) |
| 350 | - echo powerpc-ibm-os400 | |
| 351 | - exit ;; | |
| 392 | + GUESS=powerpc-ibm-os400 | |
| 393 | + ;; | |
| 352 | 394 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 353 | - echo arm-acorn-riscix"$UNAME_RELEASE" | |
| 354 | - exit ;; | |
| 395 | + GUESS=arm-acorn-riscix$UNAME_RELEASE | |
| 396 | + ;; | |
| 355 | 397 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
| 356 | - echo arm-unknown-riscos | |
| 357 | - exit ;; | |
| 398 | + GUESS=arm-unknown-riscos | |
| 399 | + ;; | |
| 358 | 400 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
| 359 | - echo hppa1.1-hitachi-hiuxmpp | |
| 360 | - exit ;; | |
| 401 | + GUESS=hppa1.1-hitachi-hiuxmpp | |
| 402 | + ;; | |
| 361 | 403 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
| 362 | 404 | # [email protected] (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 ;; | |
| 405 | + case `(/bin/universe) 2>/dev/null` in | |
| 406 | + att) GUESS=pyramid-pyramid-sysv3 ;; | |
| 407 | + *) GUESS=pyramid-pyramid-bsd ;; | |
| 408 | + esac | |
| 409 | + ;; | |
| 369 | 410 | NILE*:*:*:dcosx) |
| 370 | - echo pyramid-pyramid-svr4 | |
| 371 | - exit ;; | |
| 411 | + GUESS=pyramid-pyramid-svr4 | |
| 412 | + ;; | |
| 372 | 413 | DRS?6000:unix:4.0:6*) |
| 373 | - echo sparc-icl-nx6 | |
| 374 | - exit ;; | |
| 414 | + GUESS=sparc-icl-nx6 | |
| 415 | + ;; | |
| 375 | 416 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
| 376 | 417 | case `/usr/bin/uname -p` in |
| 377 | - sparc) echo sparc-icl-nx7; exit ;; | |
| 378 | - esac ;; | |
| 418 | + sparc) GUESS=sparc-icl-nx7 ;; | |
| 419 | + esac | |
| 420 | + ;; | |
| 379 | 421 | s390x:SunOS:*:*) |
| 380 | - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
| 381 | - exit ;; | |
| 422 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
| 423 | + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL | |
| 424 | + ;; | |
| 382 | 425 | sun4H:SunOS:5.*:*) |
| 383 | - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 384 | - exit ;; | |
| 426 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
| 427 | + GUESS=sparc-hal-solaris2$SUN_REL | |
| 428 | + ;; | |
| 385 | 429 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
| 386 | - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" | |
| 387 | - exit ;; | |
| 430 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
| 431 | + GUESS=sparc-sun-solaris2$SUN_REL | |
| 432 | + ;; | |
| 388 | 433 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
| 389 | - echo i386-pc-auroraux"$UNAME_RELEASE" | |
| 390 | - exit ;; | |
| 434 | + GUESS=i386-pc-auroraux$UNAME_RELEASE | |
| 435 | + ;; | |
| 391 | 436 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
| 392 | - eval "$set_cc_for_build" | |
| 437 | + set_cc_for_build | |
| 393 | 438 | SUN_ARCH=i386 |
| 394 | 439 | # If there is a compiler, see if it is configured for 64-bit objects. |
| 395 | 440 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
| 396 | 441 | # This test works for both compilers. |
| 397 | - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then | |
| 442 | + if test "$CC_FOR_BUILD" != no_compiler_found; then | |
| 398 | 443 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 399 | - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 444 | + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ | |
| 400 | 445 | grep IS_64BIT_ARCH >/dev/null |
| 401 | 446 | then |
| 402 | 447 | SUN_ARCH=x86_64 |
| 403 | 448 | fi |
| 404 | 449 | fi |
| 405 | - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 406 | - exit ;; | |
| 450 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
| 451 | + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL | |
| 452 | + ;; | |
| 407 | 453 | sun4*:SunOS:6*:*) |
| 408 | 454 | # According to config.sub, this is the proper way to canonicalize |
| 409 | 455 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
| 410 | 456 | # it's likely to be more like Solaris than SunOS4. |
| 411 | - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 412 | - exit ;; | |
| 457 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
| 458 | + GUESS=sparc-sun-solaris3$SUN_REL | |
| 459 | + ;; | |
| 413 | 460 | sun4*:SunOS:*:*) |
| 414 | - case "`/usr/bin/arch -k`" in | |
| 461 | + case `/usr/bin/arch -k` in | |
| 415 | 462 | Series*|S4*) |
| 416 | 463 | UNAME_RELEASE=`uname -v` |
| 417 | 464 | ;; |
| 418 | 465 | 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 ;; | |
| 466 | + # Japanese Language versions have a version number like '4.1.3-JL'. | |
| 467 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` | |
| 468 | + GUESS=sparc-sun-sunos$SUN_REL | |
| 469 | + ;; | |
| 422 | 470 | sun3*:SunOS:*:*) |
| 423 | - echo m68k-sun-sunos"$UNAME_RELEASE" | |
| 424 | - exit ;; | |
| 471 | + GUESS=m68k-sun-sunos$UNAME_RELEASE | |
| 472 | + ;; | |
| 425 | 473 | sun*:*:4.2BSD:*) |
| 426 | 474 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
| 427 | 475 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
| 428 | - case "`/bin/arch`" in | |
| 476 | + case `/bin/arch` in | |
| 429 | 477 | sun3) |
| 430 | - echo m68k-sun-sunos"$UNAME_RELEASE" | |
| 478 | + GUESS=m68k-sun-sunos$UNAME_RELEASE | |
| 431 | 479 | ;; |
| 432 | 480 | sun4) |
| 433 | - echo sparc-sun-sunos"$UNAME_RELEASE" | |
| 481 | + GUESS=sparc-sun-sunos$UNAME_RELEASE | |
| 434 | 482 | ;; |
| 435 | 483 | esac |
| 436 | - exit ;; | |
| 484 | + ;; | |
| 437 | 485 | aushp:SunOS:*:*) |
| 438 | - echo sparc-auspex-sunos"$UNAME_RELEASE" | |
| 439 | - exit ;; | |
| 486 | + GUESS=sparc-auspex-sunos$UNAME_RELEASE | |
| 487 | + ;; | |
| 440 | 488 | # The situation for MiNT is a little confusing. The machine name |
| 441 | 489 | # can be virtually everything (everything which is not |
| 442 | 490 | # "atarist" or "atariste" at least should have a processor |
| 443 | 491 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
| 444 | 492 | # to the lowercase version "mint" (or "freemint"). Finally |
| 445 | 493 | # the system name "TOS" denotes a system which is actually not |
| 446 | 494 | # MiNT. But MiNT is downward compatible to TOS, so this should |
| 447 | 495 | # be no problem. |
| 448 | 496 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
| 449 | - echo m68k-atari-mint"$UNAME_RELEASE" | |
| 450 | - exit ;; | |
| 497 | + GUESS=m68k-atari-mint$UNAME_RELEASE | |
| 498 | + ;; | |
| 451 | 499 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
| 452 | - echo m68k-atari-mint"$UNAME_RELEASE" | |
| 453 | - exit ;; | |
| 500 | + GUESS=m68k-atari-mint$UNAME_RELEASE | |
| 501 | + ;; | |
| 454 | 502 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
| 455 | - echo m68k-atari-mint"$UNAME_RELEASE" | |
| 456 | - exit ;; | |
| 503 | + GUESS=m68k-atari-mint$UNAME_RELEASE | |
| 504 | + ;; | |
| 457 | 505 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
| 458 | - echo m68k-milan-mint"$UNAME_RELEASE" | |
| 459 | - exit ;; | |
| 506 | + GUESS=m68k-milan-mint$UNAME_RELEASE | |
| 507 | + ;; | |
| 460 | 508 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
| 461 | - echo m68k-hades-mint"$UNAME_RELEASE" | |
| 462 | - exit ;; | |
| 509 | + GUESS=m68k-hades-mint$UNAME_RELEASE | |
| 510 | + ;; | |
| 463 | 511 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
| 464 | - echo m68k-unknown-mint"$UNAME_RELEASE" | |
| 465 | - exit ;; | |
| 512 | + GUESS=m68k-unknown-mint$UNAME_RELEASE | |
| 513 | + ;; | |
| 466 | 514 | m68k:machten:*:*) |
| 467 | - echo m68k-apple-machten"$UNAME_RELEASE" | |
| 468 | - exit ;; | |
| 515 | + GUESS=m68k-apple-machten$UNAME_RELEASE | |
| 516 | + ;; | |
| 469 | 517 | powerpc:machten:*:*) |
| 470 | - echo powerpc-apple-machten"$UNAME_RELEASE" | |
| 471 | - exit ;; | |
| 518 | + GUESS=powerpc-apple-machten$UNAME_RELEASE | |
| 519 | + ;; | |
| 472 | 520 | RISC*:Mach:*:*) |
| 473 | - echo mips-dec-mach_bsd4.3 | |
| 474 | - exit ;; | |
| 521 | + GUESS=mips-dec-mach_bsd4.3 | |
| 522 | + ;; | |
| 475 | 523 | RISC*:ULTRIX:*:*) |
| 476 | - echo mips-dec-ultrix"$UNAME_RELEASE" | |
| 477 | - exit ;; | |
| 524 | + GUESS=mips-dec-ultrix$UNAME_RELEASE | |
| 525 | + ;; | |
| 478 | 526 | VAX*:ULTRIX*:*:*) |
| 479 | - echo vax-dec-ultrix"$UNAME_RELEASE" | |
| 480 | - exit ;; | |
| 527 | + GUESS=vax-dec-ultrix$UNAME_RELEASE | |
| 528 | + ;; | |
| 481 | 529 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
| 482 | - echo clipper-intergraph-clix"$UNAME_RELEASE" | |
| 483 | - exit ;; | |
| 530 | + GUESS=clipper-intergraph-clix$UNAME_RELEASE | |
| 531 | + ;; | |
| 484 | 532 | mips:*:*:UMIPS | mips:*:*:RISCos) |
| 485 | - eval "$set_cc_for_build" | |
| 533 | + set_cc_for_build | |
| 486 | 534 | sed 's/^ //' << EOF > "$dummy.c" |
| 487 | 535 | #ifdef __cplusplus |
| 488 | 536 | #include <stdio.h> /* for printf() prototype */ |
| 489 | 537 | int main (int argc, char *argv[]) { |
| 490 | 538 | #else |
| @@ -506,82 +554,83 @@ | ||
| 506 | 554 | EOF |
| 507 | 555 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && |
| 508 | 556 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
| 509 | 557 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
| 510 | 558 | { echo "$SYSTEM_NAME"; exit; } |
| 511 | - echo mips-mips-riscos"$UNAME_RELEASE" | |
| 512 | - exit ;; | |
| 559 | + GUESS=mips-mips-riscos$UNAME_RELEASE | |
| 560 | + ;; | |
| 513 | 561 | Motorola:PowerMAX_OS:*:*) |
| 514 | - echo powerpc-motorola-powermax | |
| 515 | - exit ;; | |
| 562 | + GUESS=powerpc-motorola-powermax | |
| 563 | + ;; | |
| 516 | 564 | Motorola:*:4.3:PL8-*) |
| 517 | - echo powerpc-harris-powermax | |
| 518 | - exit ;; | |
| 565 | + GUESS=powerpc-harris-powermax | |
| 566 | + ;; | |
| 519 | 567 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
| 520 | - echo powerpc-harris-powermax | |
| 521 | - exit ;; | |
| 568 | + GUESS=powerpc-harris-powermax | |
| 569 | + ;; | |
| 522 | 570 | Night_Hawk:Power_UNIX:*:*) |
| 523 | - echo powerpc-harris-powerunix | |
| 524 | - exit ;; | |
| 571 | + GUESS=powerpc-harris-powerunix | |
| 572 | + ;; | |
| 525 | 573 | m88k:CX/UX:7*:*) |
| 526 | - echo m88k-harris-cxux7 | |
| 527 | - exit ;; | |
| 574 | + GUESS=m88k-harris-cxux7 | |
| 575 | + ;; | |
| 528 | 576 | m88k:*:4*:R4*) |
| 529 | - echo m88k-motorola-sysv4 | |
| 530 | - exit ;; | |
| 577 | + GUESS=m88k-motorola-sysv4 | |
| 578 | + ;; | |
| 531 | 579 | m88k:*:3*:R3*) |
| 532 | - echo m88k-motorola-sysv3 | |
| 533 | - exit ;; | |
| 580 | + GUESS=m88k-motorola-sysv3 | |
| 581 | + ;; | |
| 534 | 582 | AViiON:dgux:*:*) |
| 535 | 583 | # DG/UX returns AViiON for all architectures |
| 536 | 584 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 537 | - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] | |
| 538 | - then | |
| 539 | - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ | |
| 540 | - [ "$TARGET_BINARY_INTERFACE"x = x ] | |
| 541 | - then | |
| 542 | - echo m88k-dg-dgux"$UNAME_RELEASE" | |
| 543 | - else | |
| 544 | - echo m88k-dg-dguxbcs"$UNAME_RELEASE" | |
| 545 | - fi | |
| 546 | - else | |
| 547 | - echo i586-dg-dgux"$UNAME_RELEASE" | |
| 548 | - fi | |
| 549 | - exit ;; | |
| 550 | - M88*:DolphinOS:*:*) # DolphinOS (SVR3) | |
| 551 | - echo m88k-dolphin-sysv3 | |
| 552 | - exit ;; | |
| 585 | + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 | |
| 586 | + then | |
| 587 | + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ | |
| 588 | + test "$TARGET_BINARY_INTERFACE"x = x | |
| 589 | + then | |
| 590 | + GUESS=m88k-dg-dgux$UNAME_RELEASE | |
| 591 | + else | |
| 592 | + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE | |
| 593 | + fi | |
| 594 | + else | |
| 595 | + GUESS=i586-dg-dgux$UNAME_RELEASE | |
| 596 | + fi | |
| 597 | + ;; | |
| 598 | + M88*:DolphinOS:*:*) # DolphinOS (SVR3) | |
| 599 | + GUESS=m88k-dolphin-sysv3 | |
| 600 | + ;; | |
| 553 | 601 | M88*:*:R3*:*) |
| 554 | 602 | # Delta 88k system running SVR3 |
| 555 | - echo m88k-motorola-sysv3 | |
| 556 | - exit ;; | |
| 603 | + GUESS=m88k-motorola-sysv3 | |
| 604 | + ;; | |
| 557 | 605 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
| 558 | - echo m88k-tektronix-sysv3 | |
| 559 | - exit ;; | |
| 606 | + GUESS=m88k-tektronix-sysv3 | |
| 607 | + ;; | |
| 560 | 608 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
| 561 | - echo m68k-tektronix-bsd | |
| 562 | - exit ;; | |
| 609 | + GUESS=m68k-tektronix-bsd | |
| 610 | + ;; | |
| 563 | 611 | *:IRIX*:*:*) |
| 564 | - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" | |
| 565 | - exit ;; | |
| 612 | + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` | |
| 613 | + GUESS=mips-sgi-irix$IRIX_REL | |
| 614 | + ;; | |
| 566 | 615 | ????????: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 ' | |
| 616 | + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
| 617 | + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
| 569 | 618 | i*86:AIX:*:*) |
| 570 | - echo i386-ibm-aix | |
| 571 | - exit ;; | |
| 619 | + GUESS=i386-ibm-aix | |
| 620 | + ;; | |
| 572 | 621 | ia64:AIX:*:*) |
| 573 | - if [ -x /usr/bin/oslevel ] ; then | |
| 622 | + if test -x /usr/bin/oslevel ; then | |
| 574 | 623 | IBM_REV=`/usr/bin/oslevel` |
| 575 | 624 | else |
| 576 | - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
| 625 | + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE | |
| 577 | 626 | fi |
| 578 | - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" | |
| 579 | - exit ;; | |
| 627 | + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV | |
| 628 | + ;; | |
| 580 | 629 | *:AIX:2:3) |
| 581 | 630 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
| 582 | - eval "$set_cc_for_build" | |
| 631 | + set_cc_for_build | |
| 583 | 632 | sed 's/^ //' << EOF > "$dummy.c" |
| 584 | 633 | #include <sys/systemcfg.h> |
| 585 | 634 | |
| 586 | 635 | main() |
| 587 | 636 | { |
| @@ -591,78 +640,78 @@ | ||
| 591 | 640 | exit(0); |
| 592 | 641 | } |
| 593 | 642 | EOF |
| 594 | 643 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
| 595 | 644 | then |
| 596 | - echo "$SYSTEM_NAME" | |
| 645 | + GUESS=$SYSTEM_NAME | |
| 597 | 646 | else |
| 598 | - echo rs6000-ibm-aix3.2.5 | |
| 647 | + GUESS=rs6000-ibm-aix3.2.5 | |
| 599 | 648 | fi |
| 600 | 649 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
| 601 | - echo rs6000-ibm-aix3.2.4 | |
| 650 | + GUESS=rs6000-ibm-aix3.2.4 | |
| 602 | 651 | else |
| 603 | - echo rs6000-ibm-aix3.2 | |
| 652 | + GUESS=rs6000-ibm-aix3.2 | |
| 604 | 653 | fi |
| 605 | - exit ;; | |
| 654 | + ;; | |
| 606 | 655 | *:AIX:*:[4567]) |
| 607 | 656 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
| 608 | 657 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
| 609 | 658 | IBM_ARCH=rs6000 |
| 610 | 659 | else |
| 611 | 660 | IBM_ARCH=powerpc |
| 612 | 661 | fi |
| 613 | - if [ -x /usr/bin/lslpp ] ; then | |
| 614 | - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | | |
| 662 | + if test -x /usr/bin/lslpp ; then | |
| 663 | + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ | |
| 615 | 664 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
| 616 | 665 | else |
| 617 | - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" | |
| 666 | + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE | |
| 618 | 667 | fi |
| 619 | - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" | |
| 620 | - exit ;; | |
| 668 | + GUESS=$IBM_ARCH-ibm-aix$IBM_REV | |
| 669 | + ;; | |
| 621 | 670 | *:AIX:*:*) |
| 622 | - echo rs6000-ibm-aix | |
| 623 | - exit ;; | |
| 671 | + GUESS=rs6000-ibm-aix | |
| 672 | + ;; | |
| 624 | 673 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
| 625 | - echo romp-ibm-bsd4.4 | |
| 626 | - exit ;; | |
| 674 | + GUESS=romp-ibm-bsd4.4 | |
| 675 | + ;; | |
| 627 | 676 | 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 | |
| 677 | + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to | |
| 678 | + ;; # report: romp-ibm BSD 4.3 | |
| 630 | 679 | *:BOSX:*:*) |
| 631 | - echo rs6000-bull-bosx | |
| 632 | - exit ;; | |
| 680 | + GUESS=rs6000-bull-bosx | |
| 681 | + ;; | |
| 633 | 682 | DPX/2?00:B.O.S.:*:*) |
| 634 | - echo m68k-bull-sysv3 | |
| 635 | - exit ;; | |
| 683 | + GUESS=m68k-bull-sysv3 | |
| 684 | + ;; | |
| 636 | 685 | 9000/[34]??:4.3bsd:1.*:*) |
| 637 | - echo m68k-hp-bsd | |
| 638 | - exit ;; | |
| 686 | + GUESS=m68k-hp-bsd | |
| 687 | + ;; | |
| 639 | 688 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
| 640 | - echo m68k-hp-bsd4.4 | |
| 641 | - exit ;; | |
| 689 | + GUESS=m68k-hp-bsd4.4 | |
| 690 | + ;; | |
| 642 | 691 | 9000/[34678]??:HP-UX:*:*) |
| 643 | - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
| 644 | - case "$UNAME_MACHINE" in | |
| 692 | + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` | |
| 693 | + case $UNAME_MACHINE in | |
| 645 | 694 | 9000/31?) HP_ARCH=m68000 ;; |
| 646 | 695 | 9000/[34]??) HP_ARCH=m68k ;; |
| 647 | 696 | 9000/[678][0-9][0-9]) |
| 648 | - if [ -x /usr/bin/getconf ]; then | |
| 697 | + if test -x /usr/bin/getconf; then | |
| 649 | 698 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 650 | 699 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 651 | - case "$sc_cpu_version" in | |
| 700 | + case $sc_cpu_version in | |
| 652 | 701 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
| 653 | 702 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
| 654 | 703 | 532) # CPU_PA_RISC2_0 |
| 655 | - case "$sc_kernel_bits" in | |
| 704 | + case $sc_kernel_bits in | |
| 656 | 705 | 32) HP_ARCH=hppa2.0n ;; |
| 657 | 706 | 64) HP_ARCH=hppa2.0w ;; |
| 658 | 707 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
| 659 | 708 | esac ;; |
| 660 | 709 | esac |
| 661 | 710 | fi |
| 662 | - if [ "$HP_ARCH" = "" ]; then | |
| 663 | - eval "$set_cc_for_build" | |
| 711 | + if test "$HP_ARCH" = ""; then | |
| 712 | + set_cc_for_build | |
| 664 | 713 | sed 's/^ //' << EOF > "$dummy.c" |
| 665 | 714 | |
| 666 | 715 | #define _HPUX_SOURCE |
| 667 | 716 | #include <stdlib.h> |
| 668 | 717 | #include <unistd.h> |
| @@ -696,13 +745,13 @@ | ||
| 696 | 745 | EOF |
| 697 | 746 | (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` |
| 698 | 747 | test -z "$HP_ARCH" && HP_ARCH=hppa |
| 699 | 748 | fi ;; |
| 700 | 749 | esac |
| 701 | - if [ "$HP_ARCH" = hppa2.0w ] | |
| 750 | + if test "$HP_ARCH" = hppa2.0w | |
| 702 | 751 | then |
| 703 | - eval "$set_cc_for_build" | |
| 752 | + set_cc_for_build | |
| 704 | 753 | |
| 705 | 754 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
| 706 | 755 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
| 707 | 756 | # generating 64-bit code. GNU and HP use different nomenclature: |
| 708 | 757 | # |
| @@ -717,18 +766,18 @@ | ||
| 717 | 766 | HP_ARCH=hppa2.0w |
| 718 | 767 | else |
| 719 | 768 | HP_ARCH=hppa64 |
| 720 | 769 | fi |
| 721 | 770 | fi |
| 722 | - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" | |
| 723 | - exit ;; | |
| 771 | + GUESS=$HP_ARCH-hp-hpux$HPUX_REV | |
| 772 | + ;; | |
| 724 | 773 | ia64:HP-UX:*:*) |
| 725 | - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` | |
| 726 | - echo ia64-hp-hpux"$HPUX_REV" | |
| 727 | - exit ;; | |
| 774 | + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` | |
| 775 | + GUESS=ia64-hp-hpux$HPUX_REV | |
| 776 | + ;; | |
| 728 | 777 | 3050*:HI-UX:*:*) |
| 729 | - eval "$set_cc_for_build" | |
| 778 | + set_cc_for_build | |
| 730 | 779 | sed 's/^ //' << EOF > "$dummy.c" |
| 731 | 780 | #include <unistd.h> |
| 732 | 781 | int |
| 733 | 782 | main () |
| 734 | 783 | { |
| @@ -752,162 +801,215 @@ | ||
| 752 | 801 | exit (0); |
| 753 | 802 | } |
| 754 | 803 | EOF |
| 755 | 804 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
| 756 | 805 | { echo "$SYSTEM_NAME"; exit; } |
| 757 | - echo unknown-hitachi-hiuxwe2 | |
| 758 | - exit ;; | |
| 806 | + GUESS=unknown-hitachi-hiuxwe2 | |
| 807 | + ;; | |
| 759 | 808 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
| 760 | - echo hppa1.1-hp-bsd | |
| 761 | - exit ;; | |
| 809 | + GUESS=hppa1.1-hp-bsd | |
| 810 | + ;; | |
| 762 | 811 | 9000/8??:4.3bsd:*:*) |
| 763 | - echo hppa1.0-hp-bsd | |
| 764 | - exit ;; | |
| 812 | + GUESS=hppa1.0-hp-bsd | |
| 813 | + ;; | |
| 765 | 814 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
| 766 | - echo hppa1.0-hp-mpeix | |
| 767 | - exit ;; | |
| 815 | + GUESS=hppa1.0-hp-mpeix | |
| 816 | + ;; | |
| 768 | 817 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
| 769 | - echo hppa1.1-hp-osf | |
| 770 | - exit ;; | |
| 818 | + GUESS=hppa1.1-hp-osf | |
| 819 | + ;; | |
| 771 | 820 | hp8??:OSF1:*:*) |
| 772 | - echo hppa1.0-hp-osf | |
| 773 | - exit ;; | |
| 821 | + GUESS=hppa1.0-hp-osf | |
| 822 | + ;; | |
| 774 | 823 | i*86:OSF1:*:*) |
| 775 | - if [ -x /usr/sbin/sysversion ] ; then | |
| 776 | - echo "$UNAME_MACHINE"-unknown-osf1mk | |
| 824 | + if test -x /usr/sbin/sysversion ; then | |
| 825 | + GUESS=$UNAME_MACHINE-unknown-osf1mk | |
| 777 | 826 | else |
| 778 | - echo "$UNAME_MACHINE"-unknown-osf1 | |
| 827 | + GUESS=$UNAME_MACHINE-unknown-osf1 | |
| 779 | 828 | fi |
| 780 | - exit ;; | |
| 829 | + ;; | |
| 781 | 830 | parisc*:Lites*:*:*) |
| 782 | - echo hppa1.1-hp-lites | |
| 783 | - exit ;; | |
| 831 | + GUESS=hppa1.1-hp-lites | |
| 832 | + ;; | |
| 784 | 833 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
| 785 | - echo c1-convex-bsd | |
| 786 | - exit ;; | |
| 834 | + GUESS=c1-convex-bsd | |
| 835 | + ;; | |
| 787 | 836 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
| 788 | 837 | if getsysinfo -f scalar_acc |
| 789 | 838 | then echo c32-convex-bsd |
| 790 | 839 | else echo c2-convex-bsd |
| 791 | 840 | fi |
| 792 | 841 | exit ;; |
| 793 | 842 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
| 794 | - echo c34-convex-bsd | |
| 795 | - exit ;; | |
| 843 | + GUESS=c34-convex-bsd | |
| 844 | + ;; | |
| 796 | 845 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
| 797 | - echo c38-convex-bsd | |
| 798 | - exit ;; | |
| 846 | + GUESS=c38-convex-bsd | |
| 847 | + ;; | |
| 799 | 848 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
| 800 | - echo c4-convex-bsd | |
| 801 | - exit ;; | |
| 849 | + GUESS=c4-convex-bsd | |
| 850 | + ;; | |
| 802 | 851 | CRAY*Y-MP:*:*:*) |
| 803 | - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 804 | - exit ;; | |
| 852 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
| 853 | + GUESS=ymp-cray-unicos$CRAY_REL | |
| 854 | + ;; | |
| 805 | 855 | CRAY*[A-Z]90:*:*:*) |
| 806 | 856 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
| 807 | 857 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
| 808 | 858 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
| 809 | 859 | -e 's/\.[^.]*$/.X/' |
| 810 | 860 | exit ;; |
| 811 | 861 | CRAY*TS:*:*:*) |
| 812 | - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 813 | - exit ;; | |
| 862 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
| 863 | + GUESS=t90-cray-unicos$CRAY_REL | |
| 864 | + ;; | |
| 814 | 865 | CRAY*T3E:*:*:*) |
| 815 | - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 816 | - exit ;; | |
| 866 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
| 867 | + GUESS=alphaev5-cray-unicosmk$CRAY_REL | |
| 868 | + ;; | |
| 817 | 869 | CRAY*SV1:*:*:*) |
| 818 | - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 819 | - exit ;; | |
| 870 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
| 871 | + GUESS=sv1-cray-unicos$CRAY_REL | |
| 872 | + ;; | |
| 820 | 873 | *:UNICOS/mp:*:*) |
| 821 | - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' | |
| 822 | - exit ;; | |
| 874 | + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` | |
| 875 | + GUESS=craynv-cray-unicosmp$CRAY_REL | |
| 876 | + ;; | |
| 823 | 877 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
| 824 | 878 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
| 825 | 879 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 826 | 880 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
| 827 | - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
| 828 | - exit ;; | |
| 881 | + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} | |
| 882 | + ;; | |
| 829 | 883 | 5000:UNIX_System_V:4.*:*) |
| 830 | 884 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 831 | 885 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
| 832 | - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
| 833 | - exit ;; | |
| 886 | + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} | |
| 887 | + ;; | |
| 834 | 888 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
| 835 | - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" | |
| 836 | - exit ;; | |
| 889 | + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE | |
| 890 | + ;; | |
| 837 | 891 | sparc*:BSD/OS:*:*) |
| 838 | - echo sparc-unknown-bsdi"$UNAME_RELEASE" | |
| 839 | - exit ;; | |
| 892 | + GUESS=sparc-unknown-bsdi$UNAME_RELEASE | |
| 893 | + ;; | |
| 840 | 894 | *:BSD/OS:*:*) |
| 841 | - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" | |
| 842 | - exit ;; | |
| 895 | + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE | |
| 896 | + ;; | |
| 897 | + arm:FreeBSD:*:*) | |
| 898 | + UNAME_PROCESSOR=`uname -p` | |
| 899 | + set_cc_for_build | |
| 900 | + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
| 901 | + | grep -q __ARM_PCS_VFP | |
| 902 | + then | |
| 903 | + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
| 904 | + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi | |
| 905 | + else | |
| 906 | + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
| 907 | + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf | |
| 908 | + fi | |
| 909 | + ;; | |
| 843 | 910 | *:FreeBSD:*:*) |
| 844 | - UNAME_PROCESSOR=`/usr/bin/uname -p` | |
| 845 | - case "$UNAME_PROCESSOR" in | |
| 911 | + UNAME_PROCESSOR=`uname -p` | |
| 912 | + case $UNAME_PROCESSOR in | |
| 846 | 913 | amd64) |
| 847 | 914 | UNAME_PROCESSOR=x86_64 ;; |
| 848 | 915 | i386) |
| 849 | 916 | UNAME_PROCESSOR=i586 ;; |
| 850 | 917 | esac |
| 851 | - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
| 852 | - exit ;; | |
| 918 | + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
| 919 | + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL | |
| 920 | + ;; | |
| 853 | 921 | i*:CYGWIN*:*) |
| 854 | - echo "$UNAME_MACHINE"-pc-cygwin | |
| 855 | - exit ;; | |
| 922 | + GUESS=$UNAME_MACHINE-pc-cygwin | |
| 923 | + ;; | |
| 856 | 924 | *:MINGW64*:*) |
| 857 | - echo "$UNAME_MACHINE"-pc-mingw64 | |
| 858 | - exit ;; | |
| 925 | + GUESS=$UNAME_MACHINE-pc-mingw64 | |
| 926 | + ;; | |
| 859 | 927 | *:MINGW*:*) |
| 860 | - echo "$UNAME_MACHINE"-pc-mingw32 | |
| 861 | - exit ;; | |
| 928 | + GUESS=$UNAME_MACHINE-pc-mingw32 | |
| 929 | + ;; | |
| 862 | 930 | *:MSYS*:*) |
| 863 | - echo "$UNAME_MACHINE"-pc-msys | |
| 864 | - exit ;; | |
| 931 | + GUESS=$UNAME_MACHINE-pc-msys | |
| 932 | + ;; | |
| 865 | 933 | i*:PW*:*) |
| 866 | - echo "$UNAME_MACHINE"-pc-pw32 | |
| 867 | - exit ;; | |
| 934 | + GUESS=$UNAME_MACHINE-pc-pw32 | |
| 935 | + ;; | |
| 936 | + *:SerenityOS:*:*) | |
| 937 | + GUESS=$UNAME_MACHINE-pc-serenity | |
| 938 | + ;; | |
| 868 | 939 | *:Interix*:*) |
| 869 | - case "$UNAME_MACHINE" in | |
| 940 | + case $UNAME_MACHINE in | |
| 870 | 941 | x86) |
| 871 | - echo i586-pc-interix"$UNAME_RELEASE" | |
| 872 | - exit ;; | |
| 942 | + GUESS=i586-pc-interix$UNAME_RELEASE | |
| 943 | + ;; | |
| 873 | 944 | authenticamd | genuineintel | EM64T) |
| 874 | - echo x86_64-unknown-interix"$UNAME_RELEASE" | |
| 875 | - exit ;; | |
| 945 | + GUESS=x86_64-unknown-interix$UNAME_RELEASE | |
| 946 | + ;; | |
| 876 | 947 | IA64) |
| 877 | - echo ia64-unknown-interix"$UNAME_RELEASE" | |
| 878 | - exit ;; | |
| 948 | + GUESS=ia64-unknown-interix$UNAME_RELEASE | |
| 949 | + ;; | |
| 879 | 950 | esac ;; |
| 880 | 951 | i*:UWIN*:*) |
| 881 | - echo "$UNAME_MACHINE"-pc-uwin | |
| 882 | - exit ;; | |
| 952 | + GUESS=$UNAME_MACHINE-pc-uwin | |
| 953 | + ;; | |
| 883 | 954 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
| 884 | - echo x86_64-unknown-cygwin | |
| 885 | - exit ;; | |
| 955 | + GUESS=x86_64-pc-cygwin | |
| 956 | + ;; | |
| 886 | 957 | prep*:SunOS:5.*:*) |
| 887 | - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" | |
| 888 | - exit ;; | |
| 958 | + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` | |
| 959 | + GUESS=powerpcle-unknown-solaris2$SUN_REL | |
| 960 | + ;; | |
| 889 | 961 | *:GNU:*:*) |
| 890 | 962 | # the GNU system |
| 891 | - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" | |
| 892 | - exit ;; | |
| 963 | + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` | |
| 964 | + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` | |
| 965 | + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL | |
| 966 | + ;; | |
| 893 | 967 | *:GNU/*:*:*) |
| 894 | 968 | # 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 ;; | |
| 969 | + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` | |
| 970 | + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
| 971 | + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC | |
| 972 | + ;; | |
| 973 | + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) | |
| 974 | + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" | |
| 975 | + ;; | |
| 976 | + *:[Mm]anagarm:*:*) | |
| 977 | + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" | |
| 978 | + ;; | |
| 979 | + *:Minix:*:*) | |
| 980 | + GUESS=$UNAME_MACHINE-unknown-minix | |
| 981 | + ;; | |
| 900 | 982 | aarch64:Linux:*:*) |
| 901 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 902 | - exit ;; | |
| 983 | + set_cc_for_build | |
| 984 | + CPU=$UNAME_MACHINE | |
| 985 | + LIBCABI=$LIBC | |
| 986 | + if test "$CC_FOR_BUILD" != no_compiler_found; then | |
| 987 | + ABI=64 | |
| 988 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 989 | + #ifdef __ARM_EABI__ | |
| 990 | + #ifdef __ARM_PCS_VFP | |
| 991 | + ABI=eabihf | |
| 992 | + #else | |
| 993 | + ABI=eabi | |
| 994 | + #endif | |
| 995 | + #endif | |
| 996 | +EOF | |
| 997 | + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` | |
| 998 | + eval "$cc_set_abi" | |
| 999 | + case $ABI in | |
| 1000 | + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; | |
| 1001 | + esac | |
| 1002 | + fi | |
| 1003 | + GUESS=$CPU-unknown-linux-$LIBCABI | |
| 1004 | + ;; | |
| 903 | 1005 | aarch64_be:Linux:*:*) |
| 904 | 1006 | UNAME_MACHINE=aarch64_be |
| 905 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 906 | - exit ;; | |
| 1007 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1008 | + ;; | |
| 907 | 1009 | alpha:Linux:*:*) |
| 908 | - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
| 1010 | + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in | |
| 909 | 1011 | EV5) UNAME_MACHINE=alphaev5 ;; |
| 910 | 1012 | EV56) UNAME_MACHINE=alphaev56 ;; |
| 911 | 1013 | PCA56) UNAME_MACHINE=alphapca56 ;; |
| 912 | 1014 | PCA57) UNAME_MACHINE=alphapca56 ;; |
| 913 | 1015 | EV6) UNAME_MACHINE=alphaev6 ;; |
| @@ -914,246 +1016,308 @@ | ||
| 914 | 1016 | EV67) UNAME_MACHINE=alphaev67 ;; |
| 915 | 1017 | EV68*) UNAME_MACHINE=alphaev68 ;; |
| 916 | 1018 | esac |
| 917 | 1019 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
| 918 | 1020 | 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 ;; | |
| 1021 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1022 | + ;; | |
| 1023 | + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) | |
| 1024 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1025 | + ;; | |
| 924 | 1026 | arm*:Linux:*:*) |
| 925 | - eval "$set_cc_for_build" | |
| 1027 | + set_cc_for_build | |
| 926 | 1028 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 927 | 1029 | | grep -q __ARM_EABI__ |
| 928 | 1030 | then |
| 929 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1031 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 930 | 1032 | else |
| 931 | 1033 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 932 | 1034 | | grep -q __ARM_PCS_VFP |
| 933 | 1035 | then |
| 934 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi | |
| 1036 | + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi | |
| 935 | 1037 | else |
| 936 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf | |
| 1038 | + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf | |
| 937 | 1039 | fi |
| 938 | 1040 | fi |
| 939 | - exit ;; | |
| 1041 | + ;; | |
| 940 | 1042 | avr32*:Linux:*:*) |
| 941 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 942 | - exit ;; | |
| 1043 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1044 | + ;; | |
| 943 | 1045 | cris:Linux:*:*) |
| 944 | - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
| 945 | - exit ;; | |
| 1046 | + GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
| 1047 | + ;; | |
| 946 | 1048 | crisv32:Linux:*:*) |
| 947 | - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" | |
| 948 | - exit ;; | |
| 1049 | + GUESS=$UNAME_MACHINE-axis-linux-$LIBC | |
| 1050 | + ;; | |
| 949 | 1051 | e2k:Linux:*:*) |
| 950 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 951 | - exit ;; | |
| 1052 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1053 | + ;; | |
| 952 | 1054 | frv:Linux:*:*) |
| 953 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 954 | - exit ;; | |
| 1055 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1056 | + ;; | |
| 955 | 1057 | hexagon:Linux:*:*) |
| 956 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 957 | - exit ;; | |
| 1058 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1059 | + ;; | |
| 958 | 1060 | i*86:Linux:*:*) |
| 959 | - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
| 960 | - exit ;; | |
| 1061 | + GUESS=$UNAME_MACHINE-pc-linux-$LIBC | |
| 1062 | + ;; | |
| 961 | 1063 | ia64:Linux:*:*) |
| 962 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 963 | - exit ;; | |
| 1064 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1065 | + ;; | |
| 964 | 1066 | k1om:Linux:*:*) |
| 965 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 966 | - exit ;; | |
| 1067 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1068 | + ;; | |
| 1069 | + kvx:Linux:*:*) | |
| 1070 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1071 | + ;; | |
| 1072 | + kvx:cos:*:*) | |
| 1073 | + GUESS=$UNAME_MACHINE-unknown-cos | |
| 1074 | + ;; | |
| 1075 | + kvx:mbr:*:*) | |
| 1076 | + GUESS=$UNAME_MACHINE-unknown-mbr | |
| 1077 | + ;; | |
| 1078 | + loongarch32:Linux:*:* | loongarch64:Linux:*:*) | |
| 1079 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1080 | + ;; | |
| 967 | 1081 | m32r*:Linux:*:*) |
| 968 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 969 | - exit ;; | |
| 1082 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1083 | + ;; | |
| 970 | 1084 | m68*:Linux:*:*) |
| 971 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 972 | - exit ;; | |
| 1085 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1086 | + ;; | |
| 973 | 1087 | mips:Linux:*:* | mips64:Linux:*:*) |
| 974 | - eval "$set_cc_for_build" | |
| 1088 | + set_cc_for_build | |
| 1089 | + IS_GLIBC=0 | |
| 1090 | + test x"${LIBC}" = xgnu && IS_GLIBC=1 | |
| 975 | 1091 | sed 's/^ //' << EOF > "$dummy.c" |
| 976 | 1092 | #undef CPU |
| 977 | - #undef ${UNAME_MACHINE} | |
| 978 | - #undef ${UNAME_MACHINE}el | |
| 1093 | + #undef mips | |
| 1094 | + #undef mipsel | |
| 1095 | + #undef mips64 | |
| 1096 | + #undef mips64el | |
| 1097 | + #if ${IS_GLIBC} && defined(_ABI64) | |
| 1098 | + LIBCABI=gnuabi64 | |
| 1099 | + #else | |
| 1100 | + #if ${IS_GLIBC} && defined(_ABIN32) | |
| 1101 | + LIBCABI=gnuabin32 | |
| 1102 | + #else | |
| 1103 | + LIBCABI=${LIBC} | |
| 1104 | + #endif | |
| 1105 | + #endif | |
| 1106 | + | |
| 1107 | + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
| 1108 | + CPU=mipsisa64r6 | |
| 1109 | + #else | |
| 1110 | + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 | |
| 1111 | + CPU=mipsisa32r6 | |
| 1112 | + #else | |
| 1113 | + #if defined(__mips64) | |
| 1114 | + CPU=mips64 | |
| 1115 | + #else | |
| 1116 | + CPU=mips | |
| 1117 | + #endif | |
| 1118 | + #endif | |
| 1119 | + #endif | |
| 1120 | + | |
| 979 | 1121 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
| 980 | - CPU=${UNAME_MACHINE}el | |
| 1122 | + MIPS_ENDIAN=el | |
| 981 | 1123 | #else |
| 982 | 1124 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
| 983 | - CPU=${UNAME_MACHINE} | |
| 1125 | + MIPS_ENDIAN= | |
| 984 | 1126 | #else |
| 985 | - CPU= | |
| 1127 | + MIPS_ENDIAN= | |
| 986 | 1128 | #endif |
| 987 | 1129 | #endif |
| 988 | 1130 | 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; } | |
| 1131 | + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` | |
| 1132 | + eval "$cc_set_vars" | |
| 1133 | + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } | |
| 991 | 1134 | ;; |
| 992 | 1135 | mips64el:Linux:*:*) |
| 993 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 994 | - exit ;; | |
| 1136 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1137 | + ;; | |
| 995 | 1138 | openrisc*:Linux:*:*) |
| 996 | - echo or1k-unknown-linux-"$LIBC" | |
| 997 | - exit ;; | |
| 1139 | + GUESS=or1k-unknown-linux-$LIBC | |
| 1140 | + ;; | |
| 998 | 1141 | or32:Linux:*:* | or1k*:Linux:*:*) |
| 999 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1000 | - exit ;; | |
| 1142 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1143 | + ;; | |
| 1001 | 1144 | padre:Linux:*:*) |
| 1002 | - echo sparc-unknown-linux-"$LIBC" | |
| 1003 | - exit ;; | |
| 1145 | + GUESS=sparc-unknown-linux-$LIBC | |
| 1146 | + ;; | |
| 1004 | 1147 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
| 1005 | - echo hppa64-unknown-linux-"$LIBC" | |
| 1006 | - exit ;; | |
| 1148 | + GUESS=hppa64-unknown-linux-$LIBC | |
| 1149 | + ;; | |
| 1007 | 1150 | parisc:Linux:*:* | hppa:Linux:*:*) |
| 1008 | 1151 | # Look for CPU level |
| 1009 | 1152 | 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" ;; | |
| 1153 | + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; | |
| 1154 | + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; | |
| 1155 | + *) GUESS=hppa-unknown-linux-$LIBC ;; | |
| 1013 | 1156 | esac |
| 1014 | - exit ;; | |
| 1157 | + ;; | |
| 1015 | 1158 | ppc64:Linux:*:*) |
| 1016 | - echo powerpc64-unknown-linux-"$LIBC" | |
| 1017 | - exit ;; | |
| 1159 | + GUESS=powerpc64-unknown-linux-$LIBC | |
| 1160 | + ;; | |
| 1018 | 1161 | ppc:Linux:*:*) |
| 1019 | - echo powerpc-unknown-linux-"$LIBC" | |
| 1020 | - exit ;; | |
| 1162 | + GUESS=powerpc-unknown-linux-$LIBC | |
| 1163 | + ;; | |
| 1021 | 1164 | ppc64le:Linux:*:*) |
| 1022 | - echo powerpc64le-unknown-linux-"$LIBC" | |
| 1023 | - exit ;; | |
| 1165 | + GUESS=powerpc64le-unknown-linux-$LIBC | |
| 1166 | + ;; | |
| 1024 | 1167 | ppcle:Linux:*:*) |
| 1025 | - echo powerpcle-unknown-linux-"$LIBC" | |
| 1026 | - exit ;; | |
| 1027 | - riscv32:Linux:*:* | riscv64:Linux:*:*) | |
| 1028 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1029 | - exit ;; | |
| 1168 | + GUESS=powerpcle-unknown-linux-$LIBC | |
| 1169 | + ;; | |
| 1170 | + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) | |
| 1171 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1172 | + ;; | |
| 1030 | 1173 | s390:Linux:*:* | s390x:Linux:*:*) |
| 1031 | - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" | |
| 1032 | - exit ;; | |
| 1174 | + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC | |
| 1175 | + ;; | |
| 1033 | 1176 | sh64*:Linux:*:*) |
| 1034 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1035 | - exit ;; | |
| 1177 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1178 | + ;; | |
| 1036 | 1179 | sh*:Linux:*:*) |
| 1037 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1038 | - exit ;; | |
| 1180 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1181 | + ;; | |
| 1039 | 1182 | sparc:Linux:*:* | sparc64:Linux:*:*) |
| 1040 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1041 | - exit ;; | |
| 1183 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1184 | + ;; | |
| 1042 | 1185 | tile*:Linux:*:*) |
| 1043 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1044 | - exit ;; | |
| 1186 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1187 | + ;; | |
| 1045 | 1188 | vax:Linux:*:*) |
| 1046 | - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" | |
| 1047 | - exit ;; | |
| 1189 | + GUESS=$UNAME_MACHINE-dec-linux-$LIBC | |
| 1190 | + ;; | |
| 1048 | 1191 | x86_64:Linux:*:*) |
| 1049 | - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" | |
| 1050 | - exit ;; | |
| 1192 | + set_cc_for_build | |
| 1193 | + CPU=$UNAME_MACHINE | |
| 1194 | + LIBCABI=$LIBC | |
| 1195 | + if test "$CC_FOR_BUILD" != no_compiler_found; then | |
| 1196 | + ABI=64 | |
| 1197 | + sed 's/^ //' << EOF > "$dummy.c" | |
| 1198 | + #ifdef __i386__ | |
| 1199 | + ABI=x86 | |
| 1200 | + #else | |
| 1201 | + #ifdef __ILP32__ | |
| 1202 | + ABI=x32 | |
| 1203 | + #endif | |
| 1204 | + #endif | |
| 1205 | +EOF | |
| 1206 | + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` | |
| 1207 | + eval "$cc_set_abi" | |
| 1208 | + case $ABI in | |
| 1209 | + x86) CPU=i686 ;; | |
| 1210 | + x32) LIBCABI=${LIBC}x32 ;; | |
| 1211 | + esac | |
| 1212 | + fi | |
| 1213 | + GUESS=$CPU-pc-linux-$LIBCABI | |
| 1214 | + ;; | |
| 1051 | 1215 | xtensa*:Linux:*:*) |
| 1052 | - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" | |
| 1053 | - exit ;; | |
| 1216 | + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC | |
| 1217 | + ;; | |
| 1054 | 1218 | i*86:DYNIX/ptx:4*:*) |
| 1055 | 1219 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
| 1056 | 1220 | # earlier versions are messed up and put the nodename in both |
| 1057 | 1221 | # sysname and nodename. |
| 1058 | - echo i386-sequent-sysv4 | |
| 1059 | - exit ;; | |
| 1222 | + GUESS=i386-sequent-sysv4 | |
| 1223 | + ;; | |
| 1060 | 1224 | i*86:UNIX_SV:4.2MP:2.*) |
| 1061 | 1225 | # Unixware is an offshoot of SVR4, but it has its own version |
| 1062 | 1226 | # number series starting with 2... |
| 1063 | 1227 | # I am not positive that other SVR4 systems won't match this, |
| 1064 | 1228 | # I just have to hope. -- rms. |
| 1065 | 1229 | # Use sysv4.2uw... so that sysv4* matches it. |
| 1066 | - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" | |
| 1067 | - exit ;; | |
| 1230 | + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION | |
| 1231 | + ;; | |
| 1068 | 1232 | i*86:OS/2:*:*) |
| 1069 | - # If we were able to find `uname', then EMX Unix compatibility | |
| 1233 | + # If we were able to find 'uname', then EMX Unix compatibility | |
| 1070 | 1234 | # is probably installed. |
| 1071 | - echo "$UNAME_MACHINE"-pc-os2-emx | |
| 1072 | - exit ;; | |
| 1235 | + GUESS=$UNAME_MACHINE-pc-os2-emx | |
| 1236 | + ;; | |
| 1073 | 1237 | i*86:XTS-300:*:STOP) |
| 1074 | - echo "$UNAME_MACHINE"-unknown-stop | |
| 1075 | - exit ;; | |
| 1238 | + GUESS=$UNAME_MACHINE-unknown-stop | |
| 1239 | + ;; | |
| 1076 | 1240 | i*86:atheos:*:*) |
| 1077 | - echo "$UNAME_MACHINE"-unknown-atheos | |
| 1078 | - exit ;; | |
| 1241 | + GUESS=$UNAME_MACHINE-unknown-atheos | |
| 1242 | + ;; | |
| 1079 | 1243 | i*86:syllable:*:*) |
| 1080 | - echo "$UNAME_MACHINE"-pc-syllable | |
| 1081 | - exit ;; | |
| 1244 | + GUESS=$UNAME_MACHINE-pc-syllable | |
| 1245 | + ;; | |
| 1082 | 1246 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
| 1083 | - echo i386-unknown-lynxos"$UNAME_RELEASE" | |
| 1084 | - exit ;; | |
| 1247 | + GUESS=i386-unknown-lynxos$UNAME_RELEASE | |
| 1248 | + ;; | |
| 1085 | 1249 | i*86:*DOS:*:*) |
| 1086 | - echo "$UNAME_MACHINE"-pc-msdosdjgpp | |
| 1087 | - exit ;; | |
| 1250 | + GUESS=$UNAME_MACHINE-pc-msdosdjgpp | |
| 1251 | + ;; | |
| 1088 | 1252 | i*86:*:4.*:*) |
| 1089 | 1253 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
| 1090 | 1254 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
| 1091 | - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" | |
| 1255 | + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL | |
| 1092 | 1256 | else |
| 1093 | - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" | |
| 1257 | + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL | |
| 1094 | 1258 | fi |
| 1095 | - exit ;; | |
| 1259 | + ;; | |
| 1096 | 1260 | i*86:*:5:[678]*) |
| 1097 | 1261 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
| 1098 | 1262 | case `/bin/uname -X | grep "^Machine"` in |
| 1099 | 1263 | *486*) UNAME_MACHINE=i486 ;; |
| 1100 | 1264 | *Pentium) UNAME_MACHINE=i586 ;; |
| 1101 | 1265 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
| 1102 | 1266 | esac |
| 1103 | - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" | |
| 1104 | - exit ;; | |
| 1267 | + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
| 1268 | + ;; | |
| 1105 | 1269 | i*86:*:3.2:*) |
| 1106 | 1270 | if test -f /usr/options/cb.name; then |
| 1107 | 1271 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
| 1108 | - echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" | |
| 1272 | + GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL | |
| 1109 | 1273 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
| 1110 | 1274 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
| 1111 | 1275 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
| 1112 | 1276 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
| 1113 | 1277 | && UNAME_MACHINE=i586 |
| 1114 | 1278 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
| 1115 | 1279 | && UNAME_MACHINE=i686 |
| 1116 | 1280 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
| 1117 | 1281 | && UNAME_MACHINE=i686 |
| 1118 | - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" | |
| 1282 | + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL | |
| 1119 | 1283 | else |
| 1120 | - echo "$UNAME_MACHINE"-pc-sysv32 | |
| 1284 | + GUESS=$UNAME_MACHINE-pc-sysv32 | |
| 1121 | 1285 | fi |
| 1122 | - exit ;; | |
| 1286 | + ;; | |
| 1123 | 1287 | pc:*:*:*) |
| 1124 | 1288 | # Left here for compatibility: |
| 1125 | 1289 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
| 1126 | 1290 | # the processor, so we play safe by assuming i586. |
| 1127 | 1291 | # Note: whatever this is, it MUST be the same as what config.sub |
| 1128 | 1292 | # prints for the "djgpp" host, or else GDB configure will decide that |
| 1129 | 1293 | # this is a cross-build. |
| 1130 | - echo i586-pc-msdosdjgpp | |
| 1131 | - exit ;; | |
| 1294 | + GUESS=i586-pc-msdosdjgpp | |
| 1295 | + ;; | |
| 1132 | 1296 | Intel:Mach:3*:*) |
| 1133 | - echo i386-pc-mach3 | |
| 1134 | - exit ;; | |
| 1297 | + GUESS=i386-pc-mach3 | |
| 1298 | + ;; | |
| 1135 | 1299 | paragon:*:*:*) |
| 1136 | - echo i860-intel-osf1 | |
| 1137 | - exit ;; | |
| 1300 | + GUESS=i860-intel-osf1 | |
| 1301 | + ;; | |
| 1138 | 1302 | i860:*:4.*:*) # i860-SVR4 |
| 1139 | 1303 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
| 1140 | - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 | |
| 1304 | + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 | |
| 1141 | 1305 | else # Add other i860-SVR4 vendors below as they are discovered. |
| 1142 | - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 | |
| 1306 | + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 | |
| 1143 | 1307 | fi |
| 1144 | - exit ;; | |
| 1308 | + ;; | |
| 1145 | 1309 | mini*:CTIX:SYS*5:*) |
| 1146 | 1310 | # "miniframe" |
| 1147 | - echo m68010-convergent-sysv | |
| 1148 | - exit ;; | |
| 1311 | + GUESS=m68010-convergent-sysv | |
| 1312 | + ;; | |
| 1149 | 1313 | mc68k:UNIX:SYSTEM5:3.51m) |
| 1150 | - echo m68k-convergent-sysv | |
| 1151 | - exit ;; | |
| 1314 | + GUESS=m68k-convergent-sysv | |
| 1315 | + ;; | |
| 1152 | 1316 | M680?0:D-NIX:5.3:*) |
| 1153 | - echo m68k-diab-dnix | |
| 1154 | - exit ;; | |
| 1317 | + GUESS=m68k-diab-dnix | |
| 1318 | + ;; | |
| 1155 | 1319 | M68*:*:R3V[5678]*:*) |
| 1156 | 1320 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
| 1157 | 1321 | 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) |
| 1158 | 1322 | OS_REL='' |
| 1159 | 1323 | test -r /etc/.relid \ |
| @@ -1174,253 +1338,411 @@ | ||
| 1174 | 1338 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
| 1175 | 1339 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } |
| 1176 | 1340 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
| 1177 | 1341 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
| 1178 | 1342 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
| 1179 | - echo m68k-unknown-lynxos"$UNAME_RELEASE" | |
| 1180 | - exit ;; | |
| 1343 | + GUESS=m68k-unknown-lynxos$UNAME_RELEASE | |
| 1344 | + ;; | |
| 1181 | 1345 | mc68030:UNIX_System_V:4.*:*) |
| 1182 | - echo m68k-atari-sysv4 | |
| 1183 | - exit ;; | |
| 1346 | + GUESS=m68k-atari-sysv4 | |
| 1347 | + ;; | |
| 1184 | 1348 | TSUNAMI:LynxOS:2.*:*) |
| 1185 | - echo sparc-unknown-lynxos"$UNAME_RELEASE" | |
| 1186 | - exit ;; | |
| 1349 | + GUESS=sparc-unknown-lynxos$UNAME_RELEASE | |
| 1350 | + ;; | |
| 1187 | 1351 | rs6000:LynxOS:2.*:*) |
| 1188 | - echo rs6000-unknown-lynxos"$UNAME_RELEASE" | |
| 1189 | - exit ;; | |
| 1352 | + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE | |
| 1353 | + ;; | |
| 1190 | 1354 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
| 1191 | - echo powerpc-unknown-lynxos"$UNAME_RELEASE" | |
| 1192 | - exit ;; | |
| 1355 | + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE | |
| 1356 | + ;; | |
| 1193 | 1357 | SM[BE]S:UNIX_SV:*:*) |
| 1194 | - echo mips-dde-sysv"$UNAME_RELEASE" | |
| 1195 | - exit ;; | |
| 1358 | + GUESS=mips-dde-sysv$UNAME_RELEASE | |
| 1359 | + ;; | |
| 1196 | 1360 | RM*:ReliantUNIX-*:*:*) |
| 1197 | - echo mips-sni-sysv4 | |
| 1198 | - exit ;; | |
| 1361 | + GUESS=mips-sni-sysv4 | |
| 1362 | + ;; | |
| 1199 | 1363 | RM*:SINIX-*:*:*) |
| 1200 | - echo mips-sni-sysv4 | |
| 1201 | - exit ;; | |
| 1364 | + GUESS=mips-sni-sysv4 | |
| 1365 | + ;; | |
| 1202 | 1366 | *:SINIX-*:*:*) |
| 1203 | 1367 | if uname -p 2>/dev/null >/dev/null ; then |
| 1204 | 1368 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1205 | - echo "$UNAME_MACHINE"-sni-sysv4 | |
| 1369 | + GUESS=$UNAME_MACHINE-sni-sysv4 | |
| 1206 | 1370 | else |
| 1207 | - echo ns32k-sni-sysv | |
| 1371 | + GUESS=ns32k-sni-sysv | |
| 1208 | 1372 | fi |
| 1209 | - exit ;; | |
| 1210 | - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
| 1373 | + ;; | |
| 1374 | + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort | |
| 1211 | 1375 | # says <[email protected]> |
| 1212 | - echo i586-unisys-sysv4 | |
| 1213 | - exit ;; | |
| 1376 | + GUESS=i586-unisys-sysv4 | |
| 1377 | + ;; | |
| 1214 | 1378 | *:UNIX_System_V:4*:FTX*) |
| 1215 | 1379 | # From Gerald Hewes <[email protected]>. |
| 1216 | 1380 | # How about differentiating between stratus architectures? -djm |
| 1217 | - echo hppa1.1-stratus-sysv4 | |
| 1218 | - exit ;; | |
| 1381 | + GUESS=hppa1.1-stratus-sysv4 | |
| 1382 | + ;; | |
| 1219 | 1383 | *:*:*:FTX*) |
| 1220 | 1384 | # From [email protected]. |
| 1221 | - echo i860-stratus-sysv4 | |
| 1222 | - exit ;; | |
| 1385 | + GUESS=i860-stratus-sysv4 | |
| 1386 | + ;; | |
| 1223 | 1387 | i*86:VOS:*:*) |
| 1224 | 1388 | # From [email protected]. |
| 1225 | - echo "$UNAME_MACHINE"-stratus-vos | |
| 1226 | - exit ;; | |
| 1389 | + GUESS=$UNAME_MACHINE-stratus-vos | |
| 1390 | + ;; | |
| 1227 | 1391 | *:VOS:*:*) |
| 1228 | 1392 | # From [email protected]. |
| 1229 | - echo hppa1.1-stratus-vos | |
| 1230 | - exit ;; | |
| 1393 | + GUESS=hppa1.1-stratus-vos | |
| 1394 | + ;; | |
| 1231 | 1395 | mc68*:A/UX:*:*) |
| 1232 | - echo m68k-apple-aux"$UNAME_RELEASE" | |
| 1233 | - exit ;; | |
| 1396 | + GUESS=m68k-apple-aux$UNAME_RELEASE | |
| 1397 | + ;; | |
| 1234 | 1398 | news*:NEWS-OS:6*:*) |
| 1235 | - echo mips-sony-newsos6 | |
| 1236 | - exit ;; | |
| 1399 | + GUESS=mips-sony-newsos6 | |
| 1400 | + ;; | |
| 1237 | 1401 | 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" | |
| 1402 | + if test -d /usr/nec; then | |
| 1403 | + GUESS=mips-nec-sysv$UNAME_RELEASE | |
| 1240 | 1404 | else |
| 1241 | - echo mips-unknown-sysv"$UNAME_RELEASE" | |
| 1405 | + GUESS=mips-unknown-sysv$UNAME_RELEASE | |
| 1242 | 1406 | fi |
| 1243 | - exit ;; | |
| 1407 | + ;; | |
| 1244 | 1408 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
| 1245 | - echo powerpc-be-beos | |
| 1246 | - exit ;; | |
| 1409 | + GUESS=powerpc-be-beos | |
| 1410 | + ;; | |
| 1247 | 1411 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
| 1248 | - echo powerpc-apple-beos | |
| 1249 | - exit ;; | |
| 1412 | + GUESS=powerpc-apple-beos | |
| 1413 | + ;; | |
| 1250 | 1414 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
| 1251 | - echo i586-pc-beos | |
| 1252 | - exit ;; | |
| 1415 | + GUESS=i586-pc-beos | |
| 1416 | + ;; | |
| 1253 | 1417 | 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 ;; | |
| 1418 | + GUESS=i586-pc-haiku | |
| 1419 | + ;; | |
| 1420 | + ppc:Haiku:*:*) # Haiku running on Apple PowerPC | |
| 1421 | + GUESS=powerpc-apple-haiku | |
| 1422 | + ;; | |
| 1423 | + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) | |
| 1424 | + GUESS=$UNAME_MACHINE-unknown-haiku | |
| 1425 | + ;; | |
| 1259 | 1426 | SX-4:SUPER-UX:*:*) |
| 1260 | - echo sx4-nec-superux"$UNAME_RELEASE" | |
| 1261 | - exit ;; | |
| 1427 | + GUESS=sx4-nec-superux$UNAME_RELEASE | |
| 1428 | + ;; | |
| 1262 | 1429 | SX-5:SUPER-UX:*:*) |
| 1263 | - echo sx5-nec-superux"$UNAME_RELEASE" | |
| 1264 | - exit ;; | |
| 1430 | + GUESS=sx5-nec-superux$UNAME_RELEASE | |
| 1431 | + ;; | |
| 1265 | 1432 | SX-6:SUPER-UX:*:*) |
| 1266 | - echo sx6-nec-superux"$UNAME_RELEASE" | |
| 1267 | - exit ;; | |
| 1433 | + GUESS=sx6-nec-superux$UNAME_RELEASE | |
| 1434 | + ;; | |
| 1268 | 1435 | SX-7:SUPER-UX:*:*) |
| 1269 | - echo sx7-nec-superux"$UNAME_RELEASE" | |
| 1270 | - exit ;; | |
| 1436 | + GUESS=sx7-nec-superux$UNAME_RELEASE | |
| 1437 | + ;; | |
| 1271 | 1438 | SX-8:SUPER-UX:*:*) |
| 1272 | - echo sx8-nec-superux"$UNAME_RELEASE" | |
| 1273 | - exit ;; | |
| 1439 | + GUESS=sx8-nec-superux$UNAME_RELEASE | |
| 1440 | + ;; | |
| 1274 | 1441 | SX-8R:SUPER-UX:*:*) |
| 1275 | - echo sx8r-nec-superux"$UNAME_RELEASE" | |
| 1276 | - exit ;; | |
| 1442 | + GUESS=sx8r-nec-superux$UNAME_RELEASE | |
| 1443 | + ;; | |
| 1277 | 1444 | SX-ACE:SUPER-UX:*:*) |
| 1278 | - echo sxace-nec-superux"$UNAME_RELEASE" | |
| 1279 | - exit ;; | |
| 1445 | + GUESS=sxace-nec-superux$UNAME_RELEASE | |
| 1446 | + ;; | |
| 1280 | 1447 | Power*:Rhapsody:*:*) |
| 1281 | - echo powerpc-apple-rhapsody"$UNAME_RELEASE" | |
| 1282 | - exit ;; | |
| 1448 | + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE | |
| 1449 | + ;; | |
| 1283 | 1450 | *:Rhapsody:*:*) |
| 1284 | - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" | |
| 1285 | - exit ;; | |
| 1451 | + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE | |
| 1452 | + ;; | |
| 1453 | + arm64:Darwin:*:*) | |
| 1454 | + GUESS=aarch64-apple-darwin$UNAME_RELEASE | |
| 1455 | + ;; | |
| 1286 | 1456 | *: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 | |
| 1291 | - 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 | |
| 1457 | + UNAME_PROCESSOR=`uname -p` | |
| 1458 | + case $UNAME_PROCESSOR in | |
| 1459 | + unknown) UNAME_PROCESSOR=powerpc ;; | |
| 1460 | + esac | |
| 1461 | + if command -v xcode-select > /dev/null 2> /dev/null && \ | |
| 1462 | + ! xcode-select --print-path > /dev/null 2> /dev/null ; then | |
| 1463 | + # Avoid executing cc if there is no toolchain installed as | |
| 1464 | + # cc will be a stub that puts up a graphical alert | |
| 1465 | + # prompting the user to install developer tools. | |
| 1466 | + CC_FOR_BUILD=no_compiler_found | |
| 1467 | + else | |
| 1468 | + set_cc_for_build | |
| 1469 | + fi | |
| 1470 | + if test "$CC_FOR_BUILD" != no_compiler_found; then | |
| 1471 | + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
| 1472 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 1473 | + grep IS_64BIT_ARCH >/dev/null | |
| 1474 | + then | |
| 1475 | + case $UNAME_PROCESSOR in | |
| 1476 | + i386) UNAME_PROCESSOR=x86_64 ;; | |
| 1477 | + powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
| 1478 | + esac | |
| 1479 | + fi | |
| 1480 | + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
| 1481 | + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
| 1482 | + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
| 1483 | + grep IS_PPC >/dev/null | |
| 1484 | + then | |
| 1485 | + UNAME_PROCESSOR=powerpc | |
| 1310 | 1486 | fi |
| 1311 | 1487 | 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 | |
| 1488 | + # uname -m returns i386 or x86_64 | |
| 1489 | + UNAME_PROCESSOR=$UNAME_MACHINE | |
| 1319 | 1490 | fi |
| 1320 | - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" | |
| 1321 | - exit ;; | |
| 1491 | + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE | |
| 1492 | + ;; | |
| 1322 | 1493 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
| 1323 | 1494 | UNAME_PROCESSOR=`uname -p` |
| 1324 | 1495 | if test "$UNAME_PROCESSOR" = x86; then |
| 1325 | 1496 | UNAME_PROCESSOR=i386 |
| 1326 | 1497 | UNAME_MACHINE=pc |
| 1327 | 1498 | fi |
| 1328 | - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" | |
| 1329 | - exit ;; | |
| 1499 | + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE | |
| 1500 | + ;; | |
| 1330 | 1501 | *:QNX:*:4*) |
| 1331 | - echo i386-pc-qnx | |
| 1332 | - exit ;; | |
| 1502 | + GUESS=i386-pc-qnx | |
| 1503 | + ;; | |
| 1333 | 1504 | NEO-*:NONSTOP_KERNEL:*:*) |
| 1334 | - echo neo-tandem-nsk"$UNAME_RELEASE" | |
| 1335 | - exit ;; | |
| 1505 | + GUESS=neo-tandem-nsk$UNAME_RELEASE | |
| 1506 | + ;; | |
| 1336 | 1507 | NSE-*:NONSTOP_KERNEL:*:*) |
| 1337 | - echo nse-tandem-nsk"$UNAME_RELEASE" | |
| 1338 | - exit ;; | |
| 1508 | + GUESS=nse-tandem-nsk$UNAME_RELEASE | |
| 1509 | + ;; | |
| 1339 | 1510 | NSR-*:NONSTOP_KERNEL:*:*) |
| 1340 | - echo nsr-tandem-nsk"$UNAME_RELEASE" | |
| 1341 | - exit ;; | |
| 1511 | + GUESS=nsr-tandem-nsk$UNAME_RELEASE | |
| 1512 | + ;; | |
| 1342 | 1513 | NSV-*:NONSTOP_KERNEL:*:*) |
| 1343 | - echo nsv-tandem-nsk"$UNAME_RELEASE" | |
| 1344 | - exit ;; | |
| 1514 | + GUESS=nsv-tandem-nsk$UNAME_RELEASE | |
| 1515 | + ;; | |
| 1345 | 1516 | NSX-*:NONSTOP_KERNEL:*:*) |
| 1346 | - echo nsx-tandem-nsk"$UNAME_RELEASE" | |
| 1347 | - exit ;; | |
| 1517 | + GUESS=nsx-tandem-nsk$UNAME_RELEASE | |
| 1518 | + ;; | |
| 1348 | 1519 | *:NonStop-UX:*:*) |
| 1349 | - echo mips-compaq-nonstopux | |
| 1350 | - exit ;; | |
| 1520 | + GUESS=mips-compaq-nonstopux | |
| 1521 | + ;; | |
| 1351 | 1522 | BS2000:POSIX*:*:*) |
| 1352 | - echo bs2000-siemens-sysv | |
| 1353 | - exit ;; | |
| 1523 | + GUESS=bs2000-siemens-sysv | |
| 1524 | + ;; | |
| 1354 | 1525 | DS/*:UNIX_System_V:*:*) |
| 1355 | - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" | |
| 1356 | - exit ;; | |
| 1526 | + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE | |
| 1527 | + ;; | |
| 1357 | 1528 | *:Plan9:*:*) |
| 1358 | 1529 | # "uname -m" is not consistent, so use $cputype instead. 386 |
| 1359 | 1530 | # is converted to i386 for consistency with other x86 |
| 1360 | 1531 | # operating systems. |
| 1361 | - if test "$cputype" = 386; then | |
| 1532 | + if test "${cputype-}" = 386; then | |
| 1362 | 1533 | UNAME_MACHINE=i386 |
| 1363 | - else | |
| 1364 | - UNAME_MACHINE="$cputype" | |
| 1534 | + elif test "x${cputype-}" != x; then | |
| 1535 | + UNAME_MACHINE=$cputype | |
| 1365 | 1536 | fi |
| 1366 | - echo "$UNAME_MACHINE"-unknown-plan9 | |
| 1367 | - exit ;; | |
| 1537 | + GUESS=$UNAME_MACHINE-unknown-plan9 | |
| 1538 | + ;; | |
| 1368 | 1539 | *:TOPS-10:*:*) |
| 1369 | - echo pdp10-unknown-tops10 | |
| 1370 | - exit ;; | |
| 1540 | + GUESS=pdp10-unknown-tops10 | |
| 1541 | + ;; | |
| 1371 | 1542 | *:TENEX:*:*) |
| 1372 | - echo pdp10-unknown-tenex | |
| 1373 | - exit ;; | |
| 1543 | + GUESS=pdp10-unknown-tenex | |
| 1544 | + ;; | |
| 1374 | 1545 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
| 1375 | - echo pdp10-dec-tops20 | |
| 1376 | - exit ;; | |
| 1546 | + GUESS=pdp10-dec-tops20 | |
| 1547 | + ;; | |
| 1377 | 1548 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
| 1378 | - echo pdp10-xkl-tops20 | |
| 1379 | - exit ;; | |
| 1549 | + GUESS=pdp10-xkl-tops20 | |
| 1550 | + ;; | |
| 1380 | 1551 | *:TOPS-20:*:*) |
| 1381 | - echo pdp10-unknown-tops20 | |
| 1382 | - exit ;; | |
| 1552 | + GUESS=pdp10-unknown-tops20 | |
| 1553 | + ;; | |
| 1383 | 1554 | *:ITS:*:*) |
| 1384 | - echo pdp10-unknown-its | |
| 1385 | - exit ;; | |
| 1555 | + GUESS=pdp10-unknown-its | |
| 1556 | + ;; | |
| 1386 | 1557 | SEI:*:*:SEIUX) |
| 1387 | - echo mips-sei-seiux"$UNAME_RELEASE" | |
| 1388 | - exit ;; | |
| 1558 | + GUESS=mips-sei-seiux$UNAME_RELEASE | |
| 1559 | + ;; | |
| 1389 | 1560 | *:DragonFly:*:*) |
| 1390 | - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" | |
| 1391 | - exit ;; | |
| 1561 | + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` | |
| 1562 | + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL | |
| 1563 | + ;; | |
| 1392 | 1564 | *:*VMS:*:*) |
| 1393 | 1565 | 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 ;; | |
| 1566 | + case $UNAME_MACHINE in | |
| 1567 | + A*) GUESS=alpha-dec-vms ;; | |
| 1568 | + I*) GUESS=ia64-dec-vms ;; | |
| 1569 | + V*) GUESS=vax-dec-vms ;; | |
| 1398 | 1570 | esac ;; |
| 1399 | 1571 | *:XENIX:*:SysV) |
| 1400 | - echo i386-pc-xenix | |
| 1401 | - exit ;; | |
| 1572 | + GUESS=i386-pc-xenix | |
| 1573 | + ;; | |
| 1402 | 1574 | i*86:skyos:*:*) |
| 1403 | - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" | |
| 1404 | - exit ;; | |
| 1575 | + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` | |
| 1576 | + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL | |
| 1577 | + ;; | |
| 1405 | 1578 | i*86:rdos:*:*) |
| 1406 | - echo "$UNAME_MACHINE"-pc-rdos | |
| 1407 | - exit ;; | |
| 1408 | - i*86:AROS:*:*) | |
| 1409 | - echo "$UNAME_MACHINE"-pc-aros | |
| 1410 | - exit ;; | |
| 1579 | + GUESS=$UNAME_MACHINE-pc-rdos | |
| 1580 | + ;; | |
| 1581 | + i*86:Fiwix:*:*) | |
| 1582 | + GUESS=$UNAME_MACHINE-pc-fiwix | |
| 1583 | + ;; | |
| 1584 | + *:AROS:*:*) | |
| 1585 | + GUESS=$UNAME_MACHINE-unknown-aros | |
| 1586 | + ;; | |
| 1411 | 1587 | x86_64:VMkernel:*:*) |
| 1412 | - echo "$UNAME_MACHINE"-unknown-esx | |
| 1413 | - exit ;; | |
| 1588 | + GUESS=$UNAME_MACHINE-unknown-esx | |
| 1589 | + ;; | |
| 1414 | 1590 | amd64:Isilon\ OneFS:*:*) |
| 1415 | - echo x86_64-unknown-onefs | |
| 1416 | - exit ;; | |
| 1591 | + GUESS=x86_64-unknown-onefs | |
| 1592 | + ;; | |
| 1593 | + *:Unleashed:*:*) | |
| 1594 | + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE | |
| 1595 | + ;; | |
| 1417 | 1596 | esac |
| 1418 | 1597 | |
| 1598 | +# Do we have a guess based on uname results? | |
| 1599 | +if test "x$GUESS" != x; then | |
| 1600 | + echo "$GUESS" | |
| 1601 | + exit | |
| 1602 | +fi | |
| 1603 | + | |
| 1604 | +# No uname command or uname output not recognized. | |
| 1605 | +set_cc_for_build | |
| 1606 | +cat > "$dummy.c" <<EOF | |
| 1607 | +#ifdef _SEQUENT_ | |
| 1608 | +#include <sys/types.h> | |
| 1609 | +#include <sys/utsname.h> | |
| 1610 | +#endif | |
| 1611 | +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
| 1612 | +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
| 1613 | +#include <signal.h> | |
| 1614 | +#if defined(_SIZE_T_) || defined(SIGLOST) | |
| 1615 | +#include <sys/utsname.h> | |
| 1616 | +#endif | |
| 1617 | +#endif | |
| 1618 | +#endif | |
| 1619 | +main () | |
| 1620 | +{ | |
| 1621 | +#if defined (sony) | |
| 1622 | +#if defined (MIPSEB) | |
| 1623 | + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | |
| 1624 | + I don't know.... */ | |
| 1625 | + printf ("mips-sony-bsd\n"); exit (0); | |
| 1626 | +#else | |
| 1627 | +#include <sys/param.h> | |
| 1628 | + printf ("m68k-sony-newsos%s\n", | |
| 1629 | +#ifdef NEWSOS4 | |
| 1630 | + "4" | |
| 1631 | +#else | |
| 1632 | + "" | |
| 1633 | +#endif | |
| 1634 | + ); exit (0); | |
| 1635 | +#endif | |
| 1636 | +#endif | |
| 1637 | + | |
| 1638 | +#if defined (NeXT) | |
| 1639 | +#if !defined (__ARCHITECTURE__) | |
| 1640 | +#define __ARCHITECTURE__ "m68k" | |
| 1641 | +#endif | |
| 1642 | + int version; | |
| 1643 | + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | |
| 1644 | + if (version < 4) | |
| 1645 | + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | |
| 1646 | + else | |
| 1647 | + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | |
| 1648 | + exit (0); | |
| 1649 | +#endif | |
| 1650 | + | |
| 1651 | +#if defined (MULTIMAX) || defined (n16) | |
| 1652 | +#if defined (UMAXV) | |
| 1653 | + printf ("ns32k-encore-sysv\n"); exit (0); | |
| 1654 | +#else | |
| 1655 | +#if defined (CMU) | |
| 1656 | + printf ("ns32k-encore-mach\n"); exit (0); | |
| 1657 | +#else | |
| 1658 | + printf ("ns32k-encore-bsd\n"); exit (0); | |
| 1659 | +#endif | |
| 1660 | +#endif | |
| 1661 | +#endif | |
| 1662 | + | |
| 1663 | +#if defined (__386BSD__) | |
| 1664 | + printf ("i386-pc-bsd\n"); exit (0); | |
| 1665 | +#endif | |
| 1666 | + | |
| 1667 | +#if defined (sequent) | |
| 1668 | +#if defined (i386) | |
| 1669 | + printf ("i386-sequent-dynix\n"); exit (0); | |
| 1670 | +#endif | |
| 1671 | +#if defined (ns32000) | |
| 1672 | + printf ("ns32k-sequent-dynix\n"); exit (0); | |
| 1673 | +#endif | |
| 1674 | +#endif | |
| 1675 | + | |
| 1676 | +#if defined (_SEQUENT_) | |
| 1677 | + struct utsname un; | |
| 1678 | + | |
| 1679 | + uname(&un); | |
| 1680 | + if (strncmp(un.version, "V2", 2) == 0) { | |
| 1681 | + printf ("i386-sequent-ptx2\n"); exit (0); | |
| 1682 | + } | |
| 1683 | + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | |
| 1684 | + printf ("i386-sequent-ptx1\n"); exit (0); | |
| 1685 | + } | |
| 1686 | + printf ("i386-sequent-ptx\n"); exit (0); | |
| 1687 | +#endif | |
| 1688 | + | |
| 1689 | +#if defined (vax) | |
| 1690 | +#if !defined (ultrix) | |
| 1691 | +#include <sys/param.h> | |
| 1692 | +#if defined (BSD) | |
| 1693 | +#if BSD == 43 | |
| 1694 | + printf ("vax-dec-bsd4.3\n"); exit (0); | |
| 1695 | +#else | |
| 1696 | +#if BSD == 199006 | |
| 1697 | + printf ("vax-dec-bsd4.3reno\n"); exit (0); | |
| 1698 | +#else | |
| 1699 | + printf ("vax-dec-bsd\n"); exit (0); | |
| 1700 | +#endif | |
| 1701 | +#endif | |
| 1702 | +#else | |
| 1703 | + printf ("vax-dec-bsd\n"); exit (0); | |
| 1704 | +#endif | |
| 1705 | +#else | |
| 1706 | +#if defined(_SIZE_T_) || defined(SIGLOST) | |
| 1707 | + struct utsname un; | |
| 1708 | + uname (&un); | |
| 1709 | + printf ("vax-dec-ultrix%s\n", un.release); exit (0); | |
| 1710 | +#else | |
| 1711 | + printf ("vax-dec-ultrix\n"); exit (0); | |
| 1712 | +#endif | |
| 1713 | +#endif | |
| 1714 | +#endif | |
| 1715 | +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) | |
| 1716 | +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) | |
| 1717 | +#if defined(_SIZE_T_) || defined(SIGLOST) | |
| 1718 | + struct utsname *un; | |
| 1719 | + uname (&un); | |
| 1720 | + printf ("mips-dec-ultrix%s\n", un.release); exit (0); | |
| 1721 | +#else | |
| 1722 | + printf ("mips-dec-ultrix\n"); exit (0); | |
| 1723 | +#endif | |
| 1724 | +#endif | |
| 1725 | +#endif | |
| 1726 | + | |
| 1727 | +#if defined (alliant) && defined (i860) | |
| 1728 | + printf ("i860-alliant-bsd\n"); exit (0); | |
| 1729 | +#endif | |
| 1730 | + | |
| 1731 | + exit (1); | |
| 1732 | +} | |
| 1733 | +EOF | |
| 1734 | + | |
| 1735 | +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && | |
| 1736 | + { echo "$SYSTEM_NAME"; exit; } | |
| 1737 | + | |
| 1738 | +# Apollos put the system type in the environment. | |
| 1739 | +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } | |
| 1740 | + | |
| 1419 | 1741 | echo "$0: unable to guess system type" >&2 |
| 1420 | 1742 | |
| 1421 | -case "$UNAME_MACHINE:$UNAME_SYSTEM" in | |
| 1743 | +case $UNAME_MACHINE:$UNAME_SYSTEM in | |
| 1422 | 1744 | mips:Linux | mips64:Linux) |
| 1423 | 1745 | # If we got here on MIPS GNU/Linux, output extra information. |
| 1424 | 1746 | cat >&2 <<EOF |
| 1425 | 1747 | |
| 1426 | 1748 | NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize |
| @@ -1433,13 +1755,21 @@ | ||
| 1433 | 1755 | |
| 1434 | 1756 | This script (version $timestamp), has failed to recognize the |
| 1435 | 1757 | operating system you are using. If your script is old, overwrite *all* |
| 1436 | 1758 | copies of config.guess and config.sub with the latest versions from: |
| 1437 | 1759 | |
| 1438 | - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess | |
| 1760 | + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess | |
| 1439 | 1761 | and |
| 1440 | - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub | |
| 1762 | + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub | |
| 1763 | +EOF | |
| 1764 | + | |
| 1765 | +our_year=`echo $timestamp | sed 's,-.*,,'` | |
| 1766 | +thisyear=`date +%Y` | |
| 1767 | +# shellcheck disable=SC2003 | |
| 1768 | +script_age=`expr "$thisyear" - "$our_year"` | |
| 1769 | +if test "$script_age" -lt 3 ; then | |
| 1770 | + cat >&2 <<EOF | |
| 1441 | 1771 | |
| 1442 | 1772 | If $0 has already been updated, send the following data and any |
| 1443 | 1773 | information you think might be pertinent to [email protected] to |
| 1444 | 1774 | provide the necessary information to handle your system. |
| 1445 | 1775 | |
| @@ -1463,14 +1793,15 @@ | ||
| 1463 | 1793 | UNAME_MACHINE = "$UNAME_MACHINE" |
| 1464 | 1794 | UNAME_RELEASE = "$UNAME_RELEASE" |
| 1465 | 1795 | UNAME_SYSTEM = "$UNAME_SYSTEM" |
| 1466 | 1796 | UNAME_VERSION = "$UNAME_VERSION" |
| 1467 | 1797 | EOF |
| 1798 | +fi | |
| 1468 | 1799 | |
| 1469 | 1800 | exit 1 |
| 1470 | 1801 | |
| 1471 | 1802 | # Local variables: |
| 1472 | 1803 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1473 | 1804 | # time-stamp-start: "timestamp='" |
| 1474 | 1805 | # time-stamp-format: "%:y-%02m-%02d" |
| 1475 | 1806 | # time-stamp-end: "'" |
| 1476 | 1807 | # End: |
| 1477 | 1808 |
| --- autosetup/autosetup-config.guess | |
| +++ autosetup/autosetup-config.guess | |
| @@ -1,14 +1,16 @@ | |
| 1 | #! /bin/sh |
| 2 | # Attempt to guess a canonical system name. |
| 3 | # Copyright 1992-2018 Free Software Foundation, Inc. |
| 4 | |
| 5 | timestamp='2018-03-08' |
| 6 | |
| 7 | # This file is free software; you can redistribute it and/or modify it |
| 8 | # under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 3 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, but |
| 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -25,21 +27,29 @@ | |
| 25 | # of the GNU General Public License, version 3 ("GPLv3"). |
| 26 | # |
| 27 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
| 28 | # |
| 29 | # 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 |
| 31 | # |
| 32 | # Please send patches to <[email protected]>. |
| 33 | |
| 34 | |
| 35 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 36 | |
| 37 | usage="\ |
| 38 | Usage: $0 [OPTION] |
| 39 | |
| 40 | Output the configuration name of the system \`$me' is run on. |
| 41 | |
| 42 | Options: |
| 43 | -h, --help print this help, then exit |
| 44 | -t, --time-stamp print date of last modification, then exit |
| 45 | -v, --version print version number, then exit |
| @@ -48,17 +58,17 @@ | |
| 48 | |
| 49 | version="\ |
| 50 | GNU config.guess ($timestamp) |
| 51 | |
| 52 | Originally written by Per Bothner. |
| 53 | Copyright 1992-2018 Free Software Foundation, Inc. |
| 54 | |
| 55 | This is free software; see the source for copying conditions. There is NO |
| 56 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 57 | |
| 58 | help=" |
| 59 | Try \`$me --help' for more information." |
| 60 | |
| 61 | # Parse command line |
| 62 | while test $# -gt 0 ; do |
| 63 | case $1 in |
| 64 | --time-stamp | --time* | -t ) |
| @@ -82,89 +92,111 @@ | |
| 82 | if test $# != 0; then |
| 83 | echo "$me: too many arguments$help" >&2 |
| 84 | exit 1 |
| 85 | fi |
| 86 | |
| 87 | trap 'exit 1' 1 2 15 |
| 88 | |
| 89 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
| 90 | # compiler to aid in system detection is discouraged as it requires |
| 91 | # temporary files to be created and, as you can see below, it is a |
| 92 | # headache to deal with in a portable fashion. |
| 93 | |
| 94 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
| 95 | # use `HOST_CC' if defined, but it is deprecated. |
| 96 | |
| 97 | # Portable tmp directory creation inspired by the Autoconf team. |
| 98 | |
| 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= ;' |
| 123 | |
| 124 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
| 125 | # ([email protected] 1994-08-24) |
| 126 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then |
| 127 | PATH=$PATH:/.attbin ; export PATH |
| 128 | fi |
| 129 | |
| 130 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
| 131 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
| 132 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
| 133 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
| 134 | |
| 135 | case "$UNAME_SYSTEM" in |
| 136 | Linux|GNU|GNU/*) |
| 137 | # If the system lacks a compiler, then just pick glibc. |
| 138 | # We could probably try harder. |
| 139 | LIBC=gnu |
| 140 | |
| 141 | eval "$set_cc_for_build" |
| 142 | cat <<-EOF > "$dummy.c" |
| 143 | #include <features.h> |
| 144 | #if defined(__UCLIBC__) |
| 145 | LIBC=uclibc |
| 146 | #elif defined(__dietlibc__) |
| 147 | LIBC=dietlibc |
| 148 | #else |
| 149 | LIBC=gnu |
| 150 | #endif |
| 151 | EOF |
| 152 | eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" |
| 153 | |
| 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 |
| 159 | fi |
| 160 | ;; |
| 161 | esac |
| 162 | |
| 163 | # Note: order is significant - the case branches are not exclusive. |
| 164 | |
| 165 | case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in |
| 166 | *:NetBSD:*:*) |
| 167 | # NetBSD (nbsd) targets should (where applicable) match one or |
| 168 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
| 169 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
| 170 | # switched to ELF, *-*-netbsd* would select the old |
| @@ -172,36 +204,36 @@ | |
| 172 | # compatibility and a consistent mechanism for selecting the |
| 173 | # object file format. |
| 174 | # |
| 175 | # Note: NetBSD doesn't particularly care about the vendor |
| 176 | # portion of the name. We always set it to "unknown". |
| 177 | sysctl="sysctl -n hw.machine_arch" |
| 178 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
| 179 | "/sbin/$sysctl" 2>/dev/null || \ |
| 180 | "/usr/sbin/$sysctl" 2>/dev/null || \ |
| 181 | echo unknown)` |
| 182 | case "$UNAME_MACHINE_ARCH" in |
| 183 | armeb) machine=armeb-unknown ;; |
| 184 | arm*) machine=arm-unknown ;; |
| 185 | sh3el) machine=shl-unknown ;; |
| 186 | sh3eb) machine=sh-unknown ;; |
| 187 | sh5el) machine=sh5le-unknown ;; |
| 188 | earmv*) |
| 189 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
| 190 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
| 191 | machine="${arch}${endian}"-unknown |
| 192 | ;; |
| 193 | *) machine="$UNAME_MACHINE_ARCH"-unknown ;; |
| 194 | esac |
| 195 | # The Operating System including object format, if it has switched |
| 196 | # to ELF recently (or will in the future) and ABI. |
| 197 | case "$UNAME_MACHINE_ARCH" in |
| 198 | earm*) |
| 199 | os=netbsdelf |
| 200 | ;; |
| 201 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
| 202 | eval "$set_cc_for_build" |
| 203 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 204 | | grep -q __ELF__ |
| 205 | then |
| 206 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
| 207 | # Return netbsd for either. FIX? |
| @@ -213,11 +245,11 @@ | |
| 213 | *) |
| 214 | os=netbsd |
| 215 | ;; |
| 216 | esac |
| 217 | # Determine ABI tags. |
| 218 | case "$UNAME_MACHINE_ARCH" in |
| 219 | earm*) |
| 220 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
| 221 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
| 222 | ;; |
| 223 | esac |
| @@ -224,11 +256,11 @@ | |
| 224 | # The OS release |
| 225 | # Debian GNU/NetBSD machines have a different userland, and |
| 226 | # thus, need a distinct triplet. However, they do not need |
| 227 | # kernel version information, so it can be replaced with a |
| 228 | # suitable tag, in the style of linux-gnu. |
| 229 | case "$UNAME_VERSION" in |
| 230 | Debian*) |
| 231 | release='-gnu' |
| 232 | ;; |
| 233 | *) |
| 234 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` |
| @@ -235,49 +267,61 @@ | |
| 235 | ;; |
| 236 | esac |
| 237 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 238 | # contains redundant information, the shorter form: |
| 239 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
| 240 | echo "$machine-${os}${release}${abi}" |
| 241 | exit ;; |
| 242 | *:Bitrig:*:*) |
| 243 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
| 244 | echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" |
| 245 | exit ;; |
| 246 | *:OpenBSD:*:*) |
| 247 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
| 248 | echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" |
| 249 | exit ;; |
| 250 | *:LibertyBSD:*:*) |
| 251 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
| 252 | echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" |
| 253 | exit ;; |
| 254 | *:MidnightBSD:*:*) |
| 255 | echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" |
| 256 | exit ;; |
| 257 | *:ekkoBSD:*:*) |
| 258 | echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" |
| 259 | exit ;; |
| 260 | *:SolidBSD:*:*) |
| 261 | echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" |
| 262 | exit ;; |
| 263 | macppc:MirBSD:*:*) |
| 264 | echo powerpc-unknown-mirbsd"$UNAME_RELEASE" |
| 265 | exit ;; |
| 266 | *:MirBSD:*:*) |
| 267 | echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" |
| 268 | exit ;; |
| 269 | *:Sortix:*:*) |
| 270 | echo "$UNAME_MACHINE"-unknown-sortix |
| 271 | exit ;; |
| 272 | *:Redox:*:*) |
| 273 | echo "$UNAME_MACHINE"-unknown-redox |
| 274 | exit ;; |
| 275 | mips:OSF1:*.*) |
| 276 | echo mips-dec-osf1 |
| 277 | exit ;; |
| 278 | alpha:OSF1:*:*) |
| 279 | case $UNAME_RELEASE in |
| 280 | *4.0) |
| 281 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
| 282 | ;; |
| 283 | *5.*) |
| @@ -287,11 +331,11 @@ | |
| 287 | # According to Compaq, /usr/sbin/psrinfo has been available on |
| 288 | # OSF/1 and Tru64 systems produced since 1995. I hope that |
| 289 | # covers most systems running today. This code pipes the CPU |
| 290 | # types through head -n 1, so we only detect the type of CPU 0. |
| 291 | 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 |
| 293 | "EV4 (21064)") |
| 294 | UNAME_MACHINE=alpha ;; |
| 295 | "EV4.5 (21064)") |
| 296 | UNAME_MACHINE=alpha ;; |
| 297 | "LCA4 (21066/21068)") |
| @@ -324,167 +368,171 @@ | |
| 324 | # A Pn.n version is a patched version. |
| 325 | # A Vn.n version is a released version. |
| 326 | # A Tn.n version is a released field test version. |
| 327 | # A Xn.n version is an unreleased experimental baselevel. |
| 328 | # 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 ;; |
| 334 | Amiga*:UNIX_System_V:4.0:*) |
| 335 | echo m68k-unknown-sysv4 |
| 336 | exit ;; |
| 337 | *:[Aa]miga[Oo][Ss]:*:*) |
| 338 | echo "$UNAME_MACHINE"-unknown-amigaos |
| 339 | exit ;; |
| 340 | *:[Mm]orph[Oo][Ss]:*:*) |
| 341 | echo "$UNAME_MACHINE"-unknown-morphos |
| 342 | exit ;; |
| 343 | *:OS/390:*:*) |
| 344 | echo i370-ibm-openedition |
| 345 | exit ;; |
| 346 | *:z/VM:*:*) |
| 347 | echo s390-ibm-zvmoe |
| 348 | exit ;; |
| 349 | *:OS400:*:*) |
| 350 | echo powerpc-ibm-os400 |
| 351 | exit ;; |
| 352 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 353 | echo arm-acorn-riscix"$UNAME_RELEASE" |
| 354 | exit ;; |
| 355 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
| 356 | echo arm-unknown-riscos |
| 357 | exit ;; |
| 358 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
| 359 | echo hppa1.1-hitachi-hiuxmpp |
| 360 | exit ;; |
| 361 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
| 362 | # [email protected] (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 ;; |
| 369 | NILE*:*:*:dcosx) |
| 370 | echo pyramid-pyramid-svr4 |
| 371 | exit ;; |
| 372 | DRS?6000:unix:4.0:6*) |
| 373 | echo sparc-icl-nx6 |
| 374 | exit ;; |
| 375 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
| 376 | case `/usr/bin/uname -p` in |
| 377 | sparc) echo sparc-icl-nx7; exit ;; |
| 378 | esac ;; |
| 379 | s390x:SunOS:*:*) |
| 380 | echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" |
| 381 | exit ;; |
| 382 | sun4H:SunOS:5.*:*) |
| 383 | echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
| 384 | exit ;; |
| 385 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
| 386 | echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" |
| 387 | exit ;; |
| 388 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
| 389 | echo i386-pc-auroraux"$UNAME_RELEASE" |
| 390 | exit ;; |
| 391 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
| 392 | eval "$set_cc_for_build" |
| 393 | SUN_ARCH=i386 |
| 394 | # If there is a compiler, see if it is configured for 64-bit objects. |
| 395 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
| 396 | # This test works for both compilers. |
| 397 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
| 398 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 399 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
| 400 | grep IS_64BIT_ARCH >/dev/null |
| 401 | then |
| 402 | SUN_ARCH=x86_64 |
| 403 | fi |
| 404 | fi |
| 405 | echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
| 406 | exit ;; |
| 407 | sun4*:SunOS:6*:*) |
| 408 | # According to config.sub, this is the proper way to canonicalize |
| 409 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
| 410 | # it's likely to be more like Solaris than SunOS4. |
| 411 | echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
| 412 | exit ;; |
| 413 | sun4*:SunOS:*:*) |
| 414 | case "`/usr/bin/arch -k`" in |
| 415 | Series*|S4*) |
| 416 | UNAME_RELEASE=`uname -v` |
| 417 | ;; |
| 418 | 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 ;; |
| 422 | sun3*:SunOS:*:*) |
| 423 | echo m68k-sun-sunos"$UNAME_RELEASE" |
| 424 | exit ;; |
| 425 | sun*:*:4.2BSD:*) |
| 426 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
| 427 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
| 428 | case "`/bin/arch`" in |
| 429 | sun3) |
| 430 | echo m68k-sun-sunos"$UNAME_RELEASE" |
| 431 | ;; |
| 432 | sun4) |
| 433 | echo sparc-sun-sunos"$UNAME_RELEASE" |
| 434 | ;; |
| 435 | esac |
| 436 | exit ;; |
| 437 | aushp:SunOS:*:*) |
| 438 | echo sparc-auspex-sunos"$UNAME_RELEASE" |
| 439 | exit ;; |
| 440 | # The situation for MiNT is a little confusing. The machine name |
| 441 | # can be virtually everything (everything which is not |
| 442 | # "atarist" or "atariste" at least should have a processor |
| 443 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
| 444 | # to the lowercase version "mint" (or "freemint"). Finally |
| 445 | # the system name "TOS" denotes a system which is actually not |
| 446 | # MiNT. But MiNT is downward compatible to TOS, so this should |
| 447 | # be no problem. |
| 448 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
| 449 | echo m68k-atari-mint"$UNAME_RELEASE" |
| 450 | exit ;; |
| 451 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
| 452 | echo m68k-atari-mint"$UNAME_RELEASE" |
| 453 | exit ;; |
| 454 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
| 455 | echo m68k-atari-mint"$UNAME_RELEASE" |
| 456 | exit ;; |
| 457 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
| 458 | echo m68k-milan-mint"$UNAME_RELEASE" |
| 459 | exit ;; |
| 460 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
| 461 | echo m68k-hades-mint"$UNAME_RELEASE" |
| 462 | exit ;; |
| 463 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
| 464 | echo m68k-unknown-mint"$UNAME_RELEASE" |
| 465 | exit ;; |
| 466 | m68k:machten:*:*) |
| 467 | echo m68k-apple-machten"$UNAME_RELEASE" |
| 468 | exit ;; |
| 469 | powerpc:machten:*:*) |
| 470 | echo powerpc-apple-machten"$UNAME_RELEASE" |
| 471 | exit ;; |
| 472 | RISC*:Mach:*:*) |
| 473 | echo mips-dec-mach_bsd4.3 |
| 474 | exit ;; |
| 475 | RISC*:ULTRIX:*:*) |
| 476 | echo mips-dec-ultrix"$UNAME_RELEASE" |
| 477 | exit ;; |
| 478 | VAX*:ULTRIX*:*:*) |
| 479 | echo vax-dec-ultrix"$UNAME_RELEASE" |
| 480 | exit ;; |
| 481 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
| 482 | echo clipper-intergraph-clix"$UNAME_RELEASE" |
| 483 | exit ;; |
| 484 | mips:*:*:UMIPS | mips:*:*:RISCos) |
| 485 | eval "$set_cc_for_build" |
| 486 | sed 's/^ //' << EOF > "$dummy.c" |
| 487 | #ifdef __cplusplus |
| 488 | #include <stdio.h> /* for printf() prototype */ |
| 489 | int main (int argc, char *argv[]) { |
| 490 | #else |
| @@ -506,82 +554,83 @@ | |
| 506 | EOF |
| 507 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && |
| 508 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
| 509 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
| 510 | { echo "$SYSTEM_NAME"; exit; } |
| 511 | echo mips-mips-riscos"$UNAME_RELEASE" |
| 512 | exit ;; |
| 513 | Motorola:PowerMAX_OS:*:*) |
| 514 | echo powerpc-motorola-powermax |
| 515 | exit ;; |
| 516 | Motorola:*:4.3:PL8-*) |
| 517 | echo powerpc-harris-powermax |
| 518 | exit ;; |
| 519 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
| 520 | echo powerpc-harris-powermax |
| 521 | exit ;; |
| 522 | Night_Hawk:Power_UNIX:*:*) |
| 523 | echo powerpc-harris-powerunix |
| 524 | exit ;; |
| 525 | m88k:CX/UX:7*:*) |
| 526 | echo m88k-harris-cxux7 |
| 527 | exit ;; |
| 528 | m88k:*:4*:R4*) |
| 529 | echo m88k-motorola-sysv4 |
| 530 | exit ;; |
| 531 | m88k:*:3*:R3*) |
| 532 | echo m88k-motorola-sysv3 |
| 533 | exit ;; |
| 534 | AViiON:dgux:*:*) |
| 535 | # DG/UX returns AViiON for all architectures |
| 536 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 537 | if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] |
| 538 | then |
| 539 | if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ |
| 540 | [ "$TARGET_BINARY_INTERFACE"x = x ] |
| 541 | then |
| 542 | echo m88k-dg-dgux"$UNAME_RELEASE" |
| 543 | else |
| 544 | echo m88k-dg-dguxbcs"$UNAME_RELEASE" |
| 545 | fi |
| 546 | else |
| 547 | echo i586-dg-dgux"$UNAME_RELEASE" |
| 548 | fi |
| 549 | exit ;; |
| 550 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
| 551 | echo m88k-dolphin-sysv3 |
| 552 | exit ;; |
| 553 | M88*:*:R3*:*) |
| 554 | # Delta 88k system running SVR3 |
| 555 | echo m88k-motorola-sysv3 |
| 556 | exit ;; |
| 557 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
| 558 | echo m88k-tektronix-sysv3 |
| 559 | exit ;; |
| 560 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
| 561 | echo m68k-tektronix-bsd |
| 562 | exit ;; |
| 563 | *:IRIX*:*:*) |
| 564 | echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" |
| 565 | exit ;; |
| 566 | ????????: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 ' |
| 569 | i*86:AIX:*:*) |
| 570 | echo i386-ibm-aix |
| 571 | exit ;; |
| 572 | ia64:AIX:*:*) |
| 573 | if [ -x /usr/bin/oslevel ] ; then |
| 574 | IBM_REV=`/usr/bin/oslevel` |
| 575 | else |
| 576 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
| 577 | fi |
| 578 | echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" |
| 579 | exit ;; |
| 580 | *:AIX:2:3) |
| 581 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
| 582 | eval "$set_cc_for_build" |
| 583 | sed 's/^ //' << EOF > "$dummy.c" |
| 584 | #include <sys/systemcfg.h> |
| 585 | |
| 586 | main() |
| 587 | { |
| @@ -591,78 +640,78 @@ | |
| 591 | exit(0); |
| 592 | } |
| 593 | EOF |
| 594 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
| 595 | then |
| 596 | echo "$SYSTEM_NAME" |
| 597 | else |
| 598 | echo rs6000-ibm-aix3.2.5 |
| 599 | fi |
| 600 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
| 601 | echo rs6000-ibm-aix3.2.4 |
| 602 | else |
| 603 | echo rs6000-ibm-aix3.2 |
| 604 | fi |
| 605 | exit ;; |
| 606 | *:AIX:*:[4567]) |
| 607 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
| 608 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
| 609 | IBM_ARCH=rs6000 |
| 610 | else |
| 611 | IBM_ARCH=powerpc |
| 612 | fi |
| 613 | if [ -x /usr/bin/lslpp ] ; then |
| 614 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | |
| 615 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
| 616 | else |
| 617 | IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" |
| 618 | fi |
| 619 | echo "$IBM_ARCH"-ibm-aix"$IBM_REV" |
| 620 | exit ;; |
| 621 | *:AIX:*:*) |
| 622 | echo rs6000-ibm-aix |
| 623 | exit ;; |
| 624 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
| 625 | echo romp-ibm-bsd4.4 |
| 626 | exit ;; |
| 627 | 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 |
| 630 | *:BOSX:*:*) |
| 631 | echo rs6000-bull-bosx |
| 632 | exit ;; |
| 633 | DPX/2?00:B.O.S.:*:*) |
| 634 | echo m68k-bull-sysv3 |
| 635 | exit ;; |
| 636 | 9000/[34]??:4.3bsd:1.*:*) |
| 637 | echo m68k-hp-bsd |
| 638 | exit ;; |
| 639 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
| 640 | echo m68k-hp-bsd4.4 |
| 641 | exit ;; |
| 642 | 9000/[34678]??:HP-UX:*:*) |
| 643 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` |
| 644 | case "$UNAME_MACHINE" in |
| 645 | 9000/31?) HP_ARCH=m68000 ;; |
| 646 | 9000/[34]??) HP_ARCH=m68k ;; |
| 647 | 9000/[678][0-9][0-9]) |
| 648 | if [ -x /usr/bin/getconf ]; then |
| 649 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 650 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 651 | case "$sc_cpu_version" in |
| 652 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
| 653 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
| 654 | 532) # CPU_PA_RISC2_0 |
| 655 | case "$sc_kernel_bits" in |
| 656 | 32) HP_ARCH=hppa2.0n ;; |
| 657 | 64) HP_ARCH=hppa2.0w ;; |
| 658 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
| 659 | esac ;; |
| 660 | esac |
| 661 | fi |
| 662 | if [ "$HP_ARCH" = "" ]; then |
| 663 | eval "$set_cc_for_build" |
| 664 | sed 's/^ //' << EOF > "$dummy.c" |
| 665 | |
| 666 | #define _HPUX_SOURCE |
| 667 | #include <stdlib.h> |
| 668 | #include <unistd.h> |
| @@ -696,13 +745,13 @@ | |
| 696 | EOF |
| 697 | (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` |
| 698 | test -z "$HP_ARCH" && HP_ARCH=hppa |
| 699 | fi ;; |
| 700 | esac |
| 701 | if [ "$HP_ARCH" = hppa2.0w ] |
| 702 | then |
| 703 | eval "$set_cc_for_build" |
| 704 | |
| 705 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
| 706 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
| 707 | # generating 64-bit code. GNU and HP use different nomenclature: |
| 708 | # |
| @@ -717,18 +766,18 @@ | |
| 717 | HP_ARCH=hppa2.0w |
| 718 | else |
| 719 | HP_ARCH=hppa64 |
| 720 | fi |
| 721 | fi |
| 722 | echo "$HP_ARCH"-hp-hpux"$HPUX_REV" |
| 723 | exit ;; |
| 724 | ia64:HP-UX:*:*) |
| 725 | HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` |
| 726 | echo ia64-hp-hpux"$HPUX_REV" |
| 727 | exit ;; |
| 728 | 3050*:HI-UX:*:*) |
| 729 | eval "$set_cc_for_build" |
| 730 | sed 's/^ //' << EOF > "$dummy.c" |
| 731 | #include <unistd.h> |
| 732 | int |
| 733 | main () |
| 734 | { |
| @@ -752,162 +801,215 @@ | |
| 752 | exit (0); |
| 753 | } |
| 754 | EOF |
| 755 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
| 756 | { echo "$SYSTEM_NAME"; exit; } |
| 757 | echo unknown-hitachi-hiuxwe2 |
| 758 | exit ;; |
| 759 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
| 760 | echo hppa1.1-hp-bsd |
| 761 | exit ;; |
| 762 | 9000/8??:4.3bsd:*:*) |
| 763 | echo hppa1.0-hp-bsd |
| 764 | exit ;; |
| 765 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
| 766 | echo hppa1.0-hp-mpeix |
| 767 | exit ;; |
| 768 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
| 769 | echo hppa1.1-hp-osf |
| 770 | exit ;; |
| 771 | hp8??:OSF1:*:*) |
| 772 | echo hppa1.0-hp-osf |
| 773 | exit ;; |
| 774 | i*86:OSF1:*:*) |
| 775 | if [ -x /usr/sbin/sysversion ] ; then |
| 776 | echo "$UNAME_MACHINE"-unknown-osf1mk |
| 777 | else |
| 778 | echo "$UNAME_MACHINE"-unknown-osf1 |
| 779 | fi |
| 780 | exit ;; |
| 781 | parisc*:Lites*:*:*) |
| 782 | echo hppa1.1-hp-lites |
| 783 | exit ;; |
| 784 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
| 785 | echo c1-convex-bsd |
| 786 | exit ;; |
| 787 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
| 788 | if getsysinfo -f scalar_acc |
| 789 | then echo c32-convex-bsd |
| 790 | else echo c2-convex-bsd |
| 791 | fi |
| 792 | exit ;; |
| 793 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
| 794 | echo c34-convex-bsd |
| 795 | exit ;; |
| 796 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
| 797 | echo c38-convex-bsd |
| 798 | exit ;; |
| 799 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
| 800 | echo c4-convex-bsd |
| 801 | exit ;; |
| 802 | CRAY*Y-MP:*:*:*) |
| 803 | echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
| 804 | exit ;; |
| 805 | CRAY*[A-Z]90:*:*:*) |
| 806 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
| 807 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
| 808 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
| 809 | -e 's/\.[^.]*$/.X/' |
| 810 | exit ;; |
| 811 | CRAY*TS:*:*:*) |
| 812 | echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
| 813 | exit ;; |
| 814 | CRAY*T3E:*:*:*) |
| 815 | echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
| 816 | exit ;; |
| 817 | CRAY*SV1:*:*:*) |
| 818 | echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
| 819 | exit ;; |
| 820 | *:UNICOS/mp:*:*) |
| 821 | echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' |
| 822 | exit ;; |
| 823 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
| 824 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
| 825 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 826 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
| 827 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 828 | exit ;; |
| 829 | 5000:UNIX_System_V:4.*:*) |
| 830 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 831 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
| 832 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" |
| 833 | exit ;; |
| 834 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
| 835 | echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" |
| 836 | exit ;; |
| 837 | sparc*:BSD/OS:*:*) |
| 838 | echo sparc-unknown-bsdi"$UNAME_RELEASE" |
| 839 | exit ;; |
| 840 | *:BSD/OS:*:*) |
| 841 | echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" |
| 842 | exit ;; |
| 843 | *:FreeBSD:*:*) |
| 844 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 845 | case "$UNAME_PROCESSOR" in |
| 846 | amd64) |
| 847 | UNAME_PROCESSOR=x86_64 ;; |
| 848 | i386) |
| 849 | UNAME_PROCESSOR=i586 ;; |
| 850 | esac |
| 851 | echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" |
| 852 | exit ;; |
| 853 | i*:CYGWIN*:*) |
| 854 | echo "$UNAME_MACHINE"-pc-cygwin |
| 855 | exit ;; |
| 856 | *:MINGW64*:*) |
| 857 | echo "$UNAME_MACHINE"-pc-mingw64 |
| 858 | exit ;; |
| 859 | *:MINGW*:*) |
| 860 | echo "$UNAME_MACHINE"-pc-mingw32 |
| 861 | exit ;; |
| 862 | *:MSYS*:*) |
| 863 | echo "$UNAME_MACHINE"-pc-msys |
| 864 | exit ;; |
| 865 | i*:PW*:*) |
| 866 | echo "$UNAME_MACHINE"-pc-pw32 |
| 867 | exit ;; |
| 868 | *:Interix*:*) |
| 869 | case "$UNAME_MACHINE" in |
| 870 | x86) |
| 871 | echo i586-pc-interix"$UNAME_RELEASE" |
| 872 | exit ;; |
| 873 | authenticamd | genuineintel | EM64T) |
| 874 | echo x86_64-unknown-interix"$UNAME_RELEASE" |
| 875 | exit ;; |
| 876 | IA64) |
| 877 | echo ia64-unknown-interix"$UNAME_RELEASE" |
| 878 | exit ;; |
| 879 | esac ;; |
| 880 | i*:UWIN*:*) |
| 881 | echo "$UNAME_MACHINE"-pc-uwin |
| 882 | exit ;; |
| 883 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
| 884 | echo x86_64-unknown-cygwin |
| 885 | exit ;; |
| 886 | prep*:SunOS:5.*:*) |
| 887 | echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" |
| 888 | exit ;; |
| 889 | *:GNU:*:*) |
| 890 | # the GNU system |
| 891 | echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" |
| 892 | exit ;; |
| 893 | *:GNU/*:*:*) |
| 894 | # 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 ;; |
| 900 | aarch64:Linux:*:*) |
| 901 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 902 | exit ;; |
| 903 | aarch64_be:Linux:*:*) |
| 904 | UNAME_MACHINE=aarch64_be |
| 905 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 906 | exit ;; |
| 907 | alpha:Linux:*:*) |
| 908 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in |
| 909 | EV5) UNAME_MACHINE=alphaev5 ;; |
| 910 | EV56) UNAME_MACHINE=alphaev56 ;; |
| 911 | PCA56) UNAME_MACHINE=alphapca56 ;; |
| 912 | PCA57) UNAME_MACHINE=alphapca56 ;; |
| 913 | EV6) UNAME_MACHINE=alphaev6 ;; |
| @@ -914,246 +1016,308 @@ | |
| 914 | EV67) UNAME_MACHINE=alphaev67 ;; |
| 915 | EV68*) UNAME_MACHINE=alphaev68 ;; |
| 916 | esac |
| 917 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
| 918 | 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 ;; |
| 924 | arm*:Linux:*:*) |
| 925 | eval "$set_cc_for_build" |
| 926 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 927 | | grep -q __ARM_EABI__ |
| 928 | then |
| 929 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 930 | else |
| 931 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 932 | | grep -q __ARM_PCS_VFP |
| 933 | then |
| 934 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi |
| 935 | else |
| 936 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf |
| 937 | fi |
| 938 | fi |
| 939 | exit ;; |
| 940 | avr32*:Linux:*:*) |
| 941 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 942 | exit ;; |
| 943 | cris:Linux:*:*) |
| 944 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" |
| 945 | exit ;; |
| 946 | crisv32:Linux:*:*) |
| 947 | echo "$UNAME_MACHINE"-axis-linux-"$LIBC" |
| 948 | exit ;; |
| 949 | e2k:Linux:*:*) |
| 950 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 951 | exit ;; |
| 952 | frv:Linux:*:*) |
| 953 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 954 | exit ;; |
| 955 | hexagon:Linux:*:*) |
| 956 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 957 | exit ;; |
| 958 | i*86:Linux:*:*) |
| 959 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" |
| 960 | exit ;; |
| 961 | ia64:Linux:*:*) |
| 962 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 963 | exit ;; |
| 964 | k1om:Linux:*:*) |
| 965 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 966 | exit ;; |
| 967 | m32r*:Linux:*:*) |
| 968 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 969 | exit ;; |
| 970 | m68*:Linux:*:*) |
| 971 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 972 | exit ;; |
| 973 | mips:Linux:*:* | mips64:Linux:*:*) |
| 974 | eval "$set_cc_for_build" |
| 975 | sed 's/^ //' << EOF > "$dummy.c" |
| 976 | #undef CPU |
| 977 | #undef ${UNAME_MACHINE} |
| 978 | #undef ${UNAME_MACHINE}el |
| 979 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
| 980 | CPU=${UNAME_MACHINE}el |
| 981 | #else |
| 982 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
| 983 | CPU=${UNAME_MACHINE} |
| 984 | #else |
| 985 | CPU= |
| 986 | #endif |
| 987 | #endif |
| 988 | 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; } |
| 991 | ;; |
| 992 | mips64el:Linux:*:*) |
| 993 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 994 | exit ;; |
| 995 | openrisc*:Linux:*:*) |
| 996 | echo or1k-unknown-linux-"$LIBC" |
| 997 | exit ;; |
| 998 | or32:Linux:*:* | or1k*:Linux:*:*) |
| 999 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1000 | exit ;; |
| 1001 | padre:Linux:*:*) |
| 1002 | echo sparc-unknown-linux-"$LIBC" |
| 1003 | exit ;; |
| 1004 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
| 1005 | echo hppa64-unknown-linux-"$LIBC" |
| 1006 | exit ;; |
| 1007 | parisc:Linux:*:* | hppa:Linux:*:*) |
| 1008 | # Look for CPU level |
| 1009 | 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" ;; |
| 1013 | esac |
| 1014 | exit ;; |
| 1015 | ppc64:Linux:*:*) |
| 1016 | echo powerpc64-unknown-linux-"$LIBC" |
| 1017 | exit ;; |
| 1018 | ppc:Linux:*:*) |
| 1019 | echo powerpc-unknown-linux-"$LIBC" |
| 1020 | exit ;; |
| 1021 | ppc64le:Linux:*:*) |
| 1022 | echo powerpc64le-unknown-linux-"$LIBC" |
| 1023 | exit ;; |
| 1024 | ppcle:Linux:*:*) |
| 1025 | echo powerpcle-unknown-linux-"$LIBC" |
| 1026 | exit ;; |
| 1027 | riscv32:Linux:*:* | riscv64:Linux:*:*) |
| 1028 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1029 | exit ;; |
| 1030 | s390:Linux:*:* | s390x:Linux:*:*) |
| 1031 | echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" |
| 1032 | exit ;; |
| 1033 | sh64*:Linux:*:*) |
| 1034 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1035 | exit ;; |
| 1036 | sh*:Linux:*:*) |
| 1037 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1038 | exit ;; |
| 1039 | sparc:Linux:*:* | sparc64:Linux:*:*) |
| 1040 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1041 | exit ;; |
| 1042 | tile*:Linux:*:*) |
| 1043 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1044 | exit ;; |
| 1045 | vax:Linux:*:*) |
| 1046 | echo "$UNAME_MACHINE"-dec-linux-"$LIBC" |
| 1047 | exit ;; |
| 1048 | x86_64:Linux:*:*) |
| 1049 | echo "$UNAME_MACHINE"-pc-linux-"$LIBC" |
| 1050 | exit ;; |
| 1051 | xtensa*:Linux:*:*) |
| 1052 | echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" |
| 1053 | exit ;; |
| 1054 | i*86:DYNIX/ptx:4*:*) |
| 1055 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
| 1056 | # earlier versions are messed up and put the nodename in both |
| 1057 | # sysname and nodename. |
| 1058 | echo i386-sequent-sysv4 |
| 1059 | exit ;; |
| 1060 | i*86:UNIX_SV:4.2MP:2.*) |
| 1061 | # Unixware is an offshoot of SVR4, but it has its own version |
| 1062 | # number series starting with 2... |
| 1063 | # I am not positive that other SVR4 systems won't match this, |
| 1064 | # I just have to hope. -- rms. |
| 1065 | # Use sysv4.2uw... so that sysv4* matches it. |
| 1066 | echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" |
| 1067 | exit ;; |
| 1068 | i*86:OS/2:*:*) |
| 1069 | # If we were able to find `uname', then EMX Unix compatibility |
| 1070 | # is probably installed. |
| 1071 | echo "$UNAME_MACHINE"-pc-os2-emx |
| 1072 | exit ;; |
| 1073 | i*86:XTS-300:*:STOP) |
| 1074 | echo "$UNAME_MACHINE"-unknown-stop |
| 1075 | exit ;; |
| 1076 | i*86:atheos:*:*) |
| 1077 | echo "$UNAME_MACHINE"-unknown-atheos |
| 1078 | exit ;; |
| 1079 | i*86:syllable:*:*) |
| 1080 | echo "$UNAME_MACHINE"-pc-syllable |
| 1081 | exit ;; |
| 1082 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
| 1083 | echo i386-unknown-lynxos"$UNAME_RELEASE" |
| 1084 | exit ;; |
| 1085 | i*86:*DOS:*:*) |
| 1086 | echo "$UNAME_MACHINE"-pc-msdosdjgpp |
| 1087 | exit ;; |
| 1088 | i*86:*:4.*:*) |
| 1089 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
| 1090 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
| 1091 | echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" |
| 1092 | else |
| 1093 | echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" |
| 1094 | fi |
| 1095 | exit ;; |
| 1096 | i*86:*:5:[678]*) |
| 1097 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
| 1098 | case `/bin/uname -X | grep "^Machine"` in |
| 1099 | *486*) UNAME_MACHINE=i486 ;; |
| 1100 | *Pentium) UNAME_MACHINE=i586 ;; |
| 1101 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
| 1102 | esac |
| 1103 | echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" |
| 1104 | exit ;; |
| 1105 | i*86:*:3.2:*) |
| 1106 | if test -f /usr/options/cb.name; then |
| 1107 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
| 1108 | echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" |
| 1109 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
| 1110 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
| 1111 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
| 1112 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
| 1113 | && UNAME_MACHINE=i586 |
| 1114 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
| 1115 | && UNAME_MACHINE=i686 |
| 1116 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
| 1117 | && UNAME_MACHINE=i686 |
| 1118 | echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" |
| 1119 | else |
| 1120 | echo "$UNAME_MACHINE"-pc-sysv32 |
| 1121 | fi |
| 1122 | exit ;; |
| 1123 | pc:*:*:*) |
| 1124 | # Left here for compatibility: |
| 1125 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
| 1126 | # the processor, so we play safe by assuming i586. |
| 1127 | # Note: whatever this is, it MUST be the same as what config.sub |
| 1128 | # prints for the "djgpp" host, or else GDB configure will decide that |
| 1129 | # this is a cross-build. |
| 1130 | echo i586-pc-msdosdjgpp |
| 1131 | exit ;; |
| 1132 | Intel:Mach:3*:*) |
| 1133 | echo i386-pc-mach3 |
| 1134 | exit ;; |
| 1135 | paragon:*:*:*) |
| 1136 | echo i860-intel-osf1 |
| 1137 | exit ;; |
| 1138 | i860:*:4.*:*) # i860-SVR4 |
| 1139 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
| 1140 | echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 |
| 1141 | else # Add other i860-SVR4 vendors below as they are discovered. |
| 1142 | echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 |
| 1143 | fi |
| 1144 | exit ;; |
| 1145 | mini*:CTIX:SYS*5:*) |
| 1146 | # "miniframe" |
| 1147 | echo m68010-convergent-sysv |
| 1148 | exit ;; |
| 1149 | mc68k:UNIX:SYSTEM5:3.51m) |
| 1150 | echo m68k-convergent-sysv |
| 1151 | exit ;; |
| 1152 | M680?0:D-NIX:5.3:*) |
| 1153 | echo m68k-diab-dnix |
| 1154 | exit ;; |
| 1155 | M68*:*:R3V[5678]*:*) |
| 1156 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
| 1157 | 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) |
| 1158 | OS_REL='' |
| 1159 | test -r /etc/.relid \ |
| @@ -1174,253 +1338,411 @@ | |
| 1174 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
| 1175 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } |
| 1176 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
| 1177 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
| 1178 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
| 1179 | echo m68k-unknown-lynxos"$UNAME_RELEASE" |
| 1180 | exit ;; |
| 1181 | mc68030:UNIX_System_V:4.*:*) |
| 1182 | echo m68k-atari-sysv4 |
| 1183 | exit ;; |
| 1184 | TSUNAMI:LynxOS:2.*:*) |
| 1185 | echo sparc-unknown-lynxos"$UNAME_RELEASE" |
| 1186 | exit ;; |
| 1187 | rs6000:LynxOS:2.*:*) |
| 1188 | echo rs6000-unknown-lynxos"$UNAME_RELEASE" |
| 1189 | exit ;; |
| 1190 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
| 1191 | echo powerpc-unknown-lynxos"$UNAME_RELEASE" |
| 1192 | exit ;; |
| 1193 | SM[BE]S:UNIX_SV:*:*) |
| 1194 | echo mips-dde-sysv"$UNAME_RELEASE" |
| 1195 | exit ;; |
| 1196 | RM*:ReliantUNIX-*:*:*) |
| 1197 | echo mips-sni-sysv4 |
| 1198 | exit ;; |
| 1199 | RM*:SINIX-*:*:*) |
| 1200 | echo mips-sni-sysv4 |
| 1201 | exit ;; |
| 1202 | *:SINIX-*:*:*) |
| 1203 | if uname -p 2>/dev/null >/dev/null ; then |
| 1204 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1205 | echo "$UNAME_MACHINE"-sni-sysv4 |
| 1206 | else |
| 1207 | echo ns32k-sni-sysv |
| 1208 | fi |
| 1209 | exit ;; |
| 1210 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort |
| 1211 | # says <[email protected]> |
| 1212 | echo i586-unisys-sysv4 |
| 1213 | exit ;; |
| 1214 | *:UNIX_System_V:4*:FTX*) |
| 1215 | # From Gerald Hewes <[email protected]>. |
| 1216 | # How about differentiating between stratus architectures? -djm |
| 1217 | echo hppa1.1-stratus-sysv4 |
| 1218 | exit ;; |
| 1219 | *:*:*:FTX*) |
| 1220 | # From [email protected]. |
| 1221 | echo i860-stratus-sysv4 |
| 1222 | exit ;; |
| 1223 | i*86:VOS:*:*) |
| 1224 | # From [email protected]. |
| 1225 | echo "$UNAME_MACHINE"-stratus-vos |
| 1226 | exit ;; |
| 1227 | *:VOS:*:*) |
| 1228 | # From [email protected]. |
| 1229 | echo hppa1.1-stratus-vos |
| 1230 | exit ;; |
| 1231 | mc68*:A/UX:*:*) |
| 1232 | echo m68k-apple-aux"$UNAME_RELEASE" |
| 1233 | exit ;; |
| 1234 | news*:NEWS-OS:6*:*) |
| 1235 | echo mips-sony-newsos6 |
| 1236 | exit ;; |
| 1237 | 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" |
| 1240 | else |
| 1241 | echo mips-unknown-sysv"$UNAME_RELEASE" |
| 1242 | fi |
| 1243 | exit ;; |
| 1244 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
| 1245 | echo powerpc-be-beos |
| 1246 | exit ;; |
| 1247 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
| 1248 | echo powerpc-apple-beos |
| 1249 | exit ;; |
| 1250 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
| 1251 | echo i586-pc-beos |
| 1252 | exit ;; |
| 1253 | 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 ;; |
| 1259 | SX-4:SUPER-UX:*:*) |
| 1260 | echo sx4-nec-superux"$UNAME_RELEASE" |
| 1261 | exit ;; |
| 1262 | SX-5:SUPER-UX:*:*) |
| 1263 | echo sx5-nec-superux"$UNAME_RELEASE" |
| 1264 | exit ;; |
| 1265 | SX-6:SUPER-UX:*:*) |
| 1266 | echo sx6-nec-superux"$UNAME_RELEASE" |
| 1267 | exit ;; |
| 1268 | SX-7:SUPER-UX:*:*) |
| 1269 | echo sx7-nec-superux"$UNAME_RELEASE" |
| 1270 | exit ;; |
| 1271 | SX-8:SUPER-UX:*:*) |
| 1272 | echo sx8-nec-superux"$UNAME_RELEASE" |
| 1273 | exit ;; |
| 1274 | SX-8R:SUPER-UX:*:*) |
| 1275 | echo sx8r-nec-superux"$UNAME_RELEASE" |
| 1276 | exit ;; |
| 1277 | SX-ACE:SUPER-UX:*:*) |
| 1278 | echo sxace-nec-superux"$UNAME_RELEASE" |
| 1279 | exit ;; |
| 1280 | Power*:Rhapsody:*:*) |
| 1281 | echo powerpc-apple-rhapsody"$UNAME_RELEASE" |
| 1282 | exit ;; |
| 1283 | *:Rhapsody:*:*) |
| 1284 | echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" |
| 1285 | exit ;; |
| 1286 | *: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 |
| 1291 | 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 |
| 1310 | fi |
| 1311 | 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 |
| 1319 | fi |
| 1320 | echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" |
| 1321 | exit ;; |
| 1322 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
| 1323 | UNAME_PROCESSOR=`uname -p` |
| 1324 | if test "$UNAME_PROCESSOR" = x86; then |
| 1325 | UNAME_PROCESSOR=i386 |
| 1326 | UNAME_MACHINE=pc |
| 1327 | fi |
| 1328 | echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" |
| 1329 | exit ;; |
| 1330 | *:QNX:*:4*) |
| 1331 | echo i386-pc-qnx |
| 1332 | exit ;; |
| 1333 | NEO-*:NONSTOP_KERNEL:*:*) |
| 1334 | echo neo-tandem-nsk"$UNAME_RELEASE" |
| 1335 | exit ;; |
| 1336 | NSE-*:NONSTOP_KERNEL:*:*) |
| 1337 | echo nse-tandem-nsk"$UNAME_RELEASE" |
| 1338 | exit ;; |
| 1339 | NSR-*:NONSTOP_KERNEL:*:*) |
| 1340 | echo nsr-tandem-nsk"$UNAME_RELEASE" |
| 1341 | exit ;; |
| 1342 | NSV-*:NONSTOP_KERNEL:*:*) |
| 1343 | echo nsv-tandem-nsk"$UNAME_RELEASE" |
| 1344 | exit ;; |
| 1345 | NSX-*:NONSTOP_KERNEL:*:*) |
| 1346 | echo nsx-tandem-nsk"$UNAME_RELEASE" |
| 1347 | exit ;; |
| 1348 | *:NonStop-UX:*:*) |
| 1349 | echo mips-compaq-nonstopux |
| 1350 | exit ;; |
| 1351 | BS2000:POSIX*:*:*) |
| 1352 | echo bs2000-siemens-sysv |
| 1353 | exit ;; |
| 1354 | DS/*:UNIX_System_V:*:*) |
| 1355 | echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" |
| 1356 | exit ;; |
| 1357 | *:Plan9:*:*) |
| 1358 | # "uname -m" is not consistent, so use $cputype instead. 386 |
| 1359 | # is converted to i386 for consistency with other x86 |
| 1360 | # operating systems. |
| 1361 | if test "$cputype" = 386; then |
| 1362 | UNAME_MACHINE=i386 |
| 1363 | else |
| 1364 | UNAME_MACHINE="$cputype" |
| 1365 | fi |
| 1366 | echo "$UNAME_MACHINE"-unknown-plan9 |
| 1367 | exit ;; |
| 1368 | *:TOPS-10:*:*) |
| 1369 | echo pdp10-unknown-tops10 |
| 1370 | exit ;; |
| 1371 | *:TENEX:*:*) |
| 1372 | echo pdp10-unknown-tenex |
| 1373 | exit ;; |
| 1374 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
| 1375 | echo pdp10-dec-tops20 |
| 1376 | exit ;; |
| 1377 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
| 1378 | echo pdp10-xkl-tops20 |
| 1379 | exit ;; |
| 1380 | *:TOPS-20:*:*) |
| 1381 | echo pdp10-unknown-tops20 |
| 1382 | exit ;; |
| 1383 | *:ITS:*:*) |
| 1384 | echo pdp10-unknown-its |
| 1385 | exit ;; |
| 1386 | SEI:*:*:SEIUX) |
| 1387 | echo mips-sei-seiux"$UNAME_RELEASE" |
| 1388 | exit ;; |
| 1389 | *:DragonFly:*:*) |
| 1390 | echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" |
| 1391 | exit ;; |
| 1392 | *:*VMS:*:*) |
| 1393 | 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 ;; |
| 1398 | esac ;; |
| 1399 | *:XENIX:*:SysV) |
| 1400 | echo i386-pc-xenix |
| 1401 | exit ;; |
| 1402 | i*86:skyos:*:*) |
| 1403 | echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" |
| 1404 | exit ;; |
| 1405 | i*86:rdos:*:*) |
| 1406 | echo "$UNAME_MACHINE"-pc-rdos |
| 1407 | exit ;; |
| 1408 | i*86:AROS:*:*) |
| 1409 | echo "$UNAME_MACHINE"-pc-aros |
| 1410 | exit ;; |
| 1411 | x86_64:VMkernel:*:*) |
| 1412 | echo "$UNAME_MACHINE"-unknown-esx |
| 1413 | exit ;; |
| 1414 | amd64:Isilon\ OneFS:*:*) |
| 1415 | echo x86_64-unknown-onefs |
| 1416 | exit ;; |
| 1417 | esac |
| 1418 | |
| 1419 | echo "$0: unable to guess system type" >&2 |
| 1420 | |
| 1421 | case "$UNAME_MACHINE:$UNAME_SYSTEM" in |
| 1422 | mips:Linux | mips64:Linux) |
| 1423 | # If we got here on MIPS GNU/Linux, output extra information. |
| 1424 | cat >&2 <<EOF |
| 1425 | |
| 1426 | NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize |
| @@ -1433,13 +1755,21 @@ | |
| 1433 | |
| 1434 | This script (version $timestamp), has failed to recognize the |
| 1435 | operating system you are using. If your script is old, overwrite *all* |
| 1436 | copies of config.guess and config.sub with the latest versions from: |
| 1437 | |
| 1438 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess |
| 1439 | and |
| 1440 | https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub |
| 1441 | |
| 1442 | If $0 has already been updated, send the following data and any |
| 1443 | information you think might be pertinent to [email protected] to |
| 1444 | provide the necessary information to handle your system. |
| 1445 | |
| @@ -1463,14 +1793,15 @@ | |
| 1463 | UNAME_MACHINE = "$UNAME_MACHINE" |
| 1464 | UNAME_RELEASE = "$UNAME_RELEASE" |
| 1465 | UNAME_SYSTEM = "$UNAME_SYSTEM" |
| 1466 | UNAME_VERSION = "$UNAME_VERSION" |
| 1467 | EOF |
| 1468 | |
| 1469 | exit 1 |
| 1470 | |
| 1471 | # Local variables: |
| 1472 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1473 | # time-stamp-start: "timestamp='" |
| 1474 | # time-stamp-format: "%:y-%02m-%02d" |
| 1475 | # time-stamp-end: "'" |
| 1476 | # End: |
| 1477 |
| --- autosetup/autosetup-config.guess | |
| +++ autosetup/autosetup-config.guess | |
| @@ -1,14 +1,16 @@ | |
| 1 | #! /bin/sh |
| 2 | # Attempt to guess a canonical system name. |
| 3 | # Copyright 1992-2023 Free Software Foundation, Inc. |
| 4 | |
| 5 | # shellcheck disable=SC2006,SC2268 # see below for rationale |
| 6 | |
| 7 | timestamp='2023-08-22' |
| 8 | |
| 9 | # This file is free software; you can redistribute it and/or modify it |
| 10 | # under the terms of the GNU General Public License as published by |
| 11 | # the Free Software Foundation, either version 3 of the License, or |
| 12 | # (at your option) any later version. |
| 13 | # |
| 14 | # This program is distributed in the hope that it will be useful, but |
| 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -25,21 +27,29 @@ | |
| 27 | # of the GNU General Public License, version 3 ("GPLv3"). |
| 28 | # |
| 29 | # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
| 30 | # |
| 31 | # You can get the latest version of this script from: |
| 32 | # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
| 33 | # |
| 34 | # Please send patches to <[email protected]>. |
| 35 | |
| 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 | |
| 45 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 46 | |
| 47 | usage="\ |
| 48 | Usage: $0 [OPTION] |
| 49 | |
| 50 | Output the configuration name of the system '$me' is run on. |
| 51 | |
| 52 | Options: |
| 53 | -h, --help print this help, then exit |
| 54 | -t, --time-stamp print date of last modification, then exit |
| 55 | -v, --version print version number, then exit |
| @@ -48,17 +58,17 @@ | |
| 58 | |
| 59 | version="\ |
| 60 | GNU config.guess ($timestamp) |
| 61 | |
| 62 | Originally written by Per Bothner. |
| 63 | Copyright 1992-2023 Free Software Foundation, Inc. |
| 64 | |
| 65 | This is free software; see the source for copying conditions. There is NO |
| 66 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 67 | |
| 68 | help=" |
| 69 | Try '$me --help' for more information." |
| 70 | |
| 71 | # Parse command line |
| 72 | while test $# -gt 0 ; do |
| 73 | case $1 in |
| 74 | --time-stamp | --time* | -t ) |
| @@ -82,89 +92,111 @@ | |
| 92 | if test $# != 0; then |
| 93 | echo "$me: too many arguments$help" >&2 |
| 94 | exit 1 |
| 95 | fi |
| 96 | |
| 97 | # Just in case it came from the environment. |
| 98 | GUESS= |
| 99 | |
| 100 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a |
| 101 | # compiler to aid in system detection is discouraged as it requires |
| 102 | # temporary files to be created and, as you can see below, it is a |
| 103 | # headache to deal with in a portable fashion. |
| 104 | |
| 105 | # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still |
| 106 | # use 'HOST_CC' if defined, but it is deprecated. |
| 107 | |
| 108 | # Portable tmp directory creation inspired by the Autoconf team. |
| 109 | |
| 110 | tmp= |
| 111 | # shellcheck disable=SC2172 |
| 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 c89 c99 ; do |
| 127 | if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then |
| 128 | CC_FOR_BUILD=$driver |
| 129 | break |
| 130 | fi |
| 131 | done |
| 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 | } |
| 140 | |
| 141 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
| 142 | # ([email protected] 1994-08-24) |
| 143 | if test -f /.attbin/uname ; then |
| 144 | PATH=$PATH:/.attbin ; export PATH |
| 145 | fi |
| 146 | |
| 147 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown |
| 148 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
| 149 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
| 150 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown |
| 151 | |
| 152 | case $UNAME_SYSTEM in |
| 153 | Linux|GNU|GNU/*) |
| 154 | LIBC=unknown |
| 155 | |
| 156 | set_cc_for_build |
| 157 | cat <<-EOF > "$dummy.c" |
| 158 | #if defined(__ANDROID__) |
| 159 | LIBC=android |
| 160 | #else |
| 161 | #include <features.h> |
| 162 | #if defined(__UCLIBC__) |
| 163 | LIBC=uclibc |
| 164 | #elif defined(__dietlibc__) |
| 165 | LIBC=dietlibc |
| 166 | #elif defined(__GLIBC__) |
| 167 | LIBC=gnu |
| 168 | #else |
| 169 | #include <stdarg.h> |
| 170 | /* First heuristic to detect musl libc. */ |
| 171 | #ifdef __DEFINED_va_list |
| 172 | LIBC=musl |
| 173 | #endif |
| 174 | #endif |
| 175 | #endif |
| 176 | EOF |
| 177 | cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
| 178 | eval "$cc_set_libc" |
| 179 | |
| 180 | # Second heuristic to detect musl libc. |
| 181 | if [ "$LIBC" = unknown ] && |
| 182 | command -v ldd >/dev/null && |
| 183 | ldd --version 2>&1 | grep -q ^musl; then |
| 184 | LIBC=musl |
| 185 | fi |
| 186 | |
| 187 | # If the system lacks a compiler, then just pick glibc. |
| 188 | # We could probably try harder. |
| 189 | if [ "$LIBC" = unknown ]; then |
| 190 | LIBC=gnu |
| 191 | fi |
| 192 | ;; |
| 193 | esac |
| 194 | |
| 195 | # Note: order is significant - the case branches are not exclusive. |
| 196 | |
| 197 | case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in |
| 198 | *:NetBSD:*:*) |
| 199 | # NetBSD (nbsd) targets should (where applicable) match one or |
| 200 | # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, |
| 201 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently |
| 202 | # switched to ELF, *-*-netbsd* would select the old |
| @@ -172,36 +204,36 @@ | |
| 204 | # compatibility and a consistent mechanism for selecting the |
| 205 | # object file format. |
| 206 | # |
| 207 | # Note: NetBSD doesn't particularly care about the vendor |
| 208 | # portion of the name. We always set it to "unknown". |
| 209 | UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ |
| 210 | /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
| 211 | /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ |
| 212 | echo unknown)` |
| 213 | case $UNAME_MACHINE_ARCH in |
| 214 | aarch64eb) machine=aarch64_be-unknown ;; |
| 215 | armeb) machine=armeb-unknown ;; |
| 216 | arm*) machine=arm-unknown ;; |
| 217 | sh3el) machine=shl-unknown ;; |
| 218 | sh3eb) machine=sh-unknown ;; |
| 219 | sh5el) machine=sh5le-unknown ;; |
| 220 | earmv*) |
| 221 | arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` |
| 222 | endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` |
| 223 | machine=${arch}${endian}-unknown |
| 224 | ;; |
| 225 | *) machine=$UNAME_MACHINE_ARCH-unknown ;; |
| 226 | esac |
| 227 | # The Operating System including object format, if it has switched |
| 228 | # to ELF recently (or will in the future) and ABI. |
| 229 | case $UNAME_MACHINE_ARCH in |
| 230 | earm*) |
| 231 | os=netbsdelf |
| 232 | ;; |
| 233 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
| 234 | set_cc_for_build |
| 235 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 236 | | grep -q __ELF__ |
| 237 | then |
| 238 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). |
| 239 | # Return netbsd for either. FIX? |
| @@ -213,11 +245,11 @@ | |
| 245 | *) |
| 246 | os=netbsd |
| 247 | ;; |
| 248 | esac |
| 249 | # Determine ABI tags. |
| 250 | case $UNAME_MACHINE_ARCH in |
| 251 | earm*) |
| 252 | expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
| 253 | abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` |
| 254 | ;; |
| 255 | esac |
| @@ -224,11 +256,11 @@ | |
| 256 | # The OS release |
| 257 | # Debian GNU/NetBSD machines have a different userland, and |
| 258 | # thus, need a distinct triplet. However, they do not need |
| 259 | # kernel version information, so it can be replaced with a |
| 260 | # suitable tag, in the style of linux-gnu. |
| 261 | case $UNAME_VERSION in |
| 262 | Debian*) |
| 263 | release='-gnu' |
| 264 | ;; |
| 265 | *) |
| 266 | release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` |
| @@ -235,49 +267,61 @@ | |
| 267 | ;; |
| 268 | esac |
| 269 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 270 | # contains redundant information, the shorter form: |
| 271 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
| 272 | GUESS=$machine-${os}${release}${abi-} |
| 273 | ;; |
| 274 | *:Bitrig:*:*) |
| 275 | UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` |
| 276 | GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE |
| 277 | ;; |
| 278 | *:OpenBSD:*:*) |
| 279 | UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` |
| 280 | GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE |
| 281 | ;; |
| 282 | *:SecBSD:*:*) |
| 283 | UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` |
| 284 | GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE |
| 285 | ;; |
| 286 | *:LibertyBSD:*:*) |
| 287 | UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` |
| 288 | GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE |
| 289 | ;; |
| 290 | *:MidnightBSD:*:*) |
| 291 | GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE |
| 292 | ;; |
| 293 | *:ekkoBSD:*:*) |
| 294 | GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE |
| 295 | ;; |
| 296 | *:SolidBSD:*:*) |
| 297 | GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE |
| 298 | ;; |
| 299 | *:OS108:*:*) |
| 300 | GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE |
| 301 | ;; |
| 302 | macppc:MirBSD:*:*) |
| 303 | GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE |
| 304 | ;; |
| 305 | *:MirBSD:*:*) |
| 306 | GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE |
| 307 | ;; |
| 308 | *:Sortix:*:*) |
| 309 | GUESS=$UNAME_MACHINE-unknown-sortix |
| 310 | ;; |
| 311 | *:Twizzler:*:*) |
| 312 | GUESS=$UNAME_MACHINE-unknown-twizzler |
| 313 | ;; |
| 314 | *:Redox:*:*) |
| 315 | GUESS=$UNAME_MACHINE-unknown-redox |
| 316 | ;; |
| 317 | mips:OSF1:*.*) |
| 318 | GUESS=mips-dec-osf1 |
| 319 | ;; |
| 320 | alpha:OSF1:*:*) |
| 321 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. |
| 322 | trap '' 0 |
| 323 | case $UNAME_RELEASE in |
| 324 | *4.0) |
| 325 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
| 326 | ;; |
| 327 | *5.*) |
| @@ -287,11 +331,11 @@ | |
| 331 | # According to Compaq, /usr/sbin/psrinfo has been available on |
| 332 | # OSF/1 and Tru64 systems produced since 1995. I hope that |
| 333 | # covers most systems running today. This code pipes the CPU |
| 334 | # types through head -n 1, so we only detect the type of CPU 0. |
| 335 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` |
| 336 | case $ALPHA_CPU_TYPE in |
| 337 | "EV4 (21064)") |
| 338 | UNAME_MACHINE=alpha ;; |
| 339 | "EV4.5 (21064)") |
| 340 | UNAME_MACHINE=alpha ;; |
| 341 | "LCA4 (21066/21068)") |
| @@ -324,167 +368,171 @@ | |
| 368 | # A Pn.n version is a patched version. |
| 369 | # A Vn.n version is a released version. |
| 370 | # A Tn.n version is a released field test version. |
| 371 | # A Xn.n version is an unreleased experimental baselevel. |
| 372 | # 1.2 uses "1.2" for uname -r. |
| 373 | OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
| 374 | GUESS=$UNAME_MACHINE-dec-osf$OSF_REL |
| 375 | ;; |
| 376 | Amiga*:UNIX_System_V:4.0:*) |
| 377 | GUESS=m68k-unknown-sysv4 |
| 378 | ;; |
| 379 | *:[Aa]miga[Oo][Ss]:*:*) |
| 380 | GUESS=$UNAME_MACHINE-unknown-amigaos |
| 381 | ;; |
| 382 | *:[Mm]orph[Oo][Ss]:*:*) |
| 383 | GUESS=$UNAME_MACHINE-unknown-morphos |
| 384 | ;; |
| 385 | *:OS/390:*:*) |
| 386 | GUESS=i370-ibm-openedition |
| 387 | ;; |
| 388 | *:z/VM:*:*) |
| 389 | GUESS=s390-ibm-zvmoe |
| 390 | ;; |
| 391 | *:OS400:*:*) |
| 392 | GUESS=powerpc-ibm-os400 |
| 393 | ;; |
| 394 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 395 | GUESS=arm-acorn-riscix$UNAME_RELEASE |
| 396 | ;; |
| 397 | arm*:riscos:*:*|arm*:RISCOS:*:*) |
| 398 | GUESS=arm-unknown-riscos |
| 399 | ;; |
| 400 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) |
| 401 | GUESS=hppa1.1-hitachi-hiuxmpp |
| 402 | ;; |
| 403 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) |
| 404 | # [email protected] (Earle F. Ake) contributed MIS and NILE. |
| 405 | case `(/bin/universe) 2>/dev/null` in |
| 406 | att) GUESS=pyramid-pyramid-sysv3 ;; |
| 407 | *) GUESS=pyramid-pyramid-bsd ;; |
| 408 | esac |
| 409 | ;; |
| 410 | NILE*:*:*:dcosx) |
| 411 | GUESS=pyramid-pyramid-svr4 |
| 412 | ;; |
| 413 | DRS?6000:unix:4.0:6*) |
| 414 | GUESS=sparc-icl-nx6 |
| 415 | ;; |
| 416 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
| 417 | case `/usr/bin/uname -p` in |
| 418 | sparc) GUESS=sparc-icl-nx7 ;; |
| 419 | esac |
| 420 | ;; |
| 421 | s390x:SunOS:*:*) |
| 422 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
| 423 | GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL |
| 424 | ;; |
| 425 | sun4H:SunOS:5.*:*) |
| 426 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
| 427 | GUESS=sparc-hal-solaris2$SUN_REL |
| 428 | ;; |
| 429 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
| 430 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
| 431 | GUESS=sparc-sun-solaris2$SUN_REL |
| 432 | ;; |
| 433 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) |
| 434 | GUESS=i386-pc-auroraux$UNAME_RELEASE |
| 435 | ;; |
| 436 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
| 437 | set_cc_for_build |
| 438 | SUN_ARCH=i386 |
| 439 | # If there is a compiler, see if it is configured for 64-bit objects. |
| 440 | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. |
| 441 | # This test works for both compilers. |
| 442 | if test "$CC_FOR_BUILD" != no_compiler_found; then |
| 443 | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 444 | (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ |
| 445 | grep IS_64BIT_ARCH >/dev/null |
| 446 | then |
| 447 | SUN_ARCH=x86_64 |
| 448 | fi |
| 449 | fi |
| 450 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
| 451 | GUESS=$SUN_ARCH-pc-solaris2$SUN_REL |
| 452 | ;; |
| 453 | sun4*:SunOS:6*:*) |
| 454 | # According to config.sub, this is the proper way to canonicalize |
| 455 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but |
| 456 | # it's likely to be more like Solaris than SunOS4. |
| 457 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
| 458 | GUESS=sparc-sun-solaris3$SUN_REL |
| 459 | ;; |
| 460 | sun4*:SunOS:*:*) |
| 461 | case `/usr/bin/arch -k` in |
| 462 | Series*|S4*) |
| 463 | UNAME_RELEASE=`uname -v` |
| 464 | ;; |
| 465 | esac |
| 466 | # Japanese Language versions have a version number like '4.1.3-JL'. |
| 467 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` |
| 468 | GUESS=sparc-sun-sunos$SUN_REL |
| 469 | ;; |
| 470 | sun3*:SunOS:*:*) |
| 471 | GUESS=m68k-sun-sunos$UNAME_RELEASE |
| 472 | ;; |
| 473 | sun*:*:4.2BSD:*) |
| 474 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` |
| 475 | test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 |
| 476 | case `/bin/arch` in |
| 477 | sun3) |
| 478 | GUESS=m68k-sun-sunos$UNAME_RELEASE |
| 479 | ;; |
| 480 | sun4) |
| 481 | GUESS=sparc-sun-sunos$UNAME_RELEASE |
| 482 | ;; |
| 483 | esac |
| 484 | ;; |
| 485 | aushp:SunOS:*:*) |
| 486 | GUESS=sparc-auspex-sunos$UNAME_RELEASE |
| 487 | ;; |
| 488 | # The situation for MiNT is a little confusing. The machine name |
| 489 | # can be virtually everything (everything which is not |
| 490 | # "atarist" or "atariste" at least should have a processor |
| 491 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" |
| 492 | # to the lowercase version "mint" (or "freemint"). Finally |
| 493 | # the system name "TOS" denotes a system which is actually not |
| 494 | # MiNT. But MiNT is downward compatible to TOS, so this should |
| 495 | # be no problem. |
| 496 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
| 497 | GUESS=m68k-atari-mint$UNAME_RELEASE |
| 498 | ;; |
| 499 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
| 500 | GUESS=m68k-atari-mint$UNAME_RELEASE |
| 501 | ;; |
| 502 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
| 503 | GUESS=m68k-atari-mint$UNAME_RELEASE |
| 504 | ;; |
| 505 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
| 506 | GUESS=m68k-milan-mint$UNAME_RELEASE |
| 507 | ;; |
| 508 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
| 509 | GUESS=m68k-hades-mint$UNAME_RELEASE |
| 510 | ;; |
| 511 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
| 512 | GUESS=m68k-unknown-mint$UNAME_RELEASE |
| 513 | ;; |
| 514 | m68k:machten:*:*) |
| 515 | GUESS=m68k-apple-machten$UNAME_RELEASE |
| 516 | ;; |
| 517 | powerpc:machten:*:*) |
| 518 | GUESS=powerpc-apple-machten$UNAME_RELEASE |
| 519 | ;; |
| 520 | RISC*:Mach:*:*) |
| 521 | GUESS=mips-dec-mach_bsd4.3 |
| 522 | ;; |
| 523 | RISC*:ULTRIX:*:*) |
| 524 | GUESS=mips-dec-ultrix$UNAME_RELEASE |
| 525 | ;; |
| 526 | VAX*:ULTRIX*:*:*) |
| 527 | GUESS=vax-dec-ultrix$UNAME_RELEASE |
| 528 | ;; |
| 529 | 2020:CLIX:*:* | 2430:CLIX:*:*) |
| 530 | GUESS=clipper-intergraph-clix$UNAME_RELEASE |
| 531 | ;; |
| 532 | mips:*:*:UMIPS | mips:*:*:RISCos) |
| 533 | set_cc_for_build |
| 534 | sed 's/^ //' << EOF > "$dummy.c" |
| 535 | #ifdef __cplusplus |
| 536 | #include <stdio.h> /* for printf() prototype */ |
| 537 | int main (int argc, char *argv[]) { |
| 538 | #else |
| @@ -506,82 +554,83 @@ | |
| 554 | EOF |
| 555 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && |
| 556 | dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && |
| 557 | SYSTEM_NAME=`"$dummy" "$dummyarg"` && |
| 558 | { echo "$SYSTEM_NAME"; exit; } |
| 559 | GUESS=mips-mips-riscos$UNAME_RELEASE |
| 560 | ;; |
| 561 | Motorola:PowerMAX_OS:*:*) |
| 562 | GUESS=powerpc-motorola-powermax |
| 563 | ;; |
| 564 | Motorola:*:4.3:PL8-*) |
| 565 | GUESS=powerpc-harris-powermax |
| 566 | ;; |
| 567 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) |
| 568 | GUESS=powerpc-harris-powermax |
| 569 | ;; |
| 570 | Night_Hawk:Power_UNIX:*:*) |
| 571 | GUESS=powerpc-harris-powerunix |
| 572 | ;; |
| 573 | m88k:CX/UX:7*:*) |
| 574 | GUESS=m88k-harris-cxux7 |
| 575 | ;; |
| 576 | m88k:*:4*:R4*) |
| 577 | GUESS=m88k-motorola-sysv4 |
| 578 | ;; |
| 579 | m88k:*:3*:R3*) |
| 580 | GUESS=m88k-motorola-sysv3 |
| 581 | ;; |
| 582 | AViiON:dgux:*:*) |
| 583 | # DG/UX returns AViiON for all architectures |
| 584 | UNAME_PROCESSOR=`/usr/bin/uname -p` |
| 585 | if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 |
| 586 | then |
| 587 | if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ |
| 588 | test "$TARGET_BINARY_INTERFACE"x = x |
| 589 | then |
| 590 | GUESS=m88k-dg-dgux$UNAME_RELEASE |
| 591 | else |
| 592 | GUESS=m88k-dg-dguxbcs$UNAME_RELEASE |
| 593 | fi |
| 594 | else |
| 595 | GUESS=i586-dg-dgux$UNAME_RELEASE |
| 596 | fi |
| 597 | ;; |
| 598 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
| 599 | GUESS=m88k-dolphin-sysv3 |
| 600 | ;; |
| 601 | M88*:*:R3*:*) |
| 602 | # Delta 88k system running SVR3 |
| 603 | GUESS=m88k-motorola-sysv3 |
| 604 | ;; |
| 605 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) |
| 606 | GUESS=m88k-tektronix-sysv3 |
| 607 | ;; |
| 608 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) |
| 609 | GUESS=m68k-tektronix-bsd |
| 610 | ;; |
| 611 | *:IRIX*:*:*) |
| 612 | IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` |
| 613 | GUESS=mips-sgi-irix$IRIX_REL |
| 614 | ;; |
| 615 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. |
| 616 | GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id |
| 617 | ;; # Note that: echo "'`uname -s`'" gives 'AIX ' |
| 618 | i*86:AIX:*:*) |
| 619 | GUESS=i386-ibm-aix |
| 620 | ;; |
| 621 | ia64:AIX:*:*) |
| 622 | if test -x /usr/bin/oslevel ; then |
| 623 | IBM_REV=`/usr/bin/oslevel` |
| 624 | else |
| 625 | IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
| 626 | fi |
| 627 | GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV |
| 628 | ;; |
| 629 | *:AIX:2:3) |
| 630 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then |
| 631 | set_cc_for_build |
| 632 | sed 's/^ //' << EOF > "$dummy.c" |
| 633 | #include <sys/systemcfg.h> |
| 634 | |
| 635 | main() |
| 636 | { |
| @@ -591,78 +640,78 @@ | |
| 640 | exit(0); |
| 641 | } |
| 642 | EOF |
| 643 | if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` |
| 644 | then |
| 645 | GUESS=$SYSTEM_NAME |
| 646 | else |
| 647 | GUESS=rs6000-ibm-aix3.2.5 |
| 648 | fi |
| 649 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
| 650 | GUESS=rs6000-ibm-aix3.2.4 |
| 651 | else |
| 652 | GUESS=rs6000-ibm-aix3.2 |
| 653 | fi |
| 654 | ;; |
| 655 | *:AIX:*:[4567]) |
| 656 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
| 657 | if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then |
| 658 | IBM_ARCH=rs6000 |
| 659 | else |
| 660 | IBM_ARCH=powerpc |
| 661 | fi |
| 662 | if test -x /usr/bin/lslpp ; then |
| 663 | IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ |
| 664 | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
| 665 | else |
| 666 | IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
| 667 | fi |
| 668 | GUESS=$IBM_ARCH-ibm-aix$IBM_REV |
| 669 | ;; |
| 670 | *:AIX:*:*) |
| 671 | GUESS=rs6000-ibm-aix |
| 672 | ;; |
| 673 | ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
| 674 | GUESS=romp-ibm-bsd4.4 |
| 675 | ;; |
| 676 | ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and |
| 677 | GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to |
| 678 | ;; # report: romp-ibm BSD 4.3 |
| 679 | *:BOSX:*:*) |
| 680 | GUESS=rs6000-bull-bosx |
| 681 | ;; |
| 682 | DPX/2?00:B.O.S.:*:*) |
| 683 | GUESS=m68k-bull-sysv3 |
| 684 | ;; |
| 685 | 9000/[34]??:4.3bsd:1.*:*) |
| 686 | GUESS=m68k-hp-bsd |
| 687 | ;; |
| 688 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) |
| 689 | GUESS=m68k-hp-bsd4.4 |
| 690 | ;; |
| 691 | 9000/[34678]??:HP-UX:*:*) |
| 692 | HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
| 693 | case $UNAME_MACHINE in |
| 694 | 9000/31?) HP_ARCH=m68000 ;; |
| 695 | 9000/[34]??) HP_ARCH=m68k ;; |
| 696 | 9000/[678][0-9][0-9]) |
| 697 | if test -x /usr/bin/getconf; then |
| 698 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
| 699 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` |
| 700 | case $sc_cpu_version in |
| 701 | 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 |
| 702 | 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 |
| 703 | 532) # CPU_PA_RISC2_0 |
| 704 | case $sc_kernel_bits in |
| 705 | 32) HP_ARCH=hppa2.0n ;; |
| 706 | 64) HP_ARCH=hppa2.0w ;; |
| 707 | '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 |
| 708 | esac ;; |
| 709 | esac |
| 710 | fi |
| 711 | if test "$HP_ARCH" = ""; then |
| 712 | set_cc_for_build |
| 713 | sed 's/^ //' << EOF > "$dummy.c" |
| 714 | |
| 715 | #define _HPUX_SOURCE |
| 716 | #include <stdlib.h> |
| 717 | #include <unistd.h> |
| @@ -696,13 +745,13 @@ | |
| 745 | EOF |
| 746 | (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` |
| 747 | test -z "$HP_ARCH" && HP_ARCH=hppa |
| 748 | fi ;; |
| 749 | esac |
| 750 | if test "$HP_ARCH" = hppa2.0w |
| 751 | then |
| 752 | set_cc_for_build |
| 753 | |
| 754 | # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating |
| 755 | # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler |
| 756 | # generating 64-bit code. GNU and HP use different nomenclature: |
| 757 | # |
| @@ -717,18 +766,18 @@ | |
| 766 | HP_ARCH=hppa2.0w |
| 767 | else |
| 768 | HP_ARCH=hppa64 |
| 769 | fi |
| 770 | fi |
| 771 | GUESS=$HP_ARCH-hp-hpux$HPUX_REV |
| 772 | ;; |
| 773 | ia64:HP-UX:*:*) |
| 774 | HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` |
| 775 | GUESS=ia64-hp-hpux$HPUX_REV |
| 776 | ;; |
| 777 | 3050*:HI-UX:*:*) |
| 778 | set_cc_for_build |
| 779 | sed 's/^ //' << EOF > "$dummy.c" |
| 780 | #include <unistd.h> |
| 781 | int |
| 782 | main () |
| 783 | { |
| @@ -752,162 +801,215 @@ | |
| 801 | exit (0); |
| 802 | } |
| 803 | EOF |
| 804 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && |
| 805 | { echo "$SYSTEM_NAME"; exit; } |
| 806 | GUESS=unknown-hitachi-hiuxwe2 |
| 807 | ;; |
| 808 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) |
| 809 | GUESS=hppa1.1-hp-bsd |
| 810 | ;; |
| 811 | 9000/8??:4.3bsd:*:*) |
| 812 | GUESS=hppa1.0-hp-bsd |
| 813 | ;; |
| 814 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) |
| 815 | GUESS=hppa1.0-hp-mpeix |
| 816 | ;; |
| 817 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) |
| 818 | GUESS=hppa1.1-hp-osf |
| 819 | ;; |
| 820 | hp8??:OSF1:*:*) |
| 821 | GUESS=hppa1.0-hp-osf |
| 822 | ;; |
| 823 | i*86:OSF1:*:*) |
| 824 | if test -x /usr/sbin/sysversion ; then |
| 825 | GUESS=$UNAME_MACHINE-unknown-osf1mk |
| 826 | else |
| 827 | GUESS=$UNAME_MACHINE-unknown-osf1 |
| 828 | fi |
| 829 | ;; |
| 830 | parisc*:Lites*:*:*) |
| 831 | GUESS=hppa1.1-hp-lites |
| 832 | ;; |
| 833 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
| 834 | GUESS=c1-convex-bsd |
| 835 | ;; |
| 836 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
| 837 | if getsysinfo -f scalar_acc |
| 838 | then echo c32-convex-bsd |
| 839 | else echo c2-convex-bsd |
| 840 | fi |
| 841 | exit ;; |
| 842 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
| 843 | GUESS=c34-convex-bsd |
| 844 | ;; |
| 845 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
| 846 | GUESS=c38-convex-bsd |
| 847 | ;; |
| 848 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
| 849 | GUESS=c4-convex-bsd |
| 850 | ;; |
| 851 | CRAY*Y-MP:*:*:*) |
| 852 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
| 853 | GUESS=ymp-cray-unicos$CRAY_REL |
| 854 | ;; |
| 855 | CRAY*[A-Z]90:*:*:*) |
| 856 | echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ |
| 857 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ |
| 858 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ |
| 859 | -e 's/\.[^.]*$/.X/' |
| 860 | exit ;; |
| 861 | CRAY*TS:*:*:*) |
| 862 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
| 863 | GUESS=t90-cray-unicos$CRAY_REL |
| 864 | ;; |
| 865 | CRAY*T3E:*:*:*) |
| 866 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
| 867 | GUESS=alphaev5-cray-unicosmk$CRAY_REL |
| 868 | ;; |
| 869 | CRAY*SV1:*:*:*) |
| 870 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
| 871 | GUESS=sv1-cray-unicos$CRAY_REL |
| 872 | ;; |
| 873 | *:UNICOS/mp:*:*) |
| 874 | CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` |
| 875 | GUESS=craynv-cray-unicosmp$CRAY_REL |
| 876 | ;; |
| 877 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
| 878 | FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` |
| 879 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 880 | FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` |
| 881 | GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
| 882 | ;; |
| 883 | 5000:UNIX_System_V:4.*:*) |
| 884 | FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` |
| 885 | FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` |
| 886 | GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
| 887 | ;; |
| 888 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
| 889 | GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE |
| 890 | ;; |
| 891 | sparc*:BSD/OS:*:*) |
| 892 | GUESS=sparc-unknown-bsdi$UNAME_RELEASE |
| 893 | ;; |
| 894 | *:BSD/OS:*:*) |
| 895 | GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE |
| 896 | ;; |
| 897 | arm:FreeBSD:*:*) |
| 898 | UNAME_PROCESSOR=`uname -p` |
| 899 | set_cc_for_build |
| 900 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 901 | | grep -q __ARM_PCS_VFP |
| 902 | then |
| 903 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 904 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi |
| 905 | else |
| 906 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 907 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf |
| 908 | fi |
| 909 | ;; |
| 910 | *:FreeBSD:*:*) |
| 911 | UNAME_PROCESSOR=`uname -p` |
| 912 | case $UNAME_PROCESSOR in |
| 913 | amd64) |
| 914 | UNAME_PROCESSOR=x86_64 ;; |
| 915 | i386) |
| 916 | UNAME_PROCESSOR=i586 ;; |
| 917 | esac |
| 918 | FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 919 | GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL |
| 920 | ;; |
| 921 | i*:CYGWIN*:*) |
| 922 | GUESS=$UNAME_MACHINE-pc-cygwin |
| 923 | ;; |
| 924 | *:MINGW64*:*) |
| 925 | GUESS=$UNAME_MACHINE-pc-mingw64 |
| 926 | ;; |
| 927 | *:MINGW*:*) |
| 928 | GUESS=$UNAME_MACHINE-pc-mingw32 |
| 929 | ;; |
| 930 | *:MSYS*:*) |
| 931 | GUESS=$UNAME_MACHINE-pc-msys |
| 932 | ;; |
| 933 | i*:PW*:*) |
| 934 | GUESS=$UNAME_MACHINE-pc-pw32 |
| 935 | ;; |
| 936 | *:SerenityOS:*:*) |
| 937 | GUESS=$UNAME_MACHINE-pc-serenity |
| 938 | ;; |
| 939 | *:Interix*:*) |
| 940 | case $UNAME_MACHINE in |
| 941 | x86) |
| 942 | GUESS=i586-pc-interix$UNAME_RELEASE |
| 943 | ;; |
| 944 | authenticamd | genuineintel | EM64T) |
| 945 | GUESS=x86_64-unknown-interix$UNAME_RELEASE |
| 946 | ;; |
| 947 | IA64) |
| 948 | GUESS=ia64-unknown-interix$UNAME_RELEASE |
| 949 | ;; |
| 950 | esac ;; |
| 951 | i*:UWIN*:*) |
| 952 | GUESS=$UNAME_MACHINE-pc-uwin |
| 953 | ;; |
| 954 | amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) |
| 955 | GUESS=x86_64-pc-cygwin |
| 956 | ;; |
| 957 | prep*:SunOS:5.*:*) |
| 958 | SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` |
| 959 | GUESS=powerpcle-unknown-solaris2$SUN_REL |
| 960 | ;; |
| 961 | *:GNU:*:*) |
| 962 | # the GNU system |
| 963 | GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` |
| 964 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` |
| 965 | GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL |
| 966 | ;; |
| 967 | *:GNU/*:*:*) |
| 968 | # other systems with GNU libc and userland |
| 969 | GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` |
| 970 | GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 971 | GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC |
| 972 | ;; |
| 973 | x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) |
| 974 | GUESS="$UNAME_MACHINE-pc-managarm-mlibc" |
| 975 | ;; |
| 976 | *:[Mm]anagarm:*:*) |
| 977 | GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" |
| 978 | ;; |
| 979 | *:Minix:*:*) |
| 980 | GUESS=$UNAME_MACHINE-unknown-minix |
| 981 | ;; |
| 982 | aarch64:Linux:*:*) |
| 983 | set_cc_for_build |
| 984 | CPU=$UNAME_MACHINE |
| 985 | LIBCABI=$LIBC |
| 986 | if test "$CC_FOR_BUILD" != no_compiler_found; then |
| 987 | ABI=64 |
| 988 | sed 's/^ //' << EOF > "$dummy.c" |
| 989 | #ifdef __ARM_EABI__ |
| 990 | #ifdef __ARM_PCS_VFP |
| 991 | ABI=eabihf |
| 992 | #else |
| 993 | ABI=eabi |
| 994 | #endif |
| 995 | #endif |
| 996 | EOF |
| 997 | cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` |
| 998 | eval "$cc_set_abi" |
| 999 | case $ABI in |
| 1000 | eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; |
| 1001 | esac |
| 1002 | fi |
| 1003 | GUESS=$CPU-unknown-linux-$LIBCABI |
| 1004 | ;; |
| 1005 | aarch64_be:Linux:*:*) |
| 1006 | UNAME_MACHINE=aarch64_be |
| 1007 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1008 | ;; |
| 1009 | alpha:Linux:*:*) |
| 1010 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in |
| 1011 | EV5) UNAME_MACHINE=alphaev5 ;; |
| 1012 | EV56) UNAME_MACHINE=alphaev56 ;; |
| 1013 | PCA56) UNAME_MACHINE=alphapca56 ;; |
| 1014 | PCA57) UNAME_MACHINE=alphapca56 ;; |
| 1015 | EV6) UNAME_MACHINE=alphaev6 ;; |
| @@ -914,246 +1016,308 @@ | |
| 1016 | EV67) UNAME_MACHINE=alphaev67 ;; |
| 1017 | EV68*) UNAME_MACHINE=alphaev68 ;; |
| 1018 | esac |
| 1019 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
| 1020 | if test "$?" = 0 ; then LIBC=gnulibc1 ; fi |
| 1021 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1022 | ;; |
| 1023 | arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) |
| 1024 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1025 | ;; |
| 1026 | arm*:Linux:*:*) |
| 1027 | set_cc_for_build |
| 1028 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 1029 | | grep -q __ARM_EABI__ |
| 1030 | then |
| 1031 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1032 | else |
| 1033 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ |
| 1034 | | grep -q __ARM_PCS_VFP |
| 1035 | then |
| 1036 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi |
| 1037 | else |
| 1038 | GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf |
| 1039 | fi |
| 1040 | fi |
| 1041 | ;; |
| 1042 | avr32*:Linux:*:*) |
| 1043 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1044 | ;; |
| 1045 | cris:Linux:*:*) |
| 1046 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
| 1047 | ;; |
| 1048 | crisv32:Linux:*:*) |
| 1049 | GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
| 1050 | ;; |
| 1051 | e2k:Linux:*:*) |
| 1052 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1053 | ;; |
| 1054 | frv:Linux:*:*) |
| 1055 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1056 | ;; |
| 1057 | hexagon:Linux:*:*) |
| 1058 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1059 | ;; |
| 1060 | i*86:Linux:*:*) |
| 1061 | GUESS=$UNAME_MACHINE-pc-linux-$LIBC |
| 1062 | ;; |
| 1063 | ia64:Linux:*:*) |
| 1064 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1065 | ;; |
| 1066 | k1om:Linux:*:*) |
| 1067 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1068 | ;; |
| 1069 | kvx:Linux:*:*) |
| 1070 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1071 | ;; |
| 1072 | kvx:cos:*:*) |
| 1073 | GUESS=$UNAME_MACHINE-unknown-cos |
| 1074 | ;; |
| 1075 | kvx:mbr:*:*) |
| 1076 | GUESS=$UNAME_MACHINE-unknown-mbr |
| 1077 | ;; |
| 1078 | loongarch32:Linux:*:* | loongarch64:Linux:*:*) |
| 1079 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1080 | ;; |
| 1081 | m32r*:Linux:*:*) |
| 1082 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1083 | ;; |
| 1084 | m68*:Linux:*:*) |
| 1085 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1086 | ;; |
| 1087 | mips:Linux:*:* | mips64:Linux:*:*) |
| 1088 | set_cc_for_build |
| 1089 | IS_GLIBC=0 |
| 1090 | test x"${LIBC}" = xgnu && IS_GLIBC=1 |
| 1091 | sed 's/^ //' << EOF > "$dummy.c" |
| 1092 | #undef CPU |
| 1093 | #undef mips |
| 1094 | #undef mipsel |
| 1095 | #undef mips64 |
| 1096 | #undef mips64el |
| 1097 | #if ${IS_GLIBC} && defined(_ABI64) |
| 1098 | LIBCABI=gnuabi64 |
| 1099 | #else |
| 1100 | #if ${IS_GLIBC} && defined(_ABIN32) |
| 1101 | LIBCABI=gnuabin32 |
| 1102 | #else |
| 1103 | LIBCABI=${LIBC} |
| 1104 | #endif |
| 1105 | #endif |
| 1106 | |
| 1107 | #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 |
| 1108 | CPU=mipsisa64r6 |
| 1109 | #else |
| 1110 | #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 |
| 1111 | CPU=mipsisa32r6 |
| 1112 | #else |
| 1113 | #if defined(__mips64) |
| 1114 | CPU=mips64 |
| 1115 | #else |
| 1116 | CPU=mips |
| 1117 | #endif |
| 1118 | #endif |
| 1119 | #endif |
| 1120 | |
| 1121 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) |
| 1122 | MIPS_ENDIAN=el |
| 1123 | #else |
| 1124 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) |
| 1125 | MIPS_ENDIAN= |
| 1126 | #else |
| 1127 | MIPS_ENDIAN= |
| 1128 | #endif |
| 1129 | #endif |
| 1130 | EOF |
| 1131 | cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` |
| 1132 | eval "$cc_set_vars" |
| 1133 | test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } |
| 1134 | ;; |
| 1135 | mips64el:Linux:*:*) |
| 1136 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1137 | ;; |
| 1138 | openrisc*:Linux:*:*) |
| 1139 | GUESS=or1k-unknown-linux-$LIBC |
| 1140 | ;; |
| 1141 | or32:Linux:*:* | or1k*:Linux:*:*) |
| 1142 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1143 | ;; |
| 1144 | padre:Linux:*:*) |
| 1145 | GUESS=sparc-unknown-linux-$LIBC |
| 1146 | ;; |
| 1147 | parisc64:Linux:*:* | hppa64:Linux:*:*) |
| 1148 | GUESS=hppa64-unknown-linux-$LIBC |
| 1149 | ;; |
| 1150 | parisc:Linux:*:* | hppa:Linux:*:*) |
| 1151 | # Look for CPU level |
| 1152 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in |
| 1153 | PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; |
| 1154 | PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; |
| 1155 | *) GUESS=hppa-unknown-linux-$LIBC ;; |
| 1156 | esac |
| 1157 | ;; |
| 1158 | ppc64:Linux:*:*) |
| 1159 | GUESS=powerpc64-unknown-linux-$LIBC |
| 1160 | ;; |
| 1161 | ppc:Linux:*:*) |
| 1162 | GUESS=powerpc-unknown-linux-$LIBC |
| 1163 | ;; |
| 1164 | ppc64le:Linux:*:*) |
| 1165 | GUESS=powerpc64le-unknown-linux-$LIBC |
| 1166 | ;; |
| 1167 | ppcle:Linux:*:*) |
| 1168 | GUESS=powerpcle-unknown-linux-$LIBC |
| 1169 | ;; |
| 1170 | riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) |
| 1171 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1172 | ;; |
| 1173 | s390:Linux:*:* | s390x:Linux:*:*) |
| 1174 | GUESS=$UNAME_MACHINE-ibm-linux-$LIBC |
| 1175 | ;; |
| 1176 | sh64*:Linux:*:*) |
| 1177 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1178 | ;; |
| 1179 | sh*:Linux:*:*) |
| 1180 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1181 | ;; |
| 1182 | sparc:Linux:*:* | sparc64:Linux:*:*) |
| 1183 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1184 | ;; |
| 1185 | tile*:Linux:*:*) |
| 1186 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1187 | ;; |
| 1188 | vax:Linux:*:*) |
| 1189 | GUESS=$UNAME_MACHINE-dec-linux-$LIBC |
| 1190 | ;; |
| 1191 | x86_64:Linux:*:*) |
| 1192 | set_cc_for_build |
| 1193 | CPU=$UNAME_MACHINE |
| 1194 | LIBCABI=$LIBC |
| 1195 | if test "$CC_FOR_BUILD" != no_compiler_found; then |
| 1196 | ABI=64 |
| 1197 | sed 's/^ //' << EOF > "$dummy.c" |
| 1198 | #ifdef __i386__ |
| 1199 | ABI=x86 |
| 1200 | #else |
| 1201 | #ifdef __ILP32__ |
| 1202 | ABI=x32 |
| 1203 | #endif |
| 1204 | #endif |
| 1205 | EOF |
| 1206 | cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` |
| 1207 | eval "$cc_set_abi" |
| 1208 | case $ABI in |
| 1209 | x86) CPU=i686 ;; |
| 1210 | x32) LIBCABI=${LIBC}x32 ;; |
| 1211 | esac |
| 1212 | fi |
| 1213 | GUESS=$CPU-pc-linux-$LIBCABI |
| 1214 | ;; |
| 1215 | xtensa*:Linux:*:*) |
| 1216 | GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 1217 | ;; |
| 1218 | i*86:DYNIX/ptx:4*:*) |
| 1219 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
| 1220 | # earlier versions are messed up and put the nodename in both |
| 1221 | # sysname and nodename. |
| 1222 | GUESS=i386-sequent-sysv4 |
| 1223 | ;; |
| 1224 | i*86:UNIX_SV:4.2MP:2.*) |
| 1225 | # Unixware is an offshoot of SVR4, but it has its own version |
| 1226 | # number series starting with 2... |
| 1227 | # I am not positive that other SVR4 systems won't match this, |
| 1228 | # I just have to hope. -- rms. |
| 1229 | # Use sysv4.2uw... so that sysv4* matches it. |
| 1230 | GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION |
| 1231 | ;; |
| 1232 | i*86:OS/2:*:*) |
| 1233 | # If we were able to find 'uname', then EMX Unix compatibility |
| 1234 | # is probably installed. |
| 1235 | GUESS=$UNAME_MACHINE-pc-os2-emx |
| 1236 | ;; |
| 1237 | i*86:XTS-300:*:STOP) |
| 1238 | GUESS=$UNAME_MACHINE-unknown-stop |
| 1239 | ;; |
| 1240 | i*86:atheos:*:*) |
| 1241 | GUESS=$UNAME_MACHINE-unknown-atheos |
| 1242 | ;; |
| 1243 | i*86:syllable:*:*) |
| 1244 | GUESS=$UNAME_MACHINE-pc-syllable |
| 1245 | ;; |
| 1246 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) |
| 1247 | GUESS=i386-unknown-lynxos$UNAME_RELEASE |
| 1248 | ;; |
| 1249 | i*86:*DOS:*:*) |
| 1250 | GUESS=$UNAME_MACHINE-pc-msdosdjgpp |
| 1251 | ;; |
| 1252 | i*86:*:4.*:*) |
| 1253 | UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` |
| 1254 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
| 1255 | GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL |
| 1256 | else |
| 1257 | GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL |
| 1258 | fi |
| 1259 | ;; |
| 1260 | i*86:*:5:[678]*) |
| 1261 | # UnixWare 7.x, OpenUNIX and OpenServer 6. |
| 1262 | case `/bin/uname -X | grep "^Machine"` in |
| 1263 | *486*) UNAME_MACHINE=i486 ;; |
| 1264 | *Pentium) UNAME_MACHINE=i586 ;; |
| 1265 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; |
| 1266 | esac |
| 1267 | GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} |
| 1268 | ;; |
| 1269 | i*86:*:3.2:*) |
| 1270 | if test -f /usr/options/cb.name; then |
| 1271 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` |
| 1272 | GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL |
| 1273 | elif /bin/uname -X 2>/dev/null >/dev/null ; then |
| 1274 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` |
| 1275 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 |
| 1276 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ |
| 1277 | && UNAME_MACHINE=i586 |
| 1278 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ |
| 1279 | && UNAME_MACHINE=i686 |
| 1280 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ |
| 1281 | && UNAME_MACHINE=i686 |
| 1282 | GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL |
| 1283 | else |
| 1284 | GUESS=$UNAME_MACHINE-pc-sysv32 |
| 1285 | fi |
| 1286 | ;; |
| 1287 | pc:*:*:*) |
| 1288 | # Left here for compatibility: |
| 1289 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
| 1290 | # the processor, so we play safe by assuming i586. |
| 1291 | # Note: whatever this is, it MUST be the same as what config.sub |
| 1292 | # prints for the "djgpp" host, or else GDB configure will decide that |
| 1293 | # this is a cross-build. |
| 1294 | GUESS=i586-pc-msdosdjgpp |
| 1295 | ;; |
| 1296 | Intel:Mach:3*:*) |
| 1297 | GUESS=i386-pc-mach3 |
| 1298 | ;; |
| 1299 | paragon:*:*:*) |
| 1300 | GUESS=i860-intel-osf1 |
| 1301 | ;; |
| 1302 | i860:*:4.*:*) # i860-SVR4 |
| 1303 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then |
| 1304 | GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 |
| 1305 | else # Add other i860-SVR4 vendors below as they are discovered. |
| 1306 | GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 |
| 1307 | fi |
| 1308 | ;; |
| 1309 | mini*:CTIX:SYS*5:*) |
| 1310 | # "miniframe" |
| 1311 | GUESS=m68010-convergent-sysv |
| 1312 | ;; |
| 1313 | mc68k:UNIX:SYSTEM5:3.51m) |
| 1314 | GUESS=m68k-convergent-sysv |
| 1315 | ;; |
| 1316 | M680?0:D-NIX:5.3:*) |
| 1317 | GUESS=m68k-diab-dnix |
| 1318 | ;; |
| 1319 | M68*:*:R3V[5678]*:*) |
| 1320 | test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; |
| 1321 | 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) |
| 1322 | OS_REL='' |
| 1323 | test -r /etc/.relid \ |
| @@ -1174,253 +1338,411 @@ | |
| 1338 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
| 1339 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } |
| 1340 | /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ |
| 1341 | && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; |
| 1342 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) |
| 1343 | GUESS=m68k-unknown-lynxos$UNAME_RELEASE |
| 1344 | ;; |
| 1345 | mc68030:UNIX_System_V:4.*:*) |
| 1346 | GUESS=m68k-atari-sysv4 |
| 1347 | ;; |
| 1348 | TSUNAMI:LynxOS:2.*:*) |
| 1349 | GUESS=sparc-unknown-lynxos$UNAME_RELEASE |
| 1350 | ;; |
| 1351 | rs6000:LynxOS:2.*:*) |
| 1352 | GUESS=rs6000-unknown-lynxos$UNAME_RELEASE |
| 1353 | ;; |
| 1354 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) |
| 1355 | GUESS=powerpc-unknown-lynxos$UNAME_RELEASE |
| 1356 | ;; |
| 1357 | SM[BE]S:UNIX_SV:*:*) |
| 1358 | GUESS=mips-dde-sysv$UNAME_RELEASE |
| 1359 | ;; |
| 1360 | RM*:ReliantUNIX-*:*:*) |
| 1361 | GUESS=mips-sni-sysv4 |
| 1362 | ;; |
| 1363 | RM*:SINIX-*:*:*) |
| 1364 | GUESS=mips-sni-sysv4 |
| 1365 | ;; |
| 1366 | *:SINIX-*:*:*) |
| 1367 | if uname -p 2>/dev/null >/dev/null ; then |
| 1368 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1369 | GUESS=$UNAME_MACHINE-sni-sysv4 |
| 1370 | else |
| 1371 | GUESS=ns32k-sni-sysv |
| 1372 | fi |
| 1373 | ;; |
| 1374 | PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort |
| 1375 | # says <[email protected]> |
| 1376 | GUESS=i586-unisys-sysv4 |
| 1377 | ;; |
| 1378 | *:UNIX_System_V:4*:FTX*) |
| 1379 | # From Gerald Hewes <[email protected]>. |
| 1380 | # How about differentiating between stratus architectures? -djm |
| 1381 | GUESS=hppa1.1-stratus-sysv4 |
| 1382 | ;; |
| 1383 | *:*:*:FTX*) |
| 1384 | # From [email protected]. |
| 1385 | GUESS=i860-stratus-sysv4 |
| 1386 | ;; |
| 1387 | i*86:VOS:*:*) |
| 1388 | # From [email protected]. |
| 1389 | GUESS=$UNAME_MACHINE-stratus-vos |
| 1390 | ;; |
| 1391 | *:VOS:*:*) |
| 1392 | # From [email protected]. |
| 1393 | GUESS=hppa1.1-stratus-vos |
| 1394 | ;; |
| 1395 | mc68*:A/UX:*:*) |
| 1396 | GUESS=m68k-apple-aux$UNAME_RELEASE |
| 1397 | ;; |
| 1398 | news*:NEWS-OS:6*:*) |
| 1399 | GUESS=mips-sony-newsos6 |
| 1400 | ;; |
| 1401 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
| 1402 | if test -d /usr/nec; then |
| 1403 | GUESS=mips-nec-sysv$UNAME_RELEASE |
| 1404 | else |
| 1405 | GUESS=mips-unknown-sysv$UNAME_RELEASE |
| 1406 | fi |
| 1407 | ;; |
| 1408 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
| 1409 | GUESS=powerpc-be-beos |
| 1410 | ;; |
| 1411 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. |
| 1412 | GUESS=powerpc-apple-beos |
| 1413 | ;; |
| 1414 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. |
| 1415 | GUESS=i586-pc-beos |
| 1416 | ;; |
| 1417 | BePC:Haiku:*:*) # Haiku running on Intel PC compatible. |
| 1418 | GUESS=i586-pc-haiku |
| 1419 | ;; |
| 1420 | ppc:Haiku:*:*) # Haiku running on Apple PowerPC |
| 1421 | GUESS=powerpc-apple-haiku |
| 1422 | ;; |
| 1423 | *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) |
| 1424 | GUESS=$UNAME_MACHINE-unknown-haiku |
| 1425 | ;; |
| 1426 | SX-4:SUPER-UX:*:*) |
| 1427 | GUESS=sx4-nec-superux$UNAME_RELEASE |
| 1428 | ;; |
| 1429 | SX-5:SUPER-UX:*:*) |
| 1430 | GUESS=sx5-nec-superux$UNAME_RELEASE |
| 1431 | ;; |
| 1432 | SX-6:SUPER-UX:*:*) |
| 1433 | GUESS=sx6-nec-superux$UNAME_RELEASE |
| 1434 | ;; |
| 1435 | SX-7:SUPER-UX:*:*) |
| 1436 | GUESS=sx7-nec-superux$UNAME_RELEASE |
| 1437 | ;; |
| 1438 | SX-8:SUPER-UX:*:*) |
| 1439 | GUESS=sx8-nec-superux$UNAME_RELEASE |
| 1440 | ;; |
| 1441 | SX-8R:SUPER-UX:*:*) |
| 1442 | GUESS=sx8r-nec-superux$UNAME_RELEASE |
| 1443 | ;; |
| 1444 | SX-ACE:SUPER-UX:*:*) |
| 1445 | GUESS=sxace-nec-superux$UNAME_RELEASE |
| 1446 | ;; |
| 1447 | Power*:Rhapsody:*:*) |
| 1448 | GUESS=powerpc-apple-rhapsody$UNAME_RELEASE |
| 1449 | ;; |
| 1450 | *:Rhapsody:*:*) |
| 1451 | GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE |
| 1452 | ;; |
| 1453 | arm64:Darwin:*:*) |
| 1454 | GUESS=aarch64-apple-darwin$UNAME_RELEASE |
| 1455 | ;; |
| 1456 | *:Darwin:*:*) |
| 1457 | UNAME_PROCESSOR=`uname -p` |
| 1458 | case $UNAME_PROCESSOR in |
| 1459 | unknown) UNAME_PROCESSOR=powerpc ;; |
| 1460 | esac |
| 1461 | if command -v xcode-select > /dev/null 2> /dev/null && \ |
| 1462 | ! xcode-select --print-path > /dev/null 2> /dev/null ; then |
| 1463 | # Avoid executing cc if there is no toolchain installed as |
| 1464 | # cc will be a stub that puts up a graphical alert |
| 1465 | # prompting the user to install developer tools. |
| 1466 | CC_FOR_BUILD=no_compiler_found |
| 1467 | else |
| 1468 | set_cc_for_build |
| 1469 | fi |
| 1470 | if test "$CC_FOR_BUILD" != no_compiler_found; then |
| 1471 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
| 1472 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
| 1473 | grep IS_64BIT_ARCH >/dev/null |
| 1474 | then |
| 1475 | case $UNAME_PROCESSOR in |
| 1476 | i386) UNAME_PROCESSOR=x86_64 ;; |
| 1477 | powerpc) UNAME_PROCESSOR=powerpc64 ;; |
| 1478 | esac |
| 1479 | fi |
| 1480 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc |
| 1481 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ |
| 1482 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ |
| 1483 | grep IS_PPC >/dev/null |
| 1484 | then |
| 1485 | UNAME_PROCESSOR=powerpc |
| 1486 | fi |
| 1487 | elif test "$UNAME_PROCESSOR" = i386 ; then |
| 1488 | # uname -m returns i386 or x86_64 |
| 1489 | UNAME_PROCESSOR=$UNAME_MACHINE |
| 1490 | fi |
| 1491 | GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE |
| 1492 | ;; |
| 1493 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
| 1494 | UNAME_PROCESSOR=`uname -p` |
| 1495 | if test "$UNAME_PROCESSOR" = x86; then |
| 1496 | UNAME_PROCESSOR=i386 |
| 1497 | UNAME_MACHINE=pc |
| 1498 | fi |
| 1499 | GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE |
| 1500 | ;; |
| 1501 | *:QNX:*:4*) |
| 1502 | GUESS=i386-pc-qnx |
| 1503 | ;; |
| 1504 | NEO-*:NONSTOP_KERNEL:*:*) |
| 1505 | GUESS=neo-tandem-nsk$UNAME_RELEASE |
| 1506 | ;; |
| 1507 | NSE-*:NONSTOP_KERNEL:*:*) |
| 1508 | GUESS=nse-tandem-nsk$UNAME_RELEASE |
| 1509 | ;; |
| 1510 | NSR-*:NONSTOP_KERNEL:*:*) |
| 1511 | GUESS=nsr-tandem-nsk$UNAME_RELEASE |
| 1512 | ;; |
| 1513 | NSV-*:NONSTOP_KERNEL:*:*) |
| 1514 | GUESS=nsv-tandem-nsk$UNAME_RELEASE |
| 1515 | ;; |
| 1516 | NSX-*:NONSTOP_KERNEL:*:*) |
| 1517 | GUESS=nsx-tandem-nsk$UNAME_RELEASE |
| 1518 | ;; |
| 1519 | *:NonStop-UX:*:*) |
| 1520 | GUESS=mips-compaq-nonstopux |
| 1521 | ;; |
| 1522 | BS2000:POSIX*:*:*) |
| 1523 | GUESS=bs2000-siemens-sysv |
| 1524 | ;; |
| 1525 | DS/*:UNIX_System_V:*:*) |
| 1526 | GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE |
| 1527 | ;; |
| 1528 | *:Plan9:*:*) |
| 1529 | # "uname -m" is not consistent, so use $cputype instead. 386 |
| 1530 | # is converted to i386 for consistency with other x86 |
| 1531 | # operating systems. |
| 1532 | if test "${cputype-}" = 386; then |
| 1533 | UNAME_MACHINE=i386 |
| 1534 | elif test "x${cputype-}" != x; then |
| 1535 | UNAME_MACHINE=$cputype |
| 1536 | fi |
| 1537 | GUESS=$UNAME_MACHINE-unknown-plan9 |
| 1538 | ;; |
| 1539 | *:TOPS-10:*:*) |
| 1540 | GUESS=pdp10-unknown-tops10 |
| 1541 | ;; |
| 1542 | *:TENEX:*:*) |
| 1543 | GUESS=pdp10-unknown-tenex |
| 1544 | ;; |
| 1545 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) |
| 1546 | GUESS=pdp10-dec-tops20 |
| 1547 | ;; |
| 1548 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) |
| 1549 | GUESS=pdp10-xkl-tops20 |
| 1550 | ;; |
| 1551 | *:TOPS-20:*:*) |
| 1552 | GUESS=pdp10-unknown-tops20 |
| 1553 | ;; |
| 1554 | *:ITS:*:*) |
| 1555 | GUESS=pdp10-unknown-its |
| 1556 | ;; |
| 1557 | SEI:*:*:SEIUX) |
| 1558 | GUESS=mips-sei-seiux$UNAME_RELEASE |
| 1559 | ;; |
| 1560 | *:DragonFly:*:*) |
| 1561 | DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` |
| 1562 | GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL |
| 1563 | ;; |
| 1564 | *:*VMS:*:*) |
| 1565 | UNAME_MACHINE=`(uname -p) 2>/dev/null` |
| 1566 | case $UNAME_MACHINE in |
| 1567 | A*) GUESS=alpha-dec-vms ;; |
| 1568 | I*) GUESS=ia64-dec-vms ;; |
| 1569 | V*) GUESS=vax-dec-vms ;; |
| 1570 | esac ;; |
| 1571 | *:XENIX:*:SysV) |
| 1572 | GUESS=i386-pc-xenix |
| 1573 | ;; |
| 1574 | i*86:skyos:*:*) |
| 1575 | SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` |
| 1576 | GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL |
| 1577 | ;; |
| 1578 | i*86:rdos:*:*) |
| 1579 | GUESS=$UNAME_MACHINE-pc-rdos |
| 1580 | ;; |
| 1581 | i*86:Fiwix:*:*) |
| 1582 | GUESS=$UNAME_MACHINE-pc-fiwix |
| 1583 | ;; |
| 1584 | *:AROS:*:*) |
| 1585 | GUESS=$UNAME_MACHINE-unknown-aros |
| 1586 | ;; |
| 1587 | x86_64:VMkernel:*:*) |
| 1588 | GUESS=$UNAME_MACHINE-unknown-esx |
| 1589 | ;; |
| 1590 | amd64:Isilon\ OneFS:*:*) |
| 1591 | GUESS=x86_64-unknown-onefs |
| 1592 | ;; |
| 1593 | *:Unleashed:*:*) |
| 1594 | GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE |
| 1595 | ;; |
| 1596 | esac |
| 1597 | |
| 1598 | # Do we have a guess based on uname results? |
| 1599 | if test "x$GUESS" != x; then |
| 1600 | echo "$GUESS" |
| 1601 | exit |
| 1602 | fi |
| 1603 | |
| 1604 | # No uname command or uname output not recognized. |
| 1605 | set_cc_for_build |
| 1606 | cat > "$dummy.c" <<EOF |
| 1607 | #ifdef _SEQUENT_ |
| 1608 | #include <sys/types.h> |
| 1609 | #include <sys/utsname.h> |
| 1610 | #endif |
| 1611 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) |
| 1612 | #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) |
| 1613 | #include <signal.h> |
| 1614 | #if defined(_SIZE_T_) || defined(SIGLOST) |
| 1615 | #include <sys/utsname.h> |
| 1616 | #endif |
| 1617 | #endif |
| 1618 | #endif |
| 1619 | main () |
| 1620 | { |
| 1621 | #if defined (sony) |
| 1622 | #if defined (MIPSEB) |
| 1623 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
| 1624 | I don't know.... */ |
| 1625 | printf ("mips-sony-bsd\n"); exit (0); |
| 1626 | #else |
| 1627 | #include <sys/param.h> |
| 1628 | printf ("m68k-sony-newsos%s\n", |
| 1629 | #ifdef NEWSOS4 |
| 1630 | "4" |
| 1631 | #else |
| 1632 | "" |
| 1633 | #endif |
| 1634 | ); exit (0); |
| 1635 | #endif |
| 1636 | #endif |
| 1637 | |
| 1638 | #if defined (NeXT) |
| 1639 | #if !defined (__ARCHITECTURE__) |
| 1640 | #define __ARCHITECTURE__ "m68k" |
| 1641 | #endif |
| 1642 | int version; |
| 1643 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
| 1644 | if (version < 4) |
| 1645 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
| 1646 | else |
| 1647 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
| 1648 | exit (0); |
| 1649 | #endif |
| 1650 | |
| 1651 | #if defined (MULTIMAX) || defined (n16) |
| 1652 | #if defined (UMAXV) |
| 1653 | printf ("ns32k-encore-sysv\n"); exit (0); |
| 1654 | #else |
| 1655 | #if defined (CMU) |
| 1656 | printf ("ns32k-encore-mach\n"); exit (0); |
| 1657 | #else |
| 1658 | printf ("ns32k-encore-bsd\n"); exit (0); |
| 1659 | #endif |
| 1660 | #endif |
| 1661 | #endif |
| 1662 | |
| 1663 | #if defined (__386BSD__) |
| 1664 | printf ("i386-pc-bsd\n"); exit (0); |
| 1665 | #endif |
| 1666 | |
| 1667 | #if defined (sequent) |
| 1668 | #if defined (i386) |
| 1669 | printf ("i386-sequent-dynix\n"); exit (0); |
| 1670 | #endif |
| 1671 | #if defined (ns32000) |
| 1672 | printf ("ns32k-sequent-dynix\n"); exit (0); |
| 1673 | #endif |
| 1674 | #endif |
| 1675 | |
| 1676 | #if defined (_SEQUENT_) |
| 1677 | struct utsname un; |
| 1678 | |
| 1679 | uname(&un); |
| 1680 | if (strncmp(un.version, "V2", 2) == 0) { |
| 1681 | printf ("i386-sequent-ptx2\n"); exit (0); |
| 1682 | } |
| 1683 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
| 1684 | printf ("i386-sequent-ptx1\n"); exit (0); |
| 1685 | } |
| 1686 | printf ("i386-sequent-ptx\n"); exit (0); |
| 1687 | #endif |
| 1688 | |
| 1689 | #if defined (vax) |
| 1690 | #if !defined (ultrix) |
| 1691 | #include <sys/param.h> |
| 1692 | #if defined (BSD) |
| 1693 | #if BSD == 43 |
| 1694 | printf ("vax-dec-bsd4.3\n"); exit (0); |
| 1695 | #else |
| 1696 | #if BSD == 199006 |
| 1697 | printf ("vax-dec-bsd4.3reno\n"); exit (0); |
| 1698 | #else |
| 1699 | printf ("vax-dec-bsd\n"); exit (0); |
| 1700 | #endif |
| 1701 | #endif |
| 1702 | #else |
| 1703 | printf ("vax-dec-bsd\n"); exit (0); |
| 1704 | #endif |
| 1705 | #else |
| 1706 | #if defined(_SIZE_T_) || defined(SIGLOST) |
| 1707 | struct utsname un; |
| 1708 | uname (&un); |
| 1709 | printf ("vax-dec-ultrix%s\n", un.release); exit (0); |
| 1710 | #else |
| 1711 | printf ("vax-dec-ultrix\n"); exit (0); |
| 1712 | #endif |
| 1713 | #endif |
| 1714 | #endif |
| 1715 | #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) |
| 1716 | #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) |
| 1717 | #if defined(_SIZE_T_) || defined(SIGLOST) |
| 1718 | struct utsname *un; |
| 1719 | uname (&un); |
| 1720 | printf ("mips-dec-ultrix%s\n", un.release); exit (0); |
| 1721 | #else |
| 1722 | printf ("mips-dec-ultrix\n"); exit (0); |
| 1723 | #endif |
| 1724 | #endif |
| 1725 | #endif |
| 1726 | |
| 1727 | #if defined (alliant) && defined (i860) |
| 1728 | printf ("i860-alliant-bsd\n"); exit (0); |
| 1729 | #endif |
| 1730 | |
| 1731 | exit (1); |
| 1732 | } |
| 1733 | EOF |
| 1734 | |
| 1735 | $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && |
| 1736 | { echo "$SYSTEM_NAME"; exit; } |
| 1737 | |
| 1738 | # Apollos put the system type in the environment. |
| 1739 | test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } |
| 1740 | |
| 1741 | echo "$0: unable to guess system type" >&2 |
| 1742 | |
| 1743 | case $UNAME_MACHINE:$UNAME_SYSTEM in |
| 1744 | mips:Linux | mips64:Linux) |
| 1745 | # If we got here on MIPS GNU/Linux, output extra information. |
| 1746 | cat >&2 <<EOF |
| 1747 | |
| 1748 | NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize |
| @@ -1433,13 +1755,21 @@ | |
| 1755 | |
| 1756 | This script (version $timestamp), has failed to recognize the |
| 1757 | operating system you are using. If your script is old, overwrite *all* |
| 1758 | copies of config.guess and config.sub with the latest versions from: |
| 1759 | |
| 1760 | https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
| 1761 | and |
| 1762 | https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
| 1763 | EOF |
| 1764 | |
| 1765 | our_year=`echo $timestamp | sed 's,-.*,,'` |
| 1766 | thisyear=`date +%Y` |
| 1767 | # shellcheck disable=SC2003 |
| 1768 | script_age=`expr "$thisyear" - "$our_year"` |
| 1769 | if test "$script_age" -lt 3 ; then |
| 1770 | cat >&2 <<EOF |
| 1771 | |
| 1772 | If $0 has already been updated, send the following data and any |
| 1773 | information you think might be pertinent to [email protected] to |
| 1774 | provide the necessary information to handle your system. |
| 1775 | |
| @@ -1463,14 +1793,15 @@ | |
| 1793 | UNAME_MACHINE = "$UNAME_MACHINE" |
| 1794 | UNAME_RELEASE = "$UNAME_RELEASE" |
| 1795 | UNAME_SYSTEM = "$UNAME_SYSTEM" |
| 1796 | UNAME_VERSION = "$UNAME_VERSION" |
| 1797 | EOF |
| 1798 | fi |
| 1799 | |
| 1800 | exit 1 |
| 1801 | |
| 1802 | # Local variables: |
| 1803 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1804 | # time-stamp-start: "timestamp='" |
| 1805 | # time-stamp-format: "%:y-%02m-%02d" |
| 1806 | # time-stamp-end: "'" |
| 1807 | # End: |
| 1808 |
+1623
-1464
| --- autosetup/autosetup-config.sub | ||
| +++ autosetup/autosetup-config.sub | ||
| @@ -1,14 +1,16 @@ | ||
| 1 | 1 | #! /bin/sh |
| 2 | 2 | # Configuration validation subroutine script. |
| 3 | -# Copyright 1992-2018 Free Software Foundation, Inc. | |
| 3 | +# Copyright 1992-2023 Free Software Foundation, Inc. | |
| 4 | + | |
| 5 | +# shellcheck disable=SC2006,SC2268 # see below for rationale | |
| 4 | 6 | |
| 5 | -timestamp='2018-03-08' | |
| 7 | +timestamp='2023-09-19' | |
| 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 |
| 13 | 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -31,11 +33,11 @@ | ||
| 31 | 33 | # Supply the specified configuration type as an argument. |
| 32 | 34 | # If it is invalid, we print an error message on stderr and exit with code 1. |
| 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 |
| 40 | 42 | # that are meaningful with *any* GNU software. |
| 41 | 43 | # Each package is responsible for reporting which valid configurations |
| @@ -47,10 +49,17 @@ | ||
| 47 | 49 | # machine specification into a single specification in the form: |
| 48 | 50 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
| 49 | 51 | # or in some cases, the newer four-part form: |
| 50 | 52 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
| 51 | 53 | # It is wrong to echo any other type of specification. |
| 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. | |
| 52 | 61 | |
| 53 | 62 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 54 | 63 | |
| 55 | 64 | usage="\ |
| 56 | 65 | Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS |
| @@ -65,17 +74,17 @@ | ||
| 65 | 74 | Report bugs and patches to <[email protected]>." |
| 66 | 75 | |
| 67 | 76 | version="\ |
| 68 | 77 | GNU config.sub ($timestamp) |
| 69 | 78 | |
| 70 | -Copyright 1992-2018 Free Software Foundation, Inc. | |
| 79 | +Copyright 1992-2023 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 |
| 80 | 89 | case $1 in |
| 81 | 90 | --time-stamp | --time* | -t ) |
| @@ -87,11 +96,11 @@ | ||
| 87 | 96 | -- ) # Stop option processing |
| 88 | 97 | shift; break ;; |
| 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*) |
| 96 | 105 | # First pass through any local machine types. |
| 97 | 106 | echo "$1" |
| @@ -108,1431 +117,1396 @@ | ||
| 108 | 117 | 1) ;; |
| 109 | 118 | *) echo "$me: too many arguments$help" >&2 |
| 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 | |
| 136 | - | |
| 137 | -### Let's recognize common machines as not being operating systems so | |
| 138 | -### that things like config.sub decstation-3100 work. We also | |
| 139 | -### recognize some manufacturers as not being operating systems, so we | |
| 140 | -### can provide default operating systems below. | |
| 141 | -case $os in | |
| 142 | - -sun*os*) | |
| 143 | - # Prevent following clause from handling this invalid input. | |
| 144 | - ;; | |
| 145 | - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
| 146 | - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
| 147 | - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
| 148 | - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
| 149 | - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
| 150 | - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
| 151 | - -apple | -axis | -knuth | -cray | -microblaze*) | |
| 152 | - os= | |
| 153 | - basic_machine=$1 | |
| 154 | - ;; | |
| 155 | - -bluegene*) | |
| 156 | - os=-cnk | |
| 157 | - ;; | |
| 158 | - -sim | -cisco | -oki | -wec | -winbond) | |
| 159 | - os= | |
| 160 | - basic_machine=$1 | |
| 161 | - ;; | |
| 162 | - -scout) | |
| 163 | - ;; | |
| 164 | - -wrs) | |
| 165 | - os=-vxworks | |
| 166 | - basic_machine=$1 | |
| 167 | - ;; | |
| 168 | - -chorusos*) | |
| 169 | - os=-chorusos | |
| 170 | - basic_machine=$1 | |
| 171 | - ;; | |
| 172 | - -chorusrdb) | |
| 173 | - os=-chorusrdb | |
| 174 | - basic_machine=$1 | |
| 175 | - ;; | |
| 176 | - -hiux*) | |
| 177 | - os=-hiuxwe2 | |
| 178 | - ;; | |
| 179 | - -sco6) | |
| 180 | - os=-sco5v6 | |
| 181 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 182 | - ;; | |
| 183 | - -sco5) | |
| 184 | - os=-sco3.2v5 | |
| 185 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 186 | - ;; | |
| 187 | - -sco4) | |
| 188 | - os=-sco3.2v4 | |
| 189 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 190 | - ;; | |
| 191 | - -sco3.2.[4-9]*) | |
| 192 | - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
| 193 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 194 | - ;; | |
| 195 | - -sco3.2v[4-9]*) | |
| 196 | - # Don't forget version if it is 3.2v4 or newer. | |
| 197 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 198 | - ;; | |
| 199 | - -sco5v6*) | |
| 200 | - # Don't forget version if it is 3.2v4 or newer. | |
| 201 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 202 | - ;; | |
| 203 | - -sco*) | |
| 204 | - os=-sco3.2v2 | |
| 205 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 206 | - ;; | |
| 207 | - -udk*) | |
| 208 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 209 | - ;; | |
| 210 | - -isc) | |
| 211 | - os=-isc2.2 | |
| 212 | - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` | |
| 213 | - ;; | |
| 214 | - -clix*) | |
| 215 | - basic_machine=clipper-intergraph | |
| 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 | |
| 238 | - ;; | |
| 239 | -esac | |
| 240 | - | |
| 241 | -# Decode aliases for certain CPU-COMPANY combinations. | |
| 242 | -case $basic_machine in | |
| 243 | - # Recognize the basic CPU types without company name. | |
| 244 | - # Some are omitted here because they have special meanings below. | |
| 245 | - 1750a | 580 \ | |
| 246 | - | a29k \ | |
| 247 | - | aarch64 | aarch64_be \ | |
| 248 | - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
| 249 | - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
| 250 | - | am33_2.0 \ | |
| 251 | - | arc | arceb \ | |
| 252 | - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | |
| 253 | - | avr | avr32 \ | |
| 254 | - | ba \ | |
| 255 | - | be32 | be64 \ | |
| 256 | - | bfin \ | |
| 257 | - | c4x | c8051 | clipper \ | |
| 258 | - | d10v | d30v | dlx | dsp16xx \ | |
| 259 | - | e2k | epiphany \ | |
| 260 | - | fido | fr30 | frv | ft32 \ | |
| 261 | - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
| 262 | - | hexagon \ | |
| 263 | - | i370 | i860 | i960 | ia16 | ia64 \ | |
| 264 | - | ip2k | iq2000 \ | |
| 265 | - | k1om \ | |
| 266 | - | le32 | le64 \ | |
| 267 | - | lm32 \ | |
| 268 | - | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
| 269 | - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | |
| 270 | - | mips | mipsbe | mipseb | mipsel | mipsle \ | |
| 271 | - | mips16 \ | |
| 272 | - | mips64 | mips64el \ | |
| 273 | - | mips64octeon | mips64octeonel \ | |
| 274 | - | mips64orion | mips64orionel \ | |
| 275 | - | mips64r5900 | mips64r5900el \ | |
| 276 | - | mips64vr | mips64vrel \ | |
| 277 | - | mips64vr4100 | mips64vr4100el \ | |
| 278 | - | mips64vr4300 | mips64vr4300el \ | |
| 279 | - | mips64vr5000 | mips64vr5000el \ | |
| 280 | - | mips64vr5900 | mips64vr5900el \ | |
| 281 | - | mipsisa32 | mipsisa32el \ | |
| 282 | - | mipsisa32r2 | mipsisa32r2el \ | |
| 283 | - | mipsisa32r6 | mipsisa32r6el \ | |
| 284 | - | mipsisa64 | mipsisa64el \ | |
| 285 | - | mipsisa64r2 | mipsisa64r2el \ | |
| 286 | - | mipsisa64r6 | mipsisa64r6el \ | |
| 287 | - | mipsisa64sb1 | mipsisa64sb1el \ | |
| 288 | - | mipsisa64sr71k | mipsisa64sr71kel \ | |
| 289 | - | mipsr5900 | mipsr5900el \ | |
| 290 | - | mipstx39 | mipstx39el \ | |
| 291 | - | mn10200 | mn10300 \ | |
| 292 | - | moxie \ | |
| 293 | - | mt \ | |
| 294 | - | msp430 \ | |
| 295 | - | nds32 | nds32le | nds32be \ | |
| 296 | - | nios | nios2 | nios2eb | nios2el \ | |
| 297 | - | ns16k | ns32k \ | |
| 298 | - | open8 | or1k | or1knd | or32 \ | |
| 299 | - | pdp10 | pj | pjl \ | |
| 300 | - | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
| 301 | - | pru \ | |
| 302 | - | pyramid \ | |
| 303 | - | riscv32 | riscv64 \ | |
| 304 | - | rl78 | rx \ | |
| 305 | - | score \ | |
| 306 | - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
| 307 | - | sh64 | sh64le \ | |
| 308 | - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
| 309 | - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
| 310 | - | spu \ | |
| 311 | - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
| 312 | - | ubicom32 \ | |
| 313 | - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | |
| 314 | - | visium \ | |
| 315 | - | wasm32 \ | |
| 316 | - | x86 | xc16x | xstormy16 | xtensa \ | |
| 317 | - | z8k | z80) | |
| 318 | - basic_machine=$basic_machine-unknown | |
| 319 | - ;; | |
| 320 | - c54x) | |
| 321 | - basic_machine=tic54x-unknown | |
| 322 | - ;; | |
| 323 | - c55x) | |
| 324 | - basic_machine=tic55x-unknown | |
| 325 | - ;; | |
| 326 | - c6x) | |
| 327 | - basic_machine=tic6x-unknown | |
| 328 | - ;; | |
| 329 | - leon|leon[3-9]) | |
| 330 | - basic_machine=sparc-$basic_machine | |
| 331 | - ;; | |
| 332 | - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) | |
| 333 | - basic_machine=$basic_machine-unknown | |
| 334 | - os=-none | |
| 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 | |
| 344 | - ;; | |
| 345 | - xgate) | |
| 346 | - basic_machine=$basic_machine-unknown | |
| 347 | - os=-none | |
| 348 | - ;; | |
| 349 | - xscaleeb) | |
| 350 | - basic_machine=armeb-unknown | |
| 351 | - ;; | |
| 352 | - | |
| 353 | - xscaleel) | |
| 354 | - basic_machine=armel-unknown | |
| 355 | - ;; | |
| 356 | - | |
| 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. | |
| 122 | +# Split fields of configuration type | |
| 123 | +# shellcheck disable=SC2162 | |
| 124 | +saved_IFS=$IFS | |
| 125 | +IFS="-" read field1 field2 field3 field4 <<EOF | |
| 126 | +$1 | |
| 127 | +EOF | |
| 128 | +IFS=$saved_IFS | |
| 129 | + | |
| 130 | +# Separate into logical components for further validation | |
| 131 | +case $1 in | |
| 132 | + *-*-*-*-*) | |
| 133 | + echo "Invalid configuration '$1': more than four components" >&2 | |
| 134 | + exit 1 | |
| 135 | + ;; | |
| 136 | + *-*-*-*) | |
| 137 | + basic_machine=$field1-$field2 | |
| 138 | + basic_os=$field3-$field4 | |
| 139 | + ;; | |
| 364 | 140 | *-*-*) |
| 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 | - ;; | |
| 141 | + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two | |
| 142 | + # parts | |
| 143 | + maybe_os=$field2-$field3 | |
| 144 | + case $maybe_os in | |
| 145 | + nto-qnx* | linux-* | uclinux-uclibc* \ | |
| 146 | + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | |
| 147 | + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | |
| 148 | + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ | |
| 149 | + | windows-* ) | |
| 150 | + basic_machine=$field1 | |
| 151 | + basic_os=$maybe_os | |
| 152 | + ;; | |
| 153 | + android-linux) | |
| 154 | + basic_machine=$field1-unknown | |
| 155 | + basic_os=linux-android | |
| 156 | + ;; | |
| 157 | + *) | |
| 158 | + basic_machine=$field1-$field2 | |
| 159 | + basic_os=$field3 | |
| 160 | + ;; | |
| 161 | + esac | |
| 162 | + ;; | |
| 163 | + *-*) | |
| 164 | + # A lone config we happen to match not fitting any pattern | |
| 165 | + case $field1-$field2 in | |
| 166 | + decstation-3100) | |
| 167 | + basic_machine=mips-dec | |
| 168 | + basic_os= | |
| 169 | + ;; | |
| 170 | + *-*) | |
| 171 | + # Second component is usually, but not always the OS | |
| 172 | + case $field2 in | |
| 173 | + # Prevent following clause from handling this valid os | |
| 174 | + sun*os*) | |
| 175 | + basic_machine=$field1 | |
| 176 | + basic_os=$field2 | |
| 177 | + ;; | |
| 178 | + zephyr*) | |
| 179 | + basic_machine=$field1-unknown | |
| 180 | + basic_os=$field2 | |
| 181 | + ;; | |
| 182 | + # Manufacturers | |
| 183 | + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | |
| 184 | + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | |
| 185 | + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | |
| 186 | + | convergent* | ncr* | news | 32* | 3600* | 3100* \ | |
| 187 | + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | |
| 188 | + | ultra | tti* | harris | dolphin | highlevel | gould \ | |
| 189 | + | cbm | ns | masscomp | apple | axis | knuth | cray \ | |
| 190 | + | microblaze* | sim | cisco \ | |
| 191 | + | oki | wec | wrs | winbond) | |
| 192 | + basic_machine=$field1-$field2 | |
| 193 | + basic_os= | |
| 194 | + ;; | |
| 195 | + *) | |
| 196 | + basic_machine=$field1 | |
| 197 | + basic_os=$field2 | |
| 198 | + ;; | |
| 199 | + esac | |
| 200 | + ;; | |
| 201 | + esac | |
| 202 | + ;; | |
| 203 | + *) | |
| 204 | + # Convert single-component short-hands not valid as part of | |
| 205 | + # multi-component configurations. | |
| 206 | + case $field1 in | |
| 207 | + 386bsd) | |
| 208 | + basic_machine=i386-pc | |
| 209 | + basic_os=bsd | |
| 210 | + ;; | |
| 211 | + a29khif) | |
| 212 | + basic_machine=a29k-amd | |
| 213 | + basic_os=udi | |
| 214 | + ;; | |
| 215 | + adobe68k) | |
| 216 | + basic_machine=m68010-adobe | |
| 217 | + basic_os=scout | |
| 218 | + ;; | |
| 219 | + alliant) | |
| 220 | + basic_machine=fx80-alliant | |
| 221 | + basic_os= | |
| 222 | + ;; | |
| 223 | + altos | altos3068) | |
| 224 | + basic_machine=m68k-altos | |
| 225 | + basic_os= | |
| 226 | + ;; | |
| 227 | + am29k) | |
| 228 | + basic_machine=a29k-none | |
| 229 | + basic_os=bsd | |
| 230 | + ;; | |
| 231 | + amdahl) | |
| 232 | + basic_machine=580-amdahl | |
| 233 | + basic_os=sysv | |
| 234 | + ;; | |
| 235 | + amiga) | |
| 236 | + basic_machine=m68k-unknown | |
| 237 | + basic_os= | |
| 238 | + ;; | |
| 239 | + amigaos | amigados) | |
| 240 | + basic_machine=m68k-unknown | |
| 241 | + basic_os=amigaos | |
| 242 | + ;; | |
| 243 | + amigaunix | amix) | |
| 244 | + basic_machine=m68k-unknown | |
| 245 | + basic_os=sysv4 | |
| 246 | + ;; | |
| 247 | + apollo68) | |
| 248 | + basic_machine=m68k-apollo | |
| 249 | + basic_os=sysv | |
| 250 | + ;; | |
| 251 | + apollo68bsd) | |
| 252 | + basic_machine=m68k-apollo | |
| 253 | + basic_os=bsd | |
| 254 | + ;; | |
| 255 | + aros) | |
| 256 | + basic_machine=i386-pc | |
| 257 | + basic_os=aros | |
| 258 | + ;; | |
| 259 | + aux) | |
| 260 | + basic_machine=m68k-apple | |
| 261 | + basic_os=aux | |
| 262 | + ;; | |
| 263 | + balance) | |
| 264 | + basic_machine=ns32k-sequent | |
| 265 | + basic_os=dynix | |
| 266 | + ;; | |
| 267 | + blackfin) | |
| 268 | + basic_machine=bfin-unknown | |
| 269 | + basic_os=linux | |
| 270 | + ;; | |
| 271 | + cegcc) | |
| 272 | + basic_machine=arm-unknown | |
| 273 | + basic_os=cegcc | |
| 274 | + ;; | |
| 275 | + convex-c1) | |
| 276 | + basic_machine=c1-convex | |
| 277 | + basic_os=bsd | |
| 278 | + ;; | |
| 279 | + convex-c2) | |
| 280 | + basic_machine=c2-convex | |
| 281 | + basic_os=bsd | |
| 282 | + ;; | |
| 283 | + convex-c32) | |
| 284 | + basic_machine=c32-convex | |
| 285 | + basic_os=bsd | |
| 286 | + ;; | |
| 287 | + convex-c34) | |
| 288 | + basic_machine=c34-convex | |
| 289 | + basic_os=bsd | |
| 290 | + ;; | |
| 291 | + convex-c38) | |
| 292 | + basic_machine=c38-convex | |
| 293 | + basic_os=bsd | |
| 294 | + ;; | |
| 295 | + cray) | |
| 296 | + basic_machine=j90-cray | |
| 297 | + basic_os=unicos | |
| 298 | + ;; | |
| 299 | + crds | unos) | |
| 300 | + basic_machine=m68k-crds | |
| 301 | + basic_os= | |
| 302 | + ;; | |
| 303 | + da30) | |
| 304 | + basic_machine=m68k-da30 | |
| 305 | + basic_os= | |
| 306 | + ;; | |
| 307 | + decstation | pmax | pmin | dec3100 | decstatn) | |
| 308 | + basic_machine=mips-dec | |
| 309 | + basic_os= | |
| 310 | + ;; | |
| 311 | + delta88) | |
| 312 | + basic_machine=m88k-motorola | |
| 313 | + basic_os=sysv3 | |
| 314 | + ;; | |
| 315 | + dicos) | |
| 316 | + basic_machine=i686-pc | |
| 317 | + basic_os=dicos | |
| 318 | + ;; | |
| 319 | + djgpp) | |
| 320 | + basic_machine=i586-pc | |
| 321 | + basic_os=msdosdjgpp | |
| 322 | + ;; | |
| 323 | + ebmon29k) | |
| 324 | + basic_machine=a29k-amd | |
| 325 | + basic_os=ebmon | |
| 326 | + ;; | |
| 327 | + es1800 | OSE68k | ose68k | ose | OSE) | |
| 328 | + basic_machine=m68k-ericsson | |
| 329 | + basic_os=ose | |
| 330 | + ;; | |
| 331 | + gmicro) | |
| 332 | + basic_machine=tron-gmicro | |
| 333 | + basic_os=sysv | |
| 334 | + ;; | |
| 335 | + go32) | |
| 336 | + basic_machine=i386-pc | |
| 337 | + basic_os=go32 | |
| 338 | + ;; | |
| 339 | + h8300hms) | |
| 340 | + basic_machine=h8300-hitachi | |
| 341 | + basic_os=hms | |
| 342 | + ;; | |
| 343 | + h8300xray) | |
| 344 | + basic_machine=h8300-hitachi | |
| 345 | + basic_os=xray | |
| 346 | + ;; | |
| 347 | + h8500hms) | |
| 348 | + basic_machine=h8500-hitachi | |
| 349 | + basic_os=hms | |
| 350 | + ;; | |
| 351 | + harris) | |
| 352 | + basic_machine=m88k-harris | |
| 353 | + basic_os=sysv3 | |
| 354 | + ;; | |
| 355 | + hp300 | hp300hpux) | |
| 356 | + basic_machine=m68k-hp | |
| 357 | + basic_os=hpux | |
| 358 | + ;; | |
| 359 | + hp300bsd) | |
| 360 | + basic_machine=m68k-hp | |
| 361 | + basic_os=bsd | |
| 362 | + ;; | |
| 363 | + hppaosf) | |
| 364 | + basic_machine=hppa1.1-hp | |
| 365 | + basic_os=osf | |
| 366 | + ;; | |
| 367 | + hppro) | |
| 368 | + basic_machine=hppa1.1-hp | |
| 369 | + basic_os=proelf | |
| 370 | + ;; | |
| 371 | + i386mach) | |
| 372 | + basic_machine=i386-mach | |
| 373 | + basic_os=mach | |
| 374 | + ;; | |
| 375 | + isi68 | isi) | |
| 376 | + basic_machine=m68k-isi | |
| 377 | + basic_os=sysv | |
| 378 | + ;; | |
| 379 | + m68knommu) | |
| 380 | + basic_machine=m68k-unknown | |
| 381 | + basic_os=linux | |
| 382 | + ;; | |
| 383 | + magnum | m3230) | |
| 384 | + basic_machine=mips-mips | |
| 385 | + basic_os=sysv | |
| 386 | + ;; | |
| 387 | + merlin) | |
| 388 | + basic_machine=ns32k-utek | |
| 389 | + basic_os=sysv | |
| 390 | + ;; | |
| 391 | + mingw64) | |
| 392 | + basic_machine=x86_64-pc | |
| 393 | + basic_os=mingw64 | |
| 394 | + ;; | |
| 395 | + mingw32) | |
| 396 | + basic_machine=i686-pc | |
| 397 | + basic_os=mingw32 | |
| 398 | + ;; | |
| 399 | + mingw32ce) | |
| 400 | + basic_machine=arm-unknown | |
| 401 | + basic_os=mingw32ce | |
| 402 | + ;; | |
| 403 | + monitor) | |
| 404 | + basic_machine=m68k-rom68k | |
| 405 | + basic_os=coff | |
| 406 | + ;; | |
| 407 | + morphos) | |
| 408 | + basic_machine=powerpc-unknown | |
| 409 | + basic_os=morphos | |
| 410 | + ;; | |
| 411 | + moxiebox) | |
| 412 | + basic_machine=moxie-unknown | |
| 413 | + basic_os=moxiebox | |
| 414 | + ;; | |
| 415 | + msdos) | |
| 416 | + basic_machine=i386-pc | |
| 417 | + basic_os=msdos | |
| 418 | + ;; | |
| 419 | + msys) | |
| 420 | + basic_machine=i686-pc | |
| 421 | + basic_os=msys | |
| 422 | + ;; | |
| 423 | + mvs) | |
| 424 | + basic_machine=i370-ibm | |
| 425 | + basic_os=mvs | |
| 426 | + ;; | |
| 427 | + nacl) | |
| 428 | + basic_machine=le32-unknown | |
| 429 | + basic_os=nacl | |
| 430 | + ;; | |
| 431 | + ncr3000) | |
| 432 | + basic_machine=i486-ncr | |
| 433 | + basic_os=sysv4 | |
| 434 | + ;; | |
| 435 | + netbsd386) | |
| 436 | + basic_machine=i386-pc | |
| 437 | + basic_os=netbsd | |
| 438 | + ;; | |
| 439 | + netwinder) | |
| 440 | + basic_machine=armv4l-rebel | |
| 441 | + basic_os=linux | |
| 442 | + ;; | |
| 443 | + news | news700 | news800 | news900) | |
| 444 | + basic_machine=m68k-sony | |
| 445 | + basic_os=newsos | |
| 446 | + ;; | |
| 447 | + news1000) | |
| 448 | + basic_machine=m68030-sony | |
| 449 | + basic_os=newsos | |
| 450 | + ;; | |
| 451 | + necv70) | |
| 452 | + basic_machine=v70-nec | |
| 453 | + basic_os=sysv | |
| 454 | + ;; | |
| 455 | + nh3000) | |
| 456 | + basic_machine=m68k-harris | |
| 457 | + basic_os=cxux | |
| 458 | + ;; | |
| 459 | + nh[45]000) | |
| 460 | + basic_machine=m88k-harris | |
| 461 | + basic_os=cxux | |
| 462 | + ;; | |
| 463 | + nindy960) | |
| 464 | + basic_machine=i960-intel | |
| 465 | + basic_os=nindy | |
| 466 | + ;; | |
| 467 | + mon960) | |
| 468 | + basic_machine=i960-intel | |
| 469 | + basic_os=mon960 | |
| 470 | + ;; | |
| 471 | + nonstopux) | |
| 472 | + basic_machine=mips-compaq | |
| 473 | + basic_os=nonstopux | |
| 474 | + ;; | |
| 475 | + os400) | |
| 476 | + basic_machine=powerpc-ibm | |
| 477 | + basic_os=os400 | |
| 478 | + ;; | |
| 479 | + OSE68000 | ose68000) | |
| 480 | + basic_machine=m68000-ericsson | |
| 481 | + basic_os=ose | |
| 482 | + ;; | |
| 483 | + os68k) | |
| 484 | + basic_machine=m68k-none | |
| 485 | + basic_os=os68k | |
| 486 | + ;; | |
| 487 | + paragon) | |
| 488 | + basic_machine=i860-intel | |
| 489 | + basic_os=osf | |
| 490 | + ;; | |
| 491 | + parisc) | |
| 492 | + basic_machine=hppa-unknown | |
| 493 | + basic_os=linux | |
| 494 | + ;; | |
| 495 | + psp) | |
| 496 | + basic_machine=mipsallegrexel-sony | |
| 497 | + basic_os=psp | |
| 498 | + ;; | |
| 499 | + pw32) | |
| 500 | + basic_machine=i586-unknown | |
| 501 | + basic_os=pw32 | |
| 502 | + ;; | |
| 503 | + rdos | rdos64) | |
| 504 | + basic_machine=x86_64-pc | |
| 505 | + basic_os=rdos | |
| 506 | + ;; | |
| 507 | + rdos32) | |
| 508 | + basic_machine=i386-pc | |
| 509 | + basic_os=rdos | |
| 510 | + ;; | |
| 511 | + rom68k) | |
| 512 | + basic_machine=m68k-rom68k | |
| 513 | + basic_os=coff | |
| 514 | + ;; | |
| 515 | + sa29200) | |
| 516 | + basic_machine=a29k-amd | |
| 517 | + basic_os=udi | |
| 518 | + ;; | |
| 519 | + sei) | |
| 520 | + basic_machine=mips-sei | |
| 521 | + basic_os=seiux | |
| 522 | + ;; | |
| 523 | + sequent) | |
| 524 | + basic_machine=i386-sequent | |
| 525 | + basic_os= | |
| 526 | + ;; | |
| 527 | + sps7) | |
| 528 | + basic_machine=m68k-bull | |
| 529 | + basic_os=sysv2 | |
| 530 | + ;; | |
| 531 | + st2000) | |
| 532 | + basic_machine=m68k-tandem | |
| 533 | + basic_os= | |
| 534 | + ;; | |
| 535 | + stratus) | |
| 536 | + basic_machine=i860-stratus | |
| 537 | + basic_os=sysv4 | |
| 538 | + ;; | |
| 539 | + sun2) | |
| 540 | + basic_machine=m68000-sun | |
| 541 | + basic_os= | |
| 542 | + ;; | |
| 543 | + sun2os3) | |
| 544 | + basic_machine=m68000-sun | |
| 545 | + basic_os=sunos3 | |
| 546 | + ;; | |
| 547 | + sun2os4) | |
| 548 | + basic_machine=m68000-sun | |
| 549 | + basic_os=sunos4 | |
| 550 | + ;; | |
| 551 | + sun3) | |
| 552 | + basic_machine=m68k-sun | |
| 553 | + basic_os= | |
| 554 | + ;; | |
| 555 | + sun3os3) | |
| 556 | + basic_machine=m68k-sun | |
| 557 | + basic_os=sunos3 | |
| 558 | + ;; | |
| 559 | + sun3os4) | |
| 560 | + basic_machine=m68k-sun | |
| 561 | + basic_os=sunos4 | |
| 562 | + ;; | |
| 563 | + sun4) | |
| 564 | + basic_machine=sparc-sun | |
| 565 | + basic_os= | |
| 566 | + ;; | |
| 567 | + sun4os3) | |
| 568 | + basic_machine=sparc-sun | |
| 569 | + basic_os=sunos3 | |
| 570 | + ;; | |
| 571 | + sun4os4) | |
| 572 | + basic_machine=sparc-sun | |
| 573 | + basic_os=sunos4 | |
| 574 | + ;; | |
| 575 | + sun4sol2) | |
| 576 | + basic_machine=sparc-sun | |
| 577 | + basic_os=solaris2 | |
| 578 | + ;; | |
| 579 | + sun386 | sun386i | roadrunner) | |
| 580 | + basic_machine=i386-sun | |
| 581 | + basic_os= | |
| 582 | + ;; | |
| 583 | + sv1) | |
| 584 | + basic_machine=sv1-cray | |
| 585 | + basic_os=unicos | |
| 586 | + ;; | |
| 587 | + symmetry) | |
| 588 | + basic_machine=i386-sequent | |
| 589 | + basic_os=dynix | |
| 590 | + ;; | |
| 591 | + t3e) | |
| 592 | + basic_machine=alphaev5-cray | |
| 593 | + basic_os=unicos | |
| 594 | + ;; | |
| 595 | + t90) | |
| 596 | + basic_machine=t90-cray | |
| 597 | + basic_os=unicos | |
| 598 | + ;; | |
| 599 | + toad1) | |
| 600 | + basic_machine=pdp10-xkl | |
| 601 | + basic_os=tops20 | |
| 602 | + ;; | |
| 603 | + tpf) | |
| 604 | + basic_machine=s390x-ibm | |
| 605 | + basic_os=tpf | |
| 606 | + ;; | |
| 607 | + udi29k) | |
| 608 | + basic_machine=a29k-amd | |
| 609 | + basic_os=udi | |
| 610 | + ;; | |
| 611 | + ultra3) | |
| 612 | + basic_machine=a29k-nyu | |
| 613 | + basic_os=sym1 | |
| 614 | + ;; | |
| 615 | + v810 | necv810) | |
| 616 | + basic_machine=v810-nec | |
| 617 | + basic_os=none | |
| 618 | + ;; | |
| 619 | + vaxv) | |
| 620 | + basic_machine=vax-dec | |
| 621 | + basic_os=sysv | |
| 622 | + ;; | |
| 623 | + vms) | |
| 624 | + basic_machine=vax-dec | |
| 625 | + basic_os=vms | |
| 626 | + ;; | |
| 627 | + vsta) | |
| 628 | + basic_machine=i386-pc | |
| 629 | + basic_os=vsta | |
| 630 | + ;; | |
| 631 | + vxworks960) | |
| 632 | + basic_machine=i960-wrs | |
| 633 | + basic_os=vxworks | |
| 634 | + ;; | |
| 635 | + vxworks68) | |
| 636 | + basic_machine=m68k-wrs | |
| 637 | + basic_os=vxworks | |
| 638 | + ;; | |
| 639 | + vxworks29k) | |
| 640 | + basic_machine=a29k-wrs | |
| 641 | + basic_os=vxworks | |
| 642 | + ;; | |
| 643 | + xbox) | |
| 644 | + basic_machine=i686-pc | |
| 645 | + basic_os=mingw32 | |
| 646 | + ;; | |
| 647 | + ymp) | |
| 648 | + basic_machine=ymp-cray | |
| 649 | + basic_os=unicos | |
| 650 | + ;; | |
| 651 | + *) | |
| 652 | + basic_machine=$1 | |
| 653 | + basic_os= | |
| 654 | + ;; | |
| 655 | + esac | |
| 656 | + ;; | |
| 657 | +esac | |
| 658 | + | |
| 659 | +# Decode 1-component or ad-hoc basic machines | |
| 660 | +case $basic_machine in | |
| 661 | + # Here we handle the default manufacturer of certain CPU types. It is in | |
| 662 | + # some cases the only manufacturer, in others, it is the most popular. | |
| 663 | + w89k) | |
| 664 | + cpu=hppa1.1 | |
| 665 | + vendor=winbond | |
| 666 | + ;; | |
| 667 | + op50n) | |
| 668 | + cpu=hppa1.1 | |
| 669 | + vendor=oki | |
| 670 | + ;; | |
| 671 | + op60c) | |
| 672 | + cpu=hppa1.1 | |
| 673 | + vendor=oki | |
| 674 | + ;; | |
| 675 | + ibm*) | |
| 676 | + cpu=i370 | |
| 677 | + vendor=ibm | |
| 678 | + ;; | |
| 679 | + orion105) | |
| 680 | + cpu=clipper | |
| 681 | + vendor=highlevel | |
| 682 | + ;; | |
| 683 | + mac | mpw | mac-mpw) | |
| 684 | + cpu=m68k | |
| 685 | + vendor=apple | |
| 686 | + ;; | |
| 687 | + pmac | pmac-mpw) | |
| 688 | + cpu=powerpc | |
| 689 | + vendor=apple | |
| 690 | + ;; | |
| 691 | + | |
| 457 | 692 | # Recognize the various machine names and aliases which stand |
| 458 | 693 | # for a CPU type and a company and sometimes even an OS. |
| 459 | - 386bsd) | |
| 460 | - basic_machine=i386-pc | |
| 461 | - os=-bsd | |
| 462 | - ;; | |
| 463 | 694 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
| 464 | - basic_machine=m68000-att | |
| 695 | + cpu=m68000 | |
| 696 | + vendor=att | |
| 465 | 697 | ;; |
| 466 | 698 | 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 | |
| 699 | + cpu=we32k | |
| 700 | + vendor=att | |
| 541 | 701 | ;; |
| 542 | 702 | 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 | |
| 703 | + cpu=powerpc | |
| 704 | + vendor=ibm | |
| 705 | + basic_os=cnk | |
| 613 | 706 | ;; |
| 614 | 707 | decsystem10* | dec10*) |
| 615 | - basic_machine=pdp10-dec | |
| 616 | - os=-tops10 | |
| 708 | + cpu=pdp10 | |
| 709 | + vendor=dec | |
| 710 | + basic_os=tops10 | |
| 617 | 711 | ;; |
| 618 | 712 | decsystem20* | dec20*) |
| 619 | - basic_machine=pdp10-dec | |
| 620 | - os=-tops20 | |
| 713 | + cpu=pdp10 | |
| 714 | + vendor=dec | |
| 715 | + basic_os=tops20 | |
| 621 | 716 | ;; |
| 622 | 717 | delta | 3300 | motorola-3300 | motorola-delta \ |
| 623 | 718 | | 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 | |
| 719 | + cpu=m68k | |
| 720 | + vendor=motorola | |
| 641 | 721 | ;; |
| 642 | 722 | dpx2*) |
| 643 | - basic_machine=m68k-bull | |
| 644 | - os=-sysv3 | |
| 645 | - ;; | |
| 646 | - e500v[12]) | |
| 647 | - basic_machine=powerpc-unknown | |
| 648 | - os=$os"spe" | |
| 649 | - ;; | |
| 650 | - e500v[12]-*) | |
| 651 | - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 652 | - os=$os"spe" | |
| 653 | - ;; | |
| 654 | - ebmon29k) | |
| 655 | - basic_machine=a29k-amd | |
| 656 | - os=-ebmon | |
| 723 | + cpu=m68k | |
| 724 | + vendor=bull | |
| 725 | + basic_os=sysv3 | |
| 726 | + ;; | |
| 727 | + encore | umax | mmax) | |
| 728 | + cpu=ns32k | |
| 729 | + vendor=encore | |
| 657 | 730 | ;; |
| 658 | 731 | elxsi) |
| 659 | - basic_machine=elxsi-elxsi | |
| 660 | - os=-bsd | |
| 661 | - ;; | |
| 662 | - encore | umax | mmax) | |
| 663 | - basic_machine=ns32k-encore | |
| 664 | - ;; | |
| 665 | - es1800 | OSE68k | ose68k | ose | OSE) | |
| 666 | - basic_machine=m68k-ericsson | |
| 667 | - os=-ose | |
| 732 | + cpu=elxsi | |
| 733 | + vendor=elxsi | |
| 734 | + basic_os=${basic_os:-bsd} | |
| 668 | 735 | ;; |
| 669 | 736 | fx2800) |
| 670 | - basic_machine=i860-alliant | |
| 737 | + cpu=i860 | |
| 738 | + vendor=alliant | |
| 671 | 739 | ;; |
| 672 | 740 | 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 | |
| 741 | + cpu=ns32k | |
| 742 | + vendor=ns | |
| 682 | 743 | ;; |
| 683 | 744 | 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 | |
| 745 | + cpu=hppa1.1 | |
| 746 | + vendor=hitachi | |
| 747 | + basic_os=hiuxwe2 | |
| 713 | 748 | ;; |
| 714 | 749 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
| 715 | - basic_machine=hppa1.0-hp | |
| 750 | + cpu=hppa1.0 | |
| 751 | + vendor=hp | |
| 716 | 752 | ;; |
| 717 | 753 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
| 718 | - basic_machine=m68000-hp | |
| 754 | + cpu=m68000 | |
| 755 | + vendor=hp | |
| 719 | 756 | ;; |
| 720 | 757 | hp9k3[2-9][0-9]) |
| 721 | - basic_machine=m68k-hp | |
| 758 | + cpu=m68k | |
| 759 | + vendor=hp | |
| 722 | 760 | ;; |
| 723 | 761 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
| 724 | - basic_machine=hppa1.0-hp | |
| 762 | + cpu=hppa1.0 | |
| 763 | + vendor=hp | |
| 725 | 764 | ;; |
| 726 | 765 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
| 727 | - basic_machine=hppa1.1-hp | |
| 766 | + cpu=hppa1.1 | |
| 767 | + vendor=hp | |
| 728 | 768 | ;; |
| 729 | 769 | hp9k78[0-9] | hp78[0-9]) |
| 730 | 770 | # FIXME: really hppa2.0-hp |
| 731 | - basic_machine=hppa1.1-hp | |
| 732 | - ;; | |
| 733 | - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
| 734 | - # FIXME: really hppa2.0-hp | |
| 735 | - basic_machine=hppa1.1-hp | |
| 736 | - ;; | |
| 737 | - hp9k8[0-9][13679] | hp8[0-9][13679]) | |
| 738 | - basic_machine=hppa1.1-hp | |
| 739 | - ;; | |
| 740 | - 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 | |
| 753 | - ;; | |
| 754 | - i*86v32) | |
| 755 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
| 756 | - os=-sysv32 | |
| 757 | - ;; | |
| 758 | - i*86v4*) | |
| 759 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
| 760 | - os=-sysv4 | |
| 761 | - ;; | |
| 762 | - i*86v) | |
| 763 | - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` | |
| 764 | - os=-sysv | |
| 765 | - ;; | |
| 766 | - 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 | |
| 773 | - ;; | |
| 774 | - vsta) | |
| 775 | - basic_machine=i386-unknown | |
| 776 | - os=-vsta | |
| 777 | - ;; | |
| 778 | - iris | iris4d) | |
| 779 | - basic_machine=mips-sgi | |
| 780 | - case $os in | |
| 781 | - -irix*) | |
| 782 | - ;; | |
| 783 | - *) | |
| 784 | - os=-irix4 | |
| 785 | - ;; | |
| 786 | - esac | |
| 787 | - ;; | |
| 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 | - miniframe) | |
| 827 | - basic_machine=m68000-convergent | |
| 828 | - ;; | |
| 829 | - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
| 830 | - basic_machine=m68k-atari | |
| 831 | - os=-mint | |
| 832 | - ;; | |
| 833 | - mips3*-*) | |
| 834 | - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` | |
| 835 | - ;; | |
| 836 | - mips3*) | |
| 837 | - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown | |
| 838 | - ;; | |
| 839 | - monitor) | |
| 840 | - basic_machine=m68k-rom68k | |
| 841 | - os=-coff | |
| 842 | - ;; | |
| 843 | - morphos) | |
| 844 | - basic_machine=powerpc-unknown | |
| 845 | - os=-morphos | |
| 846 | - ;; | |
| 847 | - moxiebox) | |
| 848 | - basic_machine=moxie-unknown | |
| 849 | - os=-moxiebox | |
| 850 | - ;; | |
| 851 | - msdos) | |
| 852 | - basic_machine=i386-pc | |
| 853 | - os=-msdos | |
| 854 | - ;; | |
| 855 | - ms1-*) | |
| 856 | - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` | |
| 857 | - ;; | |
| 858 | - msys) | |
| 859 | - basic_machine=i686-pc | |
| 860 | - os=-msys | |
| 861 | - ;; | |
| 862 | - mvs) | |
| 863 | - basic_machine=i370-ibm | |
| 864 | - os=-mvs | |
| 865 | - ;; | |
| 866 | - nacl) | |
| 867 | - basic_machine=le32-unknown | |
| 868 | - os=-nacl | |
| 869 | - ;; | |
| 870 | - ncr3000) | |
| 871 | - basic_machine=i486-ncr | |
| 872 | - os=-sysv4 | |
| 873 | - ;; | |
| 874 | - netbsd386) | |
| 875 | - basic_machine=i386-unknown | |
| 876 | - os=-netbsd | |
| 877 | - ;; | |
| 878 | - netwinder) | |
| 879 | - basic_machine=armv4l-rebel | |
| 880 | - os=-linux | |
| 881 | - ;; | |
| 882 | - news | news700 | news800 | news900) | |
| 883 | - basic_machine=m68k-sony | |
| 884 | - os=-newsos | |
| 885 | - ;; | |
| 886 | - news1000) | |
| 887 | - basic_machine=m68030-sony | |
| 888 | - os=-newsos | |
| 889 | - ;; | |
| 890 | - news-3600 | risc-news) | |
| 891 | - basic_machine=mips-sony | |
| 892 | - os=-newsos | |
| 893 | - ;; | |
| 894 | - necv70) | |
| 895 | - basic_machine=v70-nec | |
| 896 | - os=-sysv | |
| 897 | - ;; | |
| 898 | - 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 | |
| 914 | - ;; | |
| 915 | - nh[45]000) | |
| 916 | - basic_machine=m88k-harris | |
| 917 | - os=-cxux | |
| 918 | - ;; | |
| 919 | - nindy960) | |
| 920 | - basic_machine=i960-intel | |
| 921 | - os=-nindy | |
| 922 | - ;; | |
| 923 | - mon960) | |
| 924 | - basic_machine=i960-intel | |
| 925 | - os=-mon960 | |
| 926 | - ;; | |
| 927 | - nonstopux) | |
| 928 | - basic_machine=mips-compaq | |
| 929 | - os=-nonstopux | |
| 930 | - ;; | |
| 931 | - np1) | |
| 932 | - basic_machine=np1-gould | |
| 933 | - ;; | |
| 934 | - neo-tandem) | |
| 935 | - basic_machine=neo-tandem | |
| 936 | - ;; | |
| 937 | - nse-tandem) | |
| 938 | - basic_machine=nse-tandem | |
| 939 | - ;; | |
| 940 | - nsr-tandem) | |
| 941 | - basic_machine=nsr-tandem | |
| 942 | - ;; | |
| 943 | - nsv-tandem) | |
| 944 | - basic_machine=nsv-tandem | |
| 945 | - ;; | |
| 946 | - nsx-tandem) | |
| 947 | - basic_machine=nsx-tandem | |
| 948 | - ;; | |
| 949 | - op50n-* | op60c-*) | |
| 950 | - basic_machine=hppa1.1-oki | |
| 951 | - os=-proelf | |
| 952 | - ;; | |
| 953 | - openrisc | openrisc-*) | |
| 954 | - basic_machine=or32-unknown | |
| 955 | - ;; | |
| 956 | - os400) | |
| 957 | - basic_machine=powerpc-ibm | |
| 958 | - os=-os400 | |
| 959 | - ;; | |
| 960 | - OSE68000 | ose68000) | |
| 961 | - basic_machine=m68000-ericsson | |
| 962 | - os=-ose | |
| 963 | - ;; | |
| 964 | - os68k) | |
| 965 | - basic_machine=m68k-none | |
| 966 | - os=-os68k | |
| 967 | - ;; | |
| 968 | - pa-hitachi) | |
| 969 | - basic_machine=hppa1.1-hitachi | |
| 970 | - os=-hiuxwe2 | |
| 971 | - ;; | |
| 972 | - paragon) | |
| 973 | - basic_machine=i860-intel | |
| 974 | - os=-osf | |
| 975 | - ;; | |
| 976 | - parisc) | |
| 977 | - basic_machine=hppa-unknown | |
| 978 | - os=-linux | |
| 979 | - ;; | |
| 980 | - parisc-*) | |
| 981 | - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 982 | - os=-linux | |
| 983 | - ;; | |
| 984 | - pbd) | |
| 985 | - basic_machine=sparc-tti | |
| 986 | - ;; | |
| 987 | - pbb) | |
| 988 | - basic_machine=m68k-tti | |
| 989 | - ;; | |
| 990 | - pc532 | pc532-*) | |
| 991 | - basic_machine=ns32k-pc532 | |
| 992 | - ;; | |
| 993 | - pc98) | |
| 994 | - basic_machine=i386-pc | |
| 995 | - ;; | |
| 996 | - pc98-*) | |
| 997 | - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 998 | - ;; | |
| 999 | - pentium | p5 | k5 | k6 | nexgen | viac3) | |
| 1000 | - basic_machine=i586-pc | |
| 1001 | - ;; | |
| 1002 | - pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
| 1003 | - basic_machine=i686-pc | |
| 1004 | - ;; | |
| 1005 | - pentiumii | pentium2 | pentiumiii | pentium3) | |
| 1006 | - basic_machine=i686-pc | |
| 1007 | - ;; | |
| 1008 | - pentium4) | |
| 1009 | - basic_machine=i786-pc | |
| 1010 | - ;; | |
| 1011 | - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
| 1012 | - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1013 | - ;; | |
| 1014 | - pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
| 1015 | - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1016 | - ;; | |
| 1017 | - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
| 1018 | - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1019 | - ;; | |
| 1020 | - pentium4-*) | |
| 1021 | - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1022 | - ;; | |
| 1023 | - pn) | |
| 1024 | - basic_machine=pn-gould | |
| 1025 | - ;; | |
| 1026 | - power) basic_machine=power-ibm | |
| 1027 | - ;; | |
| 1028 | - ppc | ppcbe) basic_machine=powerpc-unknown | |
| 1029 | - ;; | |
| 1030 | - ppc-* | ppcbe-*) | |
| 1031 | - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1032 | - ;; | |
| 1033 | - ppcle | powerpclittle) | |
| 1034 | - basic_machine=powerpcle-unknown | |
| 1035 | - ;; | |
| 1036 | - ppcle-* | powerpclittle-*) | |
| 1037 | - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1038 | - ;; | |
| 1039 | - ppc64) basic_machine=powerpc64-unknown | |
| 1040 | - ;; | |
| 1041 | - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1042 | - ;; | |
| 1043 | - ppc64le | powerpc64little) | |
| 1044 | - basic_machine=powerpc64le-unknown | |
| 1045 | - ;; | |
| 1046 | - ppc64le-* | powerpc64little-*) | |
| 1047 | - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1048 | - ;; | |
| 1049 | - ps2) | |
| 1050 | - basic_machine=i386-ibm | |
| 1051 | - ;; | |
| 1052 | - pw32) | |
| 1053 | - basic_machine=i586-unknown | |
| 1054 | - os=-pw32 | |
| 1055 | - ;; | |
| 1056 | - rdos | rdos64) | |
| 1057 | - basic_machine=x86_64-pc | |
| 1058 | - os=-rdos | |
| 1059 | - ;; | |
| 1060 | - rdos32) | |
| 1061 | - basic_machine=i386-pc | |
| 1062 | - os=-rdos | |
| 1063 | - ;; | |
| 1064 | - rom68k) | |
| 1065 | - basic_machine=m68k-rom68k | |
| 1066 | - os=-coff | |
| 1067 | - ;; | |
| 1068 | - rm[46]00) | |
| 1069 | - basic_machine=mips-siemens | |
| 1070 | - ;; | |
| 1071 | - rtpc | rtpc-*) | |
| 1072 | - basic_machine=romp-ibm | |
| 1073 | - ;; | |
| 1074 | - s390 | s390-*) | |
| 1075 | - basic_machine=s390-ibm | |
| 1076 | - ;; | |
| 1077 | - s390x | s390x-*) | |
| 1078 | - basic_machine=s390x-ibm | |
| 1079 | - ;; | |
| 1080 | - sa29200) | |
| 1081 | - basic_machine=a29k-amd | |
| 1082 | - os=-udi | |
| 1083 | - ;; | |
| 1084 | - sb1) | |
| 1085 | - basic_machine=mipsisa64sb1-unknown | |
| 1086 | - ;; | |
| 1087 | - sb1el) | |
| 1088 | - basic_machine=mipsisa64sb1el-unknown | |
| 1089 | - ;; | |
| 1090 | - sde) | |
| 1091 | - basic_machine=mipsisa32-sde | |
| 1092 | - os=-elf | |
| 1093 | - ;; | |
| 1094 | - sei) | |
| 1095 | - basic_machine=mips-sei | |
| 1096 | - os=-seiux | |
| 1097 | - ;; | |
| 1098 | - sequent) | |
| 1099 | - basic_machine=i386-sequent | |
| 1100 | - ;; | |
| 1101 | - sh5el) | |
| 1102 | - basic_machine=sh5le-unknown | |
| 1103 | - ;; | |
| 1104 | - simso-wrs) | |
| 1105 | - basic_machine=sparclite-wrs | |
| 1106 | - os=-vxworks | |
| 1107 | - ;; | |
| 1108 | - sps7) | |
| 1109 | - basic_machine=m68k-bull | |
| 1110 | - os=-sysv2 | |
| 1111 | - ;; | |
| 1112 | - spur) | |
| 1113 | - basic_machine=spur-unknown | |
| 1114 | - ;; | |
| 1115 | - st2000) | |
| 1116 | - basic_machine=m68k-tandem | |
| 1117 | - ;; | |
| 1118 | - stratus) | |
| 1119 | - basic_machine=i860-stratus | |
| 1120 | - os=-sysv4 | |
| 1121 | - ;; | |
| 1122 | - strongarm-* | thumb-*) | |
| 1123 | - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` | |
| 1124 | - ;; | |
| 1125 | - sun2) | |
| 1126 | - basic_machine=m68000-sun | |
| 1127 | - ;; | |
| 1128 | - sun2os3) | |
| 1129 | - basic_machine=m68000-sun | |
| 1130 | - os=-sunos3 | |
| 1131 | - ;; | |
| 1132 | - sun2os4) | |
| 1133 | - basic_machine=m68000-sun | |
| 1134 | - os=-sunos4 | |
| 1135 | - ;; | |
| 1136 | - sun3os3) | |
| 1137 | - basic_machine=m68k-sun | |
| 1138 | - os=-sunos3 | |
| 1139 | - ;; | |
| 1140 | - sun3os4) | |
| 1141 | - basic_machine=m68k-sun | |
| 1142 | - os=-sunos4 | |
| 1143 | - ;; | |
| 1144 | - sun4os3) | |
| 1145 | - basic_machine=sparc-sun | |
| 1146 | - os=-sunos3 | |
| 1147 | - ;; | |
| 1148 | - sun4os4) | |
| 1149 | - basic_machine=sparc-sun | |
| 1150 | - os=-sunos4 | |
| 1151 | - ;; | |
| 1152 | - sun4sol2) | |
| 1153 | - basic_machine=sparc-sun | |
| 1154 | - os=-solaris2 | |
| 1155 | - ;; | |
| 1156 | - sun3 | sun3-*) | |
| 1157 | - basic_machine=m68k-sun | |
| 1158 | - ;; | |
| 1159 | - sun4) | |
| 1160 | - basic_machine=sparc-sun | |
| 1161 | - ;; | |
| 1162 | - sun386 | sun386i | roadrunner) | |
| 1163 | - basic_machine=i386-sun | |
| 1164 | - ;; | |
| 1165 | - sv1) | |
| 1166 | - basic_machine=sv1-cray | |
| 1167 | - os=-unicos | |
| 1168 | - ;; | |
| 1169 | - symmetry) | |
| 1170 | - basic_machine=i386-sequent | |
| 1171 | - os=-dynix | |
| 1172 | - ;; | |
| 1173 | - t3e) | |
| 1174 | - basic_machine=alphaev5-cray | |
| 1175 | - os=-unicos | |
| 1176 | - ;; | |
| 1177 | - t90) | |
| 1178 | - basic_machine=t90-cray | |
| 1179 | - os=-unicos | |
| 1180 | - ;; | |
| 1181 | - tile*) | |
| 1182 | - basic_machine=$basic_machine-unknown | |
| 1183 | - os=-linux-gnu | |
| 1184 | - ;; | |
| 1185 | - tx39) | |
| 1186 | - basic_machine=mipstx39-unknown | |
| 1187 | - ;; | |
| 1188 | - tx39el) | |
| 1189 | - basic_machine=mipstx39el-unknown | |
| 1190 | - ;; | |
| 1191 | - toad1) | |
| 1192 | - basic_machine=pdp10-xkl | |
| 1193 | - os=-tops20 | |
| 1194 | - ;; | |
| 1195 | - tower | tower-32) | |
| 1196 | - basic_machine=m68k-ncr | |
| 1197 | - ;; | |
| 1198 | - tpf) | |
| 1199 | - basic_machine=s390x-ibm | |
| 1200 | - os=-tpf | |
| 1201 | - ;; | |
| 1202 | - udi29k) | |
| 1203 | - basic_machine=a29k-amd | |
| 1204 | - os=-udi | |
| 1205 | - ;; | |
| 1206 | - ultra3) | |
| 1207 | - basic_machine=a29k-nyu | |
| 1208 | - os=-sym1 | |
| 1209 | - ;; | |
| 1210 | - v810 | necv810) | |
| 1211 | - basic_machine=v810-nec | |
| 1212 | - os=-none | |
| 1213 | - ;; | |
| 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 | |
| 1224 | - ;; | |
| 1225 | - vxworks960) | |
| 1226 | - basic_machine=i960-wrs | |
| 1227 | - os=-vxworks | |
| 1228 | - ;; | |
| 1229 | - vxworks68) | |
| 1230 | - basic_machine=m68k-wrs | |
| 1231 | - os=-vxworks | |
| 1232 | - ;; | |
| 1233 | - vxworks29k) | |
| 1234 | - basic_machine=a29k-wrs | |
| 1235 | - os=-vxworks | |
| 1236 | - ;; | |
| 1237 | - w65*) | |
| 1238 | - basic_machine=w65-wdc | |
| 1239 | - os=-none | |
| 1240 | - ;; | |
| 1241 | - w89k-*) | |
| 1242 | - basic_machine=hppa1.1-winbond | |
| 1243 | - os=-proelf | |
| 1244 | - ;; | |
| 1245 | - x64) | |
| 1246 | - basic_machine=x86_64-pc | |
| 1247 | - ;; | |
| 1248 | - xbox) | |
| 1249 | - basic_machine=i686-pc | |
| 1250 | - os=-mingw32 | |
| 1251 | - ;; | |
| 1252 | - xps | xps100) | |
| 1253 | - basic_machine=xps100-honeywell | |
| 1254 | - ;; | |
| 1255 | - xscale-* | xscalee[bl]-*) | |
| 1256 | - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` | |
| 1257 | - ;; | |
| 1258 | - ymp) | |
| 1259 | - basic_machine=ymp-cray | |
| 1260 | - os=-unicos | |
| 1261 | - ;; | |
| 1262 | - none) | |
| 1263 | - basic_machine=none-none | |
| 1264 | - os=-none | |
| 1265 | - ;; | |
| 1266 | - | |
| 1267 | -# Here we handle the default manufacturer of certain CPU types. It is in | |
| 1268 | -# some cases the only manufacturer, in others, it is the most popular. | |
| 1269 | - w89k) | |
| 1270 | - basic_machine=hppa1.1-winbond | |
| 1271 | - ;; | |
| 1272 | - op50n) | |
| 1273 | - basic_machine=hppa1.1-oki | |
| 1274 | - ;; | |
| 1275 | - op60c) | |
| 1276 | - basic_machine=hppa1.1-oki | |
| 1277 | - ;; | |
| 1278 | - romp) | |
| 1279 | - basic_machine=romp-ibm | |
| 1280 | - ;; | |
| 1281 | - mmix) | |
| 1282 | - basic_machine=mmix-knuth | |
| 1283 | - ;; | |
| 1284 | - rs6000) | |
| 1285 | - basic_machine=rs6000-ibm | |
| 1286 | - ;; | |
| 1287 | - vax) | |
| 1288 | - basic_machine=vax-dec | |
| 1289 | - ;; | |
| 1290 | - pdp11) | |
| 1291 | - basic_machine=pdp11-dec | |
| 1292 | - ;; | |
| 1293 | - we32k) | |
| 1294 | - basic_machine=we32k-att | |
| 1295 | - ;; | |
| 1296 | - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | |
| 1297 | - basic_machine=sh-unknown | |
| 1298 | - ;; | |
| 1299 | - cydra) | |
| 1300 | - basic_machine=cydra-cydrome | |
| 1301 | - ;; | |
| 1302 | - orion) | |
| 1303 | - basic_machine=orion-highlevel | |
| 1304 | - ;; | |
| 1305 | - orion105) | |
| 1306 | - basic_machine=clipper-highlevel | |
| 1307 | - ;; | |
| 1308 | - mac | mpw | mac-mpw) | |
| 1309 | - basic_machine=m68k-apple | |
| 1310 | - ;; | |
| 1311 | - pmac | pmac-mpw) | |
| 1312 | - basic_machine=powerpc-apple | |
| 1313 | - ;; | |
| 1314 | - *-unknown) | |
| 1315 | - # Make sure to match an already-canonicalized machine name. | |
| 1316 | - ;; | |
| 1317 | - *) | |
| 1318 | - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 | |
| 1319 | - exit 1 | |
| 771 | + cpu=hppa1.1 | |
| 772 | + vendor=hp | |
| 773 | + ;; | |
| 774 | + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
| 775 | + # FIXME: really hppa2.0-hp | |
| 776 | + cpu=hppa1.1 | |
| 777 | + vendor=hp | |
| 778 | + ;; | |
| 779 | + hp9k8[0-9][13679] | hp8[0-9][13679]) | |
| 780 | + cpu=hppa1.1 | |
| 781 | + vendor=hp | |
| 782 | + ;; | |
| 783 | + hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
| 784 | + cpu=hppa1.0 | |
| 785 | + vendor=hp | |
| 786 | + ;; | |
| 787 | + i*86v32) | |
| 788 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 789 | + vendor=pc | |
| 790 | + basic_os=sysv32 | |
| 791 | + ;; | |
| 792 | + i*86v4*) | |
| 793 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 794 | + vendor=pc | |
| 795 | + basic_os=sysv4 | |
| 796 | + ;; | |
| 797 | + i*86v) | |
| 798 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 799 | + vendor=pc | |
| 800 | + basic_os=sysv | |
| 801 | + ;; | |
| 802 | + i*86sol2) | |
| 803 | + cpu=`echo "$1" | sed -e 's/86.*/86/'` | |
| 804 | + vendor=pc | |
| 805 | + basic_os=solaris2 | |
| 806 | + ;; | |
| 807 | + j90 | j90-cray) | |
| 808 | + cpu=j90 | |
| 809 | + vendor=cray | |
| 810 | + basic_os=${basic_os:-unicos} | |
| 811 | + ;; | |
| 812 | + iris | iris4d) | |
| 813 | + cpu=mips | |
| 814 | + vendor=sgi | |
| 815 | + case $basic_os in | |
| 816 | + irix*) | |
| 817 | + ;; | |
| 818 | + *) | |
| 819 | + basic_os=irix4 | |
| 820 | + ;; | |
| 821 | + esac | |
| 822 | + ;; | |
| 823 | + miniframe) | |
| 824 | + cpu=m68000 | |
| 825 | + vendor=convergent | |
| 826 | + ;; | |
| 827 | + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
| 828 | + cpu=m68k | |
| 829 | + vendor=atari | |
| 830 | + basic_os=mint | |
| 831 | + ;; | |
| 832 | + news-3600 | risc-news) | |
| 833 | + cpu=mips | |
| 834 | + vendor=sony | |
| 835 | + basic_os=newsos | |
| 836 | + ;; | |
| 837 | + next | m*-next) | |
| 838 | + cpu=m68k | |
| 839 | + vendor=next | |
| 840 | + case $basic_os in | |
| 841 | + openstep*) | |
| 842 | + ;; | |
| 843 | + nextstep*) | |
| 844 | + ;; | |
| 845 | + ns2*) | |
| 846 | + basic_os=nextstep2 | |
| 847 | + ;; | |
| 848 | + *) | |
| 849 | + basic_os=nextstep3 | |
| 850 | + ;; | |
| 851 | + esac | |
| 852 | + ;; | |
| 853 | + np1) | |
| 854 | + cpu=np1 | |
| 855 | + vendor=gould | |
| 856 | + ;; | |
| 857 | + op50n-* | op60c-*) | |
| 858 | + cpu=hppa1.1 | |
| 859 | + vendor=oki | |
| 860 | + basic_os=proelf | |
| 861 | + ;; | |
| 862 | + pa-hitachi) | |
| 863 | + cpu=hppa1.1 | |
| 864 | + vendor=hitachi | |
| 865 | + basic_os=hiuxwe2 | |
| 866 | + ;; | |
| 867 | + pbd) | |
| 868 | + cpu=sparc | |
| 869 | + vendor=tti | |
| 870 | + ;; | |
| 871 | + pbb) | |
| 872 | + cpu=m68k | |
| 873 | + vendor=tti | |
| 874 | + ;; | |
| 875 | + pc532) | |
| 876 | + cpu=ns32k | |
| 877 | + vendor=pc532 | |
| 878 | + ;; | |
| 879 | + pn) | |
| 880 | + cpu=pn | |
| 881 | + vendor=gould | |
| 882 | + ;; | |
| 883 | + power) | |
| 884 | + cpu=power | |
| 885 | + vendor=ibm | |
| 886 | + ;; | |
| 887 | + ps2) | |
| 888 | + cpu=i386 | |
| 889 | + vendor=ibm | |
| 890 | + ;; | |
| 891 | + rm[46]00) | |
| 892 | + cpu=mips | |
| 893 | + vendor=siemens | |
| 894 | + ;; | |
| 895 | + rtpc | rtpc-*) | |
| 896 | + cpu=romp | |
| 897 | + vendor=ibm | |
| 898 | + ;; | |
| 899 | + sde) | |
| 900 | + cpu=mipsisa32 | |
| 901 | + vendor=sde | |
| 902 | + basic_os=${basic_os:-elf} | |
| 903 | + ;; | |
| 904 | + simso-wrs) | |
| 905 | + cpu=sparclite | |
| 906 | + vendor=wrs | |
| 907 | + basic_os=vxworks | |
| 908 | + ;; | |
| 909 | + tower | tower-32) | |
| 910 | + cpu=m68k | |
| 911 | + vendor=ncr | |
| 912 | + ;; | |
| 913 | + vpp*|vx|vx-*) | |
| 914 | + cpu=f301 | |
| 915 | + vendor=fujitsu | |
| 916 | + ;; | |
| 917 | + w65) | |
| 918 | + cpu=w65 | |
| 919 | + vendor=wdc | |
| 920 | + ;; | |
| 921 | + w89k-*) | |
| 922 | + cpu=hppa1.1 | |
| 923 | + vendor=winbond | |
| 924 | + basic_os=proelf | |
| 925 | + ;; | |
| 926 | + none) | |
| 927 | + cpu=none | |
| 928 | + vendor=none | |
| 929 | + ;; | |
| 930 | + leon|leon[3-9]) | |
| 931 | + cpu=sparc | |
| 932 | + vendor=$basic_machine | |
| 933 | + ;; | |
| 934 | + leon-*|leon[3-9]-*) | |
| 935 | + cpu=sparc | |
| 936 | + vendor=`echo "$basic_machine" | sed 's/-.*//'` | |
| 937 | + ;; | |
| 938 | + | |
| 939 | + *-*) | |
| 940 | + # shellcheck disable=SC2162 | |
| 941 | + saved_IFS=$IFS | |
| 942 | + IFS="-" read cpu vendor <<EOF | |
| 943 | +$basic_machine | |
| 944 | +EOF | |
| 945 | + IFS=$saved_IFS | |
| 946 | + ;; | |
| 947 | + # We use 'pc' rather than 'unknown' | |
| 948 | + # because (1) that's what they normally are, and | |
| 949 | + # (2) the word "unknown" tends to confuse beginning users. | |
| 950 | + i*86 | x86_64) | |
| 951 | + cpu=$basic_machine | |
| 952 | + vendor=pc | |
| 953 | + ;; | |
| 954 | + # These rules are duplicated from below for sake of the special case above; | |
| 955 | + # i.e. things that normalized to x86 arches should also default to "pc" | |
| 956 | + pc98) | |
| 957 | + cpu=i386 | |
| 958 | + vendor=pc | |
| 959 | + ;; | |
| 960 | + x64 | amd64) | |
| 961 | + cpu=x86_64 | |
| 962 | + vendor=pc | |
| 963 | + ;; | |
| 964 | + # Recognize the basic CPU types without company name. | |
| 965 | + *) | |
| 966 | + cpu=$basic_machine | |
| 967 | + vendor=unknown | |
| 968 | + ;; | |
| 969 | +esac | |
| 970 | + | |
| 971 | +unset -v basic_machine | |
| 972 | + | |
| 973 | +# Decode basic machines in the full and proper CPU-Company form. | |
| 974 | +case $cpu-$vendor in | |
| 975 | + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in | |
| 976 | + # some cases the only manufacturer, in others, it is the most popular. | |
| 977 | + craynv-unknown) | |
| 978 | + vendor=cray | |
| 979 | + basic_os=${basic_os:-unicosmp} | |
| 980 | + ;; | |
| 981 | + c90-unknown | c90-cray) | |
| 982 | + vendor=cray | |
| 983 | + basic_os=${Basic_os:-unicos} | |
| 984 | + ;; | |
| 985 | + fx80-unknown) | |
| 986 | + vendor=alliant | |
| 987 | + ;; | |
| 988 | + romp-unknown) | |
| 989 | + vendor=ibm | |
| 990 | + ;; | |
| 991 | + mmix-unknown) | |
| 992 | + vendor=knuth | |
| 993 | + ;; | |
| 994 | + microblaze-unknown | microblazeel-unknown) | |
| 995 | + vendor=xilinx | |
| 996 | + ;; | |
| 997 | + rs6000-unknown) | |
| 998 | + vendor=ibm | |
| 999 | + ;; | |
| 1000 | + vax-unknown) | |
| 1001 | + vendor=dec | |
| 1002 | + ;; | |
| 1003 | + pdp11-unknown) | |
| 1004 | + vendor=dec | |
| 1005 | + ;; | |
| 1006 | + we32k-unknown) | |
| 1007 | + vendor=att | |
| 1008 | + ;; | |
| 1009 | + cydra-unknown) | |
| 1010 | + vendor=cydrome | |
| 1011 | + ;; | |
| 1012 | + i370-ibm*) | |
| 1013 | + vendor=ibm | |
| 1014 | + ;; | |
| 1015 | + orion-unknown) | |
| 1016 | + vendor=highlevel | |
| 1017 | + ;; | |
| 1018 | + xps-unknown | xps100-unknown) | |
| 1019 | + cpu=xps100 | |
| 1020 | + vendor=honeywell | |
| 1021 | + ;; | |
| 1022 | + | |
| 1023 | + # Here we normalize CPU types with a missing or matching vendor | |
| 1024 | + armh-unknown | armh-alt) | |
| 1025 | + cpu=armv7l | |
| 1026 | + vendor=alt | |
| 1027 | + basic_os=${basic_os:-linux-gnueabihf} | |
| 1028 | + ;; | |
| 1029 | + dpx20-unknown | dpx20-bull) | |
| 1030 | + cpu=rs6000 | |
| 1031 | + vendor=bull | |
| 1032 | + basic_os=${basic_os:-bosx} | |
| 1033 | + ;; | |
| 1034 | + | |
| 1035 | + # Here we normalize CPU types irrespective of the vendor | |
| 1036 | + amd64-*) | |
| 1037 | + cpu=x86_64 | |
| 1038 | + ;; | |
| 1039 | + blackfin-*) | |
| 1040 | + cpu=bfin | |
| 1041 | + basic_os=linux | |
| 1042 | + ;; | |
| 1043 | + c54x-*) | |
| 1044 | + cpu=tic54x | |
| 1045 | + ;; | |
| 1046 | + c55x-*) | |
| 1047 | + cpu=tic55x | |
| 1048 | + ;; | |
| 1049 | + c6x-*) | |
| 1050 | + cpu=tic6x | |
| 1051 | + ;; | |
| 1052 | + e500v[12]-*) | |
| 1053 | + cpu=powerpc | |
| 1054 | + basic_os=${basic_os}"spe" | |
| 1055 | + ;; | |
| 1056 | + mips3*-*) | |
| 1057 | + cpu=mips64 | |
| 1058 | + ;; | |
| 1059 | + ms1-*) | |
| 1060 | + cpu=mt | |
| 1061 | + ;; | |
| 1062 | + m68knommu-*) | |
| 1063 | + cpu=m68k | |
| 1064 | + basic_os=linux | |
| 1065 | + ;; | |
| 1066 | + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) | |
| 1067 | + cpu=s12z | |
| 1068 | + ;; | |
| 1069 | + openrisc-*) | |
| 1070 | + cpu=or32 | |
| 1071 | + ;; | |
| 1072 | + parisc-*) | |
| 1073 | + cpu=hppa | |
| 1074 | + basic_os=linux | |
| 1075 | + ;; | |
| 1076 | + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
| 1077 | + cpu=i586 | |
| 1078 | + ;; | |
| 1079 | + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) | |
| 1080 | + cpu=i686 | |
| 1081 | + ;; | |
| 1082 | + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
| 1083 | + cpu=i686 | |
| 1084 | + ;; | |
| 1085 | + pentium4-*) | |
| 1086 | + cpu=i786 | |
| 1087 | + ;; | |
| 1088 | + pc98-*) | |
| 1089 | + cpu=i386 | |
| 1090 | + ;; | |
| 1091 | + ppc-* | ppcbe-*) | |
| 1092 | + cpu=powerpc | |
| 1093 | + ;; | |
| 1094 | + ppcle-* | powerpclittle-*) | |
| 1095 | + cpu=powerpcle | |
| 1096 | + ;; | |
| 1097 | + ppc64-*) | |
| 1098 | + cpu=powerpc64 | |
| 1099 | + ;; | |
| 1100 | + ppc64le-* | powerpc64little-*) | |
| 1101 | + cpu=powerpc64le | |
| 1102 | + ;; | |
| 1103 | + sb1-*) | |
| 1104 | + cpu=mipsisa64sb1 | |
| 1105 | + ;; | |
| 1106 | + sb1el-*) | |
| 1107 | + cpu=mipsisa64sb1el | |
| 1108 | + ;; | |
| 1109 | + sh5e[lb]-*) | |
| 1110 | + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` | |
| 1111 | + ;; | |
| 1112 | + spur-*) | |
| 1113 | + cpu=spur | |
| 1114 | + ;; | |
| 1115 | + strongarm-* | thumb-*) | |
| 1116 | + cpu=arm | |
| 1117 | + ;; | |
| 1118 | + tx39-*) | |
| 1119 | + cpu=mipstx39 | |
| 1120 | + ;; | |
| 1121 | + tx39el-*) | |
| 1122 | + cpu=mipstx39el | |
| 1123 | + ;; | |
| 1124 | + x64-*) | |
| 1125 | + cpu=x86_64 | |
| 1126 | + ;; | |
| 1127 | + xscale-* | xscalee[bl]-*) | |
| 1128 | + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` | |
| 1129 | + ;; | |
| 1130 | + arm64-* | aarch64le-*) | |
| 1131 | + cpu=aarch64 | |
| 1132 | + ;; | |
| 1133 | + | |
| 1134 | + # Recognize the canonical CPU Types that limit and/or modify the | |
| 1135 | + # company names they are paired with. | |
| 1136 | + cr16-*) | |
| 1137 | + basic_os=${basic_os:-elf} | |
| 1138 | + ;; | |
| 1139 | + crisv32-* | etraxfs*-*) | |
| 1140 | + cpu=crisv32 | |
| 1141 | + vendor=axis | |
| 1142 | + ;; | |
| 1143 | + cris-* | etrax*-*) | |
| 1144 | + cpu=cris | |
| 1145 | + vendor=axis | |
| 1146 | + ;; | |
| 1147 | + crx-*) | |
| 1148 | + basic_os=${basic_os:-elf} | |
| 1149 | + ;; | |
| 1150 | + neo-tandem) | |
| 1151 | + cpu=neo | |
| 1152 | + vendor=tandem | |
| 1153 | + ;; | |
| 1154 | + nse-tandem) | |
| 1155 | + cpu=nse | |
| 1156 | + vendor=tandem | |
| 1157 | + ;; | |
| 1158 | + nsr-tandem) | |
| 1159 | + cpu=nsr | |
| 1160 | + vendor=tandem | |
| 1161 | + ;; | |
| 1162 | + nsv-tandem) | |
| 1163 | + cpu=nsv | |
| 1164 | + vendor=tandem | |
| 1165 | + ;; | |
| 1166 | + nsx-tandem) | |
| 1167 | + cpu=nsx | |
| 1168 | + vendor=tandem | |
| 1169 | + ;; | |
| 1170 | + mipsallegrexel-sony) | |
| 1171 | + cpu=mipsallegrexel | |
| 1172 | + vendor=sony | |
| 1173 | + ;; | |
| 1174 | + tile*-*) | |
| 1175 | + basic_os=${basic_os:-linux-gnu} | |
| 1176 | + ;; | |
| 1177 | + | |
| 1178 | + *) | |
| 1179 | + # Recognize the canonical CPU types that are allowed with any | |
| 1180 | + # company name. | |
| 1181 | + case $cpu in | |
| 1182 | + 1750a | 580 \ | |
| 1183 | + | a29k \ | |
| 1184 | + | aarch64 | aarch64_be | aarch64c | arm64ec \ | |
| 1185 | + | abacus \ | |
| 1186 | + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | |
| 1187 | + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | |
| 1188 | + | alphapca5[67] | alpha64pca5[67] \ | |
| 1189 | + | am33_2.0 \ | |
| 1190 | + | amdgcn \ | |
| 1191 | + | arc | arceb | arc32 | arc64 \ | |
| 1192 | + | arm | arm[lb]e | arme[lb] | armv* \ | |
| 1193 | + | avr | avr32 \ | |
| 1194 | + | asmjs \ | |
| 1195 | + | ba \ | |
| 1196 | + | be32 | be64 \ | |
| 1197 | + | bfin | bpf | bs2000 \ | |
| 1198 | + | c[123]* | c30 | [cjt]90 | c4x \ | |
| 1199 | + | c8051 | clipper | craynv | csky | cydra \ | |
| 1200 | + | d10v | d30v | dlx | dsp16xx \ | |
| 1201 | + | e2k | elxsi | epiphany \ | |
| 1202 | + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | |
| 1203 | + | javascript \ | |
| 1204 | + | h8300 | h8500 \ | |
| 1205 | + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
| 1206 | + | hexagon \ | |
| 1207 | + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | |
| 1208 | + | ip2k | iq2000 \ | |
| 1209 | + | k1om \ | |
| 1210 | + | kvx \ | |
| 1211 | + | le32 | le64 \ | |
| 1212 | + | lm32 \ | |
| 1213 | + | loongarch32 | loongarch64 \ | |
| 1214 | + | m32c | m32r | m32rle \ | |
| 1215 | + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | |
| 1216 | + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | |
| 1217 | + | m88110 | m88k | maxq | mb | mcore | mep | metag \ | |
| 1218 | + | microblaze | microblazeel \ | |
| 1219 | + | mips* \ | |
| 1220 | + | mmix \ | |
| 1221 | + | mn10200 | mn10300 \ | |
| 1222 | + | moxie \ | |
| 1223 | + | mt \ | |
| 1224 | + | msp430 \ | |
| 1225 | + | nds32 | nds32le | nds32be \ | |
| 1226 | + | nfp \ | |
| 1227 | + | nios | nios2 | nios2eb | nios2el \ | |
| 1228 | + | none | np1 | ns16k | ns32k | nvptx \ | |
| 1229 | + | open8 \ | |
| 1230 | + | or1k* \ | |
| 1231 | + | or32 \ | |
| 1232 | + | orion \ | |
| 1233 | + | picochip \ | |
| 1234 | + | pdp10 | pdp11 | pj | pjl | pn | power \ | |
| 1235 | + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | |
| 1236 | + | pru \ | |
| 1237 | + | pyramid \ | |
| 1238 | + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | |
| 1239 | + | rl78 | romp | rs6000 | rx \ | |
| 1240 | + | s390 | s390x \ | |
| 1241 | + | score \ | |
| 1242 | + | sh | shl \ | |
| 1243 | + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | |
| 1244 | + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | |
| 1245 | + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | |
| 1246 | + | sparclite \ | |
| 1247 | + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | |
| 1248 | + | spu \ | |
| 1249 | + | tahoe \ | |
| 1250 | + | thumbv7* \ | |
| 1251 | + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | |
| 1252 | + | tron \ | |
| 1253 | + | ubicom32 \ | |
| 1254 | + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | |
| 1255 | + | vax \ | |
| 1256 | + | visium \ | |
| 1257 | + | w65 \ | |
| 1258 | + | wasm32 | wasm64 \ | |
| 1259 | + | we32k \ | |
| 1260 | + | x86 | x86_64 | xc16x | xgate | xps100 \ | |
| 1261 | + | xstormy16 | xtensa* \ | |
| 1262 | + | ymp \ | |
| 1263 | + | z8k | z80) | |
| 1264 | + ;; | |
| 1265 | + | |
| 1266 | + *) | |
| 1267 | + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 | |
| 1268 | + exit 1 | |
| 1269 | + ;; | |
| 1270 | + esac | |
| 1320 | 1271 | ;; |
| 1321 | 1272 | esac |
| 1322 | 1273 | |
| 1323 | 1274 | # Here we canonicalize certain aliases for manufacturers. |
| 1324 | -case $basic_machine in | |
| 1325 | - *-digital*) | |
| 1326 | - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` | |
| 1275 | +case $vendor in | |
| 1276 | + digital*) | |
| 1277 | + vendor=dec | |
| 1327 | 1278 | ;; |
| 1328 | - *-commodore*) | |
| 1329 | - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` | |
| 1279 | + commodore*) | |
| 1280 | + vendor=cbm | |
| 1330 | 1281 | ;; |
| 1331 | 1282 | *) |
| 1332 | 1283 | ;; |
| 1333 | 1284 | esac |
| 1334 | 1285 | |
| 1335 | 1286 | # Decode manufacturer-specific aliases for certain operating systems. |
| 1336 | 1287 | |
| 1337 | -if [ x"$os" != x"" ] | |
| 1288 | +if test x"$basic_os" != x | |
| 1338 | 1289 | then |
| 1290 | + | |
| 1291 | +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just | |
| 1292 | +# set os. | |
| 1293 | +obj= | |
| 1294 | +case $basic_os in | |
| 1295 | + gnu/linux*) | |
| 1296 | + kernel=linux | |
| 1297 | + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` | |
| 1298 | + ;; | |
| 1299 | + os2-emx) | |
| 1300 | + kernel=os2 | |
| 1301 | + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` | |
| 1302 | + ;; | |
| 1303 | + nto-qnx*) | |
| 1304 | + kernel=nto | |
| 1305 | + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` | |
| 1306 | + ;; | |
| 1307 | + *-*) | |
| 1308 | + # shellcheck disable=SC2162 | |
| 1309 | + saved_IFS=$IFS | |
| 1310 | + IFS="-" read kernel os <<EOF | |
| 1311 | +$basic_os | |
| 1312 | +EOF | |
| 1313 | + IFS=$saved_IFS | |
| 1314 | + ;; | |
| 1315 | + # Default OS when just kernel was specified | |
| 1316 | + nto*) | |
| 1317 | + kernel=nto | |
| 1318 | + os=`echo "$basic_os" | sed -e 's|nto|qnx|'` | |
| 1319 | + ;; | |
| 1320 | + linux*) | |
| 1321 | + kernel=linux | |
| 1322 | + os=`echo "$basic_os" | sed -e 's|linux|gnu|'` | |
| 1323 | + ;; | |
| 1324 | + managarm*) | |
| 1325 | + kernel=managarm | |
| 1326 | + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` | |
| 1327 | + ;; | |
| 1328 | + *) | |
| 1329 | + kernel= | |
| 1330 | + os=$basic_os | |
| 1331 | + ;; | |
| 1332 | +esac | |
| 1333 | + | |
| 1334 | +# Now, normalize the OS (knowing we just have one component, it's not a kernel, | |
| 1335 | +# etc.) | |
| 1339 | 1336 | case $os in |
| 1340 | 1337 | # First match some system type aliases that might get confused |
| 1341 | 1338 | # with valid system types. |
| 1342 | - # -solaris* is a basic system type, with this one exception. | |
| 1343 | - -auroraux) | |
| 1344 | - os=-auroraux | |
| 1345 | - ;; | |
| 1346 | - -solaris1 | -solaris1.*) | |
| 1347 | - os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
| 1348 | - ;; | |
| 1349 | - -solaris) | |
| 1350 | - os=-solaris2 | |
| 1351 | - ;; | |
| 1352 | - -unixware*) | |
| 1353 | - os=-sysv4.2uw | |
| 1354 | - ;; | |
| 1355 | - -gnu/linux*) | |
| 1356 | - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
| 1339 | + # solaris* is a basic system type, with this one exception. | |
| 1340 | + auroraux) | |
| 1341 | + os=auroraux | |
| 1342 | + ;; | |
| 1343 | + bluegene*) | |
| 1344 | + os=cnk | |
| 1345 | + ;; | |
| 1346 | + solaris1 | solaris1.*) | |
| 1347 | + os=`echo "$os" | sed -e 's|solaris1|sunos4|'` | |
| 1348 | + ;; | |
| 1349 | + solaris) | |
| 1350 | + os=solaris2 | |
| 1351 | + ;; | |
| 1352 | + unixware*) | |
| 1353 | + os=sysv4.2uw | |
| 1357 | 1354 | ;; |
| 1358 | 1355 | # es1800 is here to avoid being matched by es* (a different OS) |
| 1359 | - -es1800*) | |
| 1360 | - os=-ose | |
| 1361 | - ;; | |
| 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* | -hcos* \ | |
| 1380 | - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | |
| 1381 | - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
| 1382 | - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | |
| 1383 | - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | |
| 1384 | - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | |
| 1385 | - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | |
| 1386 | - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
| 1387 | - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
| 1388 | - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
| 1389 | - | -morphos* | -superux* | -rtmk* | -windiss* \ | |
| 1390 | - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
| 1391 | - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | |
| 1392 | - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | |
| 1393 | - | -midnightbsd*) | |
| 1394 | - # Remember, each alternative MUST END IN *, to match a version number. | |
| 1395 | - ;; | |
| 1396 | - -qnx*) | |
| 1397 | - case $basic_machine in | |
| 1398 | - x86-* | i*86-*) | |
| 1399 | - ;; | |
| 1400 | - *) | |
| 1401 | - os=-nto$os | |
| 1402 | - ;; | |
| 1403 | - esac | |
| 1404 | - ;; | |
| 1405 | - -nto-qnx*) | |
| 1406 | - ;; | |
| 1407 | - -nto*) | |
| 1408 | - os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
| 1409 | - ;; | |
| 1410 | - -sim | -xray | -os68k* | -v88r* \ | |
| 1411 | - | -windows* | -osx | -abug | -netware* | -os9* \ | |
| 1412 | - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
| 1413 | - ;; | |
| 1414 | - -mac*) | |
| 1356 | + es1800*) | |
| 1357 | + os=ose | |
| 1358 | + ;; | |
| 1359 | + # Some version numbers need modification | |
| 1360 | + chorusos*) | |
| 1361 | + os=chorusos | |
| 1362 | + ;; | |
| 1363 | + isc) | |
| 1364 | + os=isc2.2 | |
| 1365 | + ;; | |
| 1366 | + sco6) | |
| 1367 | + os=sco5v6 | |
| 1368 | + ;; | |
| 1369 | + sco5) | |
| 1370 | + os=sco3.2v5 | |
| 1371 | + ;; | |
| 1372 | + sco4) | |
| 1373 | + os=sco3.2v4 | |
| 1374 | + ;; | |
| 1375 | + sco3.2.[4-9]*) | |
| 1376 | + os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` | |
| 1377 | + ;; | |
| 1378 | + sco*v* | scout) | |
| 1379 | + # Don't match below | |
| 1380 | + ;; | |
| 1381 | + sco*) | |
| 1382 | + os=sco3.2v2 | |
| 1383 | + ;; | |
| 1384 | + psos*) | |
| 1385 | + os=psos | |
| 1386 | + ;; | |
| 1387 | + qnx*) | |
| 1388 | + os=qnx | |
| 1389 | + ;; | |
| 1390 | + hiux*) | |
| 1391 | + os=hiuxwe2 | |
| 1392 | + ;; | |
| 1393 | + lynx*178) | |
| 1394 | + os=lynxos178 | |
| 1395 | + ;; | |
| 1396 | + lynx*5) | |
| 1397 | + os=lynxos5 | |
| 1398 | + ;; | |
| 1399 | + lynxos*) | |
| 1400 | + # don't get caught up in next wildcard | |
| 1401 | + ;; | |
| 1402 | + lynx*) | |
| 1403 | + os=lynxos | |
| 1404 | + ;; | |
| 1405 | + mac[0-9]*) | |
| 1415 | 1406 | os=`echo "$os" | sed -e 's|mac|macos|'` |
| 1416 | 1407 | ;; |
| 1417 | - -linux-dietlibc) | |
| 1418 | - os=-linux-dietlibc | |
| 1408 | + opened*) | |
| 1409 | + os=openedition | |
| 1419 | 1410 | ;; |
| 1420 | - -linux*) | |
| 1421 | - os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
| 1411 | + os400*) | |
| 1412 | + os=os400 | |
| 1422 | 1413 | ;; |
| 1423 | - -sunos5*) | |
| 1414 | + sunos5*) | |
| 1424 | 1415 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` |
| 1425 | 1416 | ;; |
| 1426 | - -sunos6*) | |
| 1417 | + sunos6*) | |
| 1427 | 1418 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` |
| 1428 | 1419 | ;; |
| 1429 | - -opened*) | |
| 1430 | - os=-openedition | |
| 1431 | - ;; | |
| 1432 | - -os400*) | |
| 1433 | - os=-os400 | |
| 1434 | - ;; | |
| 1435 | - -wince*) | |
| 1436 | - os=-wince | |
| 1437 | - ;; | |
| 1438 | - -utek*) | |
| 1439 | - os=-bsd | |
| 1440 | - ;; | |
| 1441 | - -dynix*) | |
| 1442 | - os=-bsd | |
| 1443 | - ;; | |
| 1444 | - -acis*) | |
| 1445 | - os=-aos | |
| 1446 | - ;; | |
| 1447 | - -atheos*) | |
| 1448 | - os=-atheos | |
| 1449 | - ;; | |
| 1450 | - -syllable*) | |
| 1451 | - os=-syllable | |
| 1452 | - ;; | |
| 1453 | - -386bsd) | |
| 1454 | - os=-bsd | |
| 1455 | - ;; | |
| 1456 | - -ctix* | -uts*) | |
| 1457 | - os=-sysv | |
| 1458 | - ;; | |
| 1459 | - -nova*) | |
| 1460 | - os=-rtmk-nova | |
| 1461 | - ;; | |
| 1462 | - -ns2) | |
| 1463 | - os=-nextstep2 | |
| 1464 | - ;; | |
| 1465 | - -nsk*) | |
| 1466 | - os=-nsk | |
| 1420 | + wince*) | |
| 1421 | + os=wince | |
| 1422 | + ;; | |
| 1423 | + utek*) | |
| 1424 | + os=bsd | |
| 1425 | + ;; | |
| 1426 | + dynix*) | |
| 1427 | + os=bsd | |
| 1428 | + ;; | |
| 1429 | + acis*) | |
| 1430 | + os=aos | |
| 1431 | + ;; | |
| 1432 | + atheos*) | |
| 1433 | + os=atheos | |
| 1434 | + ;; | |
| 1435 | + syllable*) | |
| 1436 | + os=syllable | |
| 1437 | + ;; | |
| 1438 | + 386bsd) | |
| 1439 | + os=bsd | |
| 1440 | + ;; | |
| 1441 | + ctix* | uts*) | |
| 1442 | + os=sysv | |
| 1443 | + ;; | |
| 1444 | + nova*) | |
| 1445 | + os=rtmk-nova | |
| 1446 | + ;; | |
| 1447 | + ns2) | |
| 1448 | + os=nextstep2 | |
| 1467 | 1449 | ;; |
| 1468 | 1450 | # Preserve the version number of sinix5. |
| 1469 | - -sinix5.*) | |
| 1470 | - os=`echo $os | sed -e 's|sinix|sysv|'` | |
| 1471 | - ;; | |
| 1472 | - -sinix*) | |
| 1473 | - os=-sysv4 | |
| 1474 | - ;; | |
| 1475 | - -tpf*) | |
| 1476 | - os=-tpf | |
| 1477 | - ;; | |
| 1478 | - -triton*) | |
| 1479 | - os=-sysv3 | |
| 1480 | - ;; | |
| 1481 | - -oss*) | |
| 1482 | - os=-sysv3 | |
| 1483 | - ;; | |
| 1484 | - -svr4*) | |
| 1485 | - os=-sysv4 | |
| 1486 | - ;; | |
| 1487 | - -svr3) | |
| 1488 | - os=-sysv3 | |
| 1489 | - ;; | |
| 1490 | - -sysvr4) | |
| 1491 | - os=-sysv4 | |
| 1492 | - ;; | |
| 1493 | - # This must come after -sysvr4. | |
| 1494 | - -sysv*) | |
| 1495 | - ;; | |
| 1496 | - -ose*) | |
| 1497 | - os=-ose | |
| 1498 | - ;; | |
| 1499 | - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
| 1500 | - os=-mint | |
| 1501 | - ;; | |
| 1502 | - -zvmoe) | |
| 1503 | - os=-zvmoe | |
| 1504 | - ;; | |
| 1505 | - -dicos*) | |
| 1506 | - os=-dicos | |
| 1507 | - ;; | |
| 1508 | - -pikeos*) | |
| 1451 | + sinix5.*) | |
| 1452 | + os=`echo "$os" | sed -e 's|sinix|sysv|'` | |
| 1453 | + ;; | |
| 1454 | + sinix*) | |
| 1455 | + os=sysv4 | |
| 1456 | + ;; | |
| 1457 | + tpf*) | |
| 1458 | + os=tpf | |
| 1459 | + ;; | |
| 1460 | + triton*) | |
| 1461 | + os=sysv3 | |
| 1462 | + ;; | |
| 1463 | + oss*) | |
| 1464 | + os=sysv3 | |
| 1465 | + ;; | |
| 1466 | + svr4*) | |
| 1467 | + os=sysv4 | |
| 1468 | + ;; | |
| 1469 | + svr3) | |
| 1470 | + os=sysv3 | |
| 1471 | + ;; | |
| 1472 | + sysvr4) | |
| 1473 | + os=sysv4 | |
| 1474 | + ;; | |
| 1475 | + ose*) | |
| 1476 | + os=ose | |
| 1477 | + ;; | |
| 1478 | + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) | |
| 1479 | + os=mint | |
| 1480 | + ;; | |
| 1481 | + dicos*) | |
| 1482 | + os=dicos | |
| 1483 | + ;; | |
| 1484 | + pikeos*) | |
| 1509 | 1485 | # Until real need of OS specific support for |
| 1510 | 1486 | # particular features comes up, bare metal |
| 1511 | 1487 | # configurations are quite functional. |
| 1512 | - case $basic_machine in | |
| 1513 | - arm*) | |
| 1514 | - os=-eabi | |
| 1515 | - ;; | |
| 1516 | - *) | |
| 1517 | - os=-elf | |
| 1518 | - ;; | |
| 1519 | - esac | |
| 1520 | - ;; | |
| 1521 | - -nacl*) | |
| 1522 | - ;; | |
| 1523 | - -ios) | |
| 1524 | - ;; | |
| 1525 | - -none) | |
| 1526 | - ;; | |
| 1527 | - *) | |
| 1528 | - # Get rid of the `-' at the beginning of $os. | |
| 1529 | - os=`echo $os | sed 's/[^-]*-//'` | |
| 1530 | - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 | |
| 1531 | - exit 1 | |
| 1532 | - ;; | |
| 1533 | -esac | |
| 1488 | + case $cpu in | |
| 1489 | + arm*) | |
| 1490 | + os=eabi | |
| 1491 | + ;; | |
| 1492 | + *) | |
| 1493 | + os= | |
| 1494 | + obj=elf | |
| 1495 | + ;; | |
| 1496 | + esac | |
| 1497 | + ;; | |
| 1498 | + aout* | coff* | elf* | pe*) | |
| 1499 | + # These are machine code file formats, not OSes | |
| 1500 | + obj=$os | |
| 1501 | + os= | |
| 1502 | + ;; | |
| 1503 | + *) | |
| 1504 | + # No normalization, but not necessarily accepted, that comes below. | |
| 1505 | + ;; | |
| 1506 | +esac | |
| 1507 | + | |
| 1534 | 1508 | else |
| 1535 | 1509 | |
| 1536 | 1510 | # Here we handle the default operating systems that come with various machines. |
| 1537 | 1511 | # The value should be what the vendor currently ships out the door with their |
| 1538 | 1512 | # machine or put another way, the most popular os provided with the machine. |
| @@ -1541,261 +1515,446 @@ | ||
| 1541 | 1515 | # "-sun"), then you have to tell the case statement up towards the top |
| 1542 | 1516 | # that MANUFACTURER isn't an operating system. Otherwise, code above |
| 1543 | 1517 | # will signal an error saying that MANUFACTURER isn't an operating |
| 1544 | 1518 | # system, and we'll never get to this point. |
| 1545 | 1519 | |
| 1546 | -case $basic_machine in | |
| 1520 | +kernel= | |
| 1521 | +obj= | |
| 1522 | +case $cpu-$vendor in | |
| 1547 | 1523 | score-*) |
| 1548 | - os=-elf | |
| 1524 | + os= | |
| 1525 | + obj=elf | |
| 1549 | 1526 | ;; |
| 1550 | 1527 | spu-*) |
| 1551 | - os=-elf | |
| 1528 | + os= | |
| 1529 | + obj=elf | |
| 1552 | 1530 | ;; |
| 1553 | 1531 | *-acorn) |
| 1554 | - os=-riscix1.2 | |
| 1532 | + os=riscix1.2 | |
| 1555 | 1533 | ;; |
| 1556 | 1534 | arm*-rebel) |
| 1557 | - os=-linux | |
| 1535 | + kernel=linux | |
| 1536 | + os=gnu | |
| 1558 | 1537 | ;; |
| 1559 | 1538 | arm*-semi) |
| 1560 | - os=-aout | |
| 1539 | + os= | |
| 1540 | + obj=aout | |
| 1561 | 1541 | ;; |
| 1562 | 1542 | c4x-* | tic4x-*) |
| 1563 | - os=-coff | |
| 1543 | + os= | |
| 1544 | + obj=coff | |
| 1564 | 1545 | ;; |
| 1565 | 1546 | c8051-*) |
| 1566 | - os=-elf | |
| 1547 | + os= | |
| 1548 | + obj=elf | |
| 1549 | + ;; | |
| 1550 | + clipper-intergraph) | |
| 1551 | + os=clix | |
| 1567 | 1552 | ;; |
| 1568 | 1553 | hexagon-*) |
| 1569 | - os=-elf | |
| 1554 | + os= | |
| 1555 | + obj=elf | |
| 1570 | 1556 | ;; |
| 1571 | 1557 | tic54x-*) |
| 1572 | - os=-coff | |
| 1558 | + os= | |
| 1559 | + obj=coff | |
| 1573 | 1560 | ;; |
| 1574 | 1561 | tic55x-*) |
| 1575 | - os=-coff | |
| 1562 | + os= | |
| 1563 | + obj=coff | |
| 1576 | 1564 | ;; |
| 1577 | 1565 | tic6x-*) |
| 1578 | - os=-coff | |
| 1566 | + os= | |
| 1567 | + obj=coff | |
| 1579 | 1568 | ;; |
| 1580 | 1569 | # This must come before the *-dec entry. |
| 1581 | 1570 | pdp10-*) |
| 1582 | - os=-tops20 | |
| 1571 | + os=tops20 | |
| 1583 | 1572 | ;; |
| 1584 | 1573 | pdp11-*) |
| 1585 | - os=-none | |
| 1574 | + os=none | |
| 1586 | 1575 | ;; |
| 1587 | 1576 | *-dec | vax-*) |
| 1588 | - os=-ultrix4.2 | |
| 1577 | + os=ultrix4.2 | |
| 1589 | 1578 | ;; |
| 1590 | 1579 | m68*-apollo) |
| 1591 | - os=-domain | |
| 1580 | + os=domain | |
| 1592 | 1581 | ;; |
| 1593 | 1582 | i386-sun) |
| 1594 | - os=-sunos4.0.2 | |
| 1583 | + os=sunos4.0.2 | |
| 1595 | 1584 | ;; |
| 1596 | 1585 | m68000-sun) |
| 1597 | - os=-sunos3 | |
| 1586 | + os=sunos3 | |
| 1598 | 1587 | ;; |
| 1599 | 1588 | m68*-cisco) |
| 1600 | - os=-aout | |
| 1589 | + os= | |
| 1590 | + obj=aout | |
| 1601 | 1591 | ;; |
| 1602 | 1592 | mep-*) |
| 1603 | - os=-elf | |
| 1593 | + os= | |
| 1594 | + obj=elf | |
| 1604 | 1595 | ;; |
| 1605 | 1596 | mips*-cisco) |
| 1606 | - os=-elf | |
| 1597 | + os= | |
| 1598 | + obj=elf | |
| 1607 | 1599 | ;; |
| 1608 | 1600 | mips*-*) |
| 1609 | - os=-elf | |
| 1601 | + os= | |
| 1602 | + obj=elf | |
| 1610 | 1603 | ;; |
| 1611 | 1604 | or32-*) |
| 1612 | - os=-coff | |
| 1605 | + os= | |
| 1606 | + obj=coff | |
| 1613 | 1607 | ;; |
| 1614 | 1608 | *-tti) # must be before sparc entry or we get the wrong os. |
| 1615 | - os=-sysv3 | |
| 1609 | + os=sysv3 | |
| 1616 | 1610 | ;; |
| 1617 | 1611 | sparc-* | *-sun) |
| 1618 | - os=-sunos4.1.1 | |
| 1612 | + os=sunos4.1.1 | |
| 1619 | 1613 | ;; |
| 1620 | 1614 | pru-*) |
| 1621 | - os=-elf | |
| 1615 | + os= | |
| 1616 | + obj=elf | |
| 1622 | 1617 | ;; |
| 1623 | 1618 | *-be) |
| 1624 | - os=-beos | |
| 1619 | + os=beos | |
| 1625 | 1620 | ;; |
| 1626 | 1621 | *-ibm) |
| 1627 | - os=-aix | |
| 1622 | + os=aix | |
| 1628 | 1623 | ;; |
| 1629 | 1624 | *-knuth) |
| 1630 | - os=-mmixware | |
| 1625 | + os=mmixware | |
| 1631 | 1626 | ;; |
| 1632 | 1627 | *-wec) |
| 1633 | - os=-proelf | |
| 1628 | + os=proelf | |
| 1634 | 1629 | ;; |
| 1635 | 1630 | *-winbond) |
| 1636 | - os=-proelf | |
| 1631 | + os=proelf | |
| 1637 | 1632 | ;; |
| 1638 | 1633 | *-oki) |
| 1639 | - os=-proelf | |
| 1634 | + os=proelf | |
| 1640 | 1635 | ;; |
| 1641 | 1636 | *-hp) |
| 1642 | - os=-hpux | |
| 1637 | + os=hpux | |
| 1643 | 1638 | ;; |
| 1644 | 1639 | *-hitachi) |
| 1645 | - os=-hiux | |
| 1640 | + os=hiux | |
| 1646 | 1641 | ;; |
| 1647 | 1642 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
| 1648 | - os=-sysv | |
| 1643 | + os=sysv | |
| 1649 | 1644 | ;; |
| 1650 | 1645 | *-cbm) |
| 1651 | - os=-amigaos | |
| 1646 | + os=amigaos | |
| 1652 | 1647 | ;; |
| 1653 | 1648 | *-dg) |
| 1654 | - os=-dgux | |
| 1649 | + os=dgux | |
| 1655 | 1650 | ;; |
| 1656 | 1651 | *-dolphin) |
| 1657 | - os=-sysv3 | |
| 1652 | + os=sysv3 | |
| 1658 | 1653 | ;; |
| 1659 | 1654 | m68k-ccur) |
| 1660 | - os=-rtu | |
| 1655 | + os=rtu | |
| 1661 | 1656 | ;; |
| 1662 | 1657 | m88k-omron*) |
| 1663 | - os=-luna | |
| 1658 | + os=luna | |
| 1664 | 1659 | ;; |
| 1665 | 1660 | *-next) |
| 1666 | - os=-nextstep | |
| 1661 | + os=nextstep | |
| 1667 | 1662 | ;; |
| 1668 | 1663 | *-sequent) |
| 1669 | - os=-ptx | |
| 1664 | + os=ptx | |
| 1670 | 1665 | ;; |
| 1671 | 1666 | *-crds) |
| 1672 | - os=-unos | |
| 1667 | + os=unos | |
| 1673 | 1668 | ;; |
| 1674 | 1669 | *-ns) |
| 1675 | - os=-genix | |
| 1670 | + os=genix | |
| 1676 | 1671 | ;; |
| 1677 | 1672 | i370-*) |
| 1678 | - os=-mvs | |
| 1673 | + os=mvs | |
| 1679 | 1674 | ;; |
| 1680 | 1675 | *-gould) |
| 1681 | - os=-sysv | |
| 1676 | + os=sysv | |
| 1682 | 1677 | ;; |
| 1683 | 1678 | *-highlevel) |
| 1684 | - os=-bsd | |
| 1679 | + os=bsd | |
| 1685 | 1680 | ;; |
| 1686 | 1681 | *-encore) |
| 1687 | - os=-bsd | |
| 1682 | + os=bsd | |
| 1688 | 1683 | ;; |
| 1689 | 1684 | *-sgi) |
| 1690 | - os=-irix | |
| 1685 | + os=irix | |
| 1691 | 1686 | ;; |
| 1692 | 1687 | *-siemens) |
| 1693 | - os=-sysv4 | |
| 1688 | + os=sysv4 | |
| 1694 | 1689 | ;; |
| 1695 | 1690 | *-masscomp) |
| 1696 | - os=-rtu | |
| 1691 | + os=rtu | |
| 1697 | 1692 | ;; |
| 1698 | 1693 | f30[01]-fujitsu | f700-fujitsu) |
| 1699 | - os=-uxpv | |
| 1694 | + os=uxpv | |
| 1700 | 1695 | ;; |
| 1701 | 1696 | *-rom68k) |
| 1702 | - os=-coff | |
| 1697 | + os= | |
| 1698 | + obj=coff | |
| 1703 | 1699 | ;; |
| 1704 | 1700 | *-*bug) |
| 1705 | - os=-coff | |
| 1701 | + os= | |
| 1702 | + obj=coff | |
| 1706 | 1703 | ;; |
| 1707 | 1704 | *-apple) |
| 1708 | - os=-macos | |
| 1705 | + os=macos | |
| 1709 | 1706 | ;; |
| 1710 | 1707 | *-atari*) |
| 1711 | - os=-mint | |
| 1708 | + os=mint | |
| 1709 | + ;; | |
| 1710 | + *-wrs) | |
| 1711 | + os=vxworks | |
| 1712 | + ;; | |
| 1713 | + *) | |
| 1714 | + os=none | |
| 1715 | + ;; | |
| 1716 | +esac | |
| 1717 | + | |
| 1718 | +fi | |
| 1719 | + | |
| 1720 | +# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). | |
| 1721 | + | |
| 1722 | +case $os in | |
| 1723 | + # Sometimes we do "kernel-libc", so those need to count as OSes. | |
| 1724 | + musl* | newlib* | relibc* | uclibc*) | |
| 1725 | + ;; | |
| 1726 | + # Likewise for "kernel-abi" | |
| 1727 | + eabi* | gnueabi*) | |
| 1728 | + ;; | |
| 1729 | + # VxWorks passes extra cpu info in the 4th filed. | |
| 1730 | + simlinux | simwindows | spe) | |
| 1731 | + ;; | |
| 1732 | + # See `case $cpu-$os` validation below | |
| 1733 | + ghcjs) | |
| 1734 | + ;; | |
| 1735 | + # Now accept the basic system types. | |
| 1736 | + # The portable systems comes first. | |
| 1737 | + # Each alternative MUST end in a * to match a version number. | |
| 1738 | + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | |
| 1739 | + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ | |
| 1740 | + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | |
| 1741 | + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | |
| 1742 | + | hiux* | abug | nacl* | netware* | windows* \ | |
| 1743 | + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | |
| 1744 | + | mpw* | magic* | mmixware* | mon960* | lnews* \ | |
| 1745 | + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | |
| 1746 | + | aos* | aros* | cloudabi* | sortix* | twizzler* \ | |
| 1747 | + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | |
| 1748 | + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | |
| 1749 | + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | |
| 1750 | + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | |
| 1751 | + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | |
| 1752 | + | bosx* | nextstep* | cxux* | oabi* \ | |
| 1753 | + | ptx* | ecoff* | winnt* | domain* | vsta* \ | |
| 1754 | + | udi* | lites* | ieee* | go32* | aux* | hcos* \ | |
| 1755 | + | chorusrdb* | cegcc* | glidix* | serenity* \ | |
| 1756 | + | cygwin* | msys* | moss* | proelf* | rtems* \ | |
| 1757 | + | midipix* | mingw32* | mingw64* | mint* \ | |
| 1758 | + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | |
| 1759 | + | interix* | uwin* | mks* | rhapsody* | darwin* \ | |
| 1760 | + | openstep* | oskit* | conix* | pw32* | nonstopux* \ | |
| 1761 | + | storm-chaos* | tops10* | tenex* | tops20* | its* \ | |
| 1762 | + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ | |
| 1763 | + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ | |
| 1764 | + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | |
| 1765 | + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | |
| 1766 | + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | |
| 1767 | + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | |
| 1768 | + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ | |
| 1769 | + | fiwix* | mlibc* | cos* | mbr* ) | |
| 1770 | + ;; | |
| 1771 | + # This one is extra strict with allowed versions | |
| 1772 | + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) | |
| 1773 | + # Don't forget version if it is 3.2v4 or newer. | |
| 1774 | + ;; | |
| 1775 | + none) | |
| 1776 | + ;; | |
| 1777 | + kernel* | msvc* ) | |
| 1778 | + # Restricted further below | |
| 1779 | + ;; | |
| 1780 | + '') | |
| 1781 | + if test x"$obj" = x | |
| 1782 | + then | |
| 1783 | + echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 | |
| 1784 | + fi | |
| 1785 | + ;; | |
| 1786 | + *) | |
| 1787 | + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 | |
| 1788 | + exit 1 | |
| 1789 | + ;; | |
| 1790 | +esac | |
| 1791 | + | |
| 1792 | +case $obj in | |
| 1793 | + aout* | coff* | elf* | pe*) | |
| 1794 | + ;; | |
| 1795 | + '') | |
| 1796 | + # empty is fine | |
| 1712 | 1797 | ;; |
| 1713 | 1798 | *) |
| 1714 | - os=-none | |
| 1799 | + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 | |
| 1800 | + exit 1 | |
| 1801 | + ;; | |
| 1802 | +esac | |
| 1803 | + | |
| 1804 | +# Here we handle the constraint that a (synthetic) cpu and os are | |
| 1805 | +# valid only in combination with each other and nowhere else. | |
| 1806 | +case $cpu-$os in | |
| 1807 | + # The "javascript-unknown-ghcjs" triple is used by GHC; we | |
| 1808 | + # accept it here in order to tolerate that, but reject any | |
| 1809 | + # variations. | |
| 1810 | + javascript-ghcjs) | |
| 1811 | + ;; | |
| 1812 | + javascript-* | *-ghcjs) | |
| 1813 | + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 | |
| 1814 | + exit 1 | |
| 1715 | 1815 | ;; |
| 1716 | 1816 | esac |
| 1717 | -fi | |
| 1817 | + | |
| 1818 | +# As a final step for OS-related things, validate the OS-kernel combination | |
| 1819 | +# (given a valid OS), if there is a kernel. | |
| 1820 | +case $kernel-$os-$obj in | |
| 1821 | + linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ | |
| 1822 | + | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) | |
| 1823 | + ;; | |
| 1824 | + uclinux-uclibc*- ) | |
| 1825 | + ;; | |
| 1826 | + managarm-mlibc*- | managarm-kernel*- ) | |
| 1827 | + ;; | |
| 1828 | + windows*-msvc*-) | |
| 1829 | + ;; | |
| 1830 | + -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) | |
| 1831 | + # These are just libc implementations, not actual OSes, and thus | |
| 1832 | + # require a kernel. | |
| 1833 | + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 | |
| 1834 | + exit 1 | |
| 1835 | + ;; | |
| 1836 | + -kernel*- ) | |
| 1837 | + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 | |
| 1838 | + exit 1 | |
| 1839 | + ;; | |
| 1840 | + *-kernel*- ) | |
| 1841 | + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 | |
| 1842 | + exit 1 | |
| 1843 | + ;; | |
| 1844 | + *-msvc*- ) | |
| 1845 | + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 | |
| 1846 | + exit 1 | |
| 1847 | + ;; | |
| 1848 | + kfreebsd*-gnu*- | kopensolaris*-gnu*-) | |
| 1849 | + ;; | |
| 1850 | + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) | |
| 1851 | + ;; | |
| 1852 | + nto-qnx*-) | |
| 1853 | + ;; | |
| 1854 | + os2-emx-) | |
| 1855 | + ;; | |
| 1856 | + *-eabi*- | *-gnueabi*-) | |
| 1857 | + ;; | |
| 1858 | + none--*) | |
| 1859 | + # None (no kernel, i.e. freestanding / bare metal), | |
| 1860 | + # can be paired with an machine code file format | |
| 1861 | + ;; | |
| 1862 | + -*-) | |
| 1863 | + # Blank kernel with real OS is always fine. | |
| 1864 | + ;; | |
| 1865 | + --*) | |
| 1866 | + # Blank kernel and OS with real machine code file format is always fine. | |
| 1867 | + ;; | |
| 1868 | + *-*-*) | |
| 1869 | + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 | |
| 1870 | + exit 1 | |
| 1871 | + ;; | |
| 1872 | +esac | |
| 1718 | 1873 | |
| 1719 | 1874 | # Here we handle the case where we know the os, and the CPU type, but not the |
| 1720 | 1875 | # manufacturer. We pick the logical manufacturer. |
| 1721 | -vendor=unknown | |
| 1722 | -case $basic_machine in | |
| 1723 | - *-unknown) | |
| 1724 | - case $os in | |
| 1725 | - -riscix*) | |
| 1876 | +case $vendor in | |
| 1877 | + unknown) | |
| 1878 | + case $cpu-$os in | |
| 1879 | + *-riscix*) | |
| 1726 | 1880 | vendor=acorn |
| 1727 | 1881 | ;; |
| 1728 | - -sunos*) | |
| 1882 | + *-sunos*) | |
| 1729 | 1883 | vendor=sun |
| 1730 | 1884 | ;; |
| 1731 | - -cnk*|-aix*) | |
| 1885 | + *-cnk* | *-aix*) | |
| 1732 | 1886 | vendor=ibm |
| 1733 | 1887 | ;; |
| 1734 | - -beos*) | |
| 1888 | + *-beos*) | |
| 1735 | 1889 | vendor=be |
| 1736 | 1890 | ;; |
| 1737 | - -hpux*) | |
| 1891 | + *-hpux*) | |
| 1738 | 1892 | vendor=hp |
| 1739 | 1893 | ;; |
| 1740 | - -mpeix*) | |
| 1894 | + *-mpeix*) | |
| 1741 | 1895 | vendor=hp |
| 1742 | 1896 | ;; |
| 1743 | - -hiux*) | |
| 1897 | + *-hiux*) | |
| 1744 | 1898 | vendor=hitachi |
| 1745 | 1899 | ;; |
| 1746 | - -unos*) | |
| 1900 | + *-unos*) | |
| 1747 | 1901 | vendor=crds |
| 1748 | 1902 | ;; |
| 1749 | - -dgux*) | |
| 1903 | + *-dgux*) | |
| 1750 | 1904 | vendor=dg |
| 1751 | 1905 | ;; |
| 1752 | - -luna*) | |
| 1906 | + *-luna*) | |
| 1753 | 1907 | vendor=omron |
| 1754 | 1908 | ;; |
| 1755 | - -genix*) | |
| 1756 | - vendor=ns | |
| 1757 | - ;; | |
| 1758 | - -mvs* | -opened*) | |
| 1759 | - vendor=ibm | |
| 1760 | - ;; | |
| 1761 | - -os400*) | |
| 1762 | - vendor=ibm | |
| 1763 | - ;; | |
| 1764 | - -ptx*) | |
| 1765 | - vendor=sequent | |
| 1766 | - ;; | |
| 1767 | - -tpf*) | |
| 1768 | - vendor=ibm | |
| 1769 | - ;; | |
| 1770 | - -vxsim* | -vxworks* | -windiss*) | |
| 1771 | - vendor=wrs | |
| 1772 | - ;; | |
| 1773 | - -aux*) | |
| 1774 | - vendor=apple | |
| 1775 | - ;; | |
| 1776 | - -hms*) | |
| 1777 | - vendor=hitachi | |
| 1778 | - ;; | |
| 1779 | - -mpw* | -macos*) | |
| 1780 | - vendor=apple | |
| 1781 | - ;; | |
| 1782 | - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
| 1783 | - vendor=atari | |
| 1784 | - ;; | |
| 1785 | - -vos*) | |
| 1909 | + *-genix*) | |
| 1910 | + vendor=ns | |
| 1911 | + ;; | |
| 1912 | + *-clix*) | |
| 1913 | + vendor=intergraph | |
| 1914 | + ;; | |
| 1915 | + *-mvs* | *-opened*) | |
| 1916 | + vendor=ibm | |
| 1917 | + ;; | |
| 1918 | + *-os400*) | |
| 1919 | + vendor=ibm | |
| 1920 | + ;; | |
| 1921 | + s390-* | s390x-*) | |
| 1922 | + vendor=ibm | |
| 1923 | + ;; | |
| 1924 | + *-ptx*) | |
| 1925 | + vendor=sequent | |
| 1926 | + ;; | |
| 1927 | + *-tpf*) | |
| 1928 | + vendor=ibm | |
| 1929 | + ;; | |
| 1930 | + *-vxsim* | *-vxworks* | *-windiss*) | |
| 1931 | + vendor=wrs | |
| 1932 | + ;; | |
| 1933 | + *-aux*) | |
| 1934 | + vendor=apple | |
| 1935 | + ;; | |
| 1936 | + *-hms*) | |
| 1937 | + vendor=hitachi | |
| 1938 | + ;; | |
| 1939 | + *-mpw* | *-macos*) | |
| 1940 | + vendor=apple | |
| 1941 | + ;; | |
| 1942 | + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) | |
| 1943 | + vendor=atari | |
| 1944 | + ;; | |
| 1945 | + *-vos*) | |
| 1786 | 1946 | vendor=stratus |
| 1787 | 1947 | ;; |
| 1788 | 1948 | esac |
| 1789 | - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` | |
| 1790 | 1949 | ;; |
| 1791 | 1950 | esac |
| 1792 | 1951 | |
| 1793 | -echo "$basic_machine$os" | |
| 1952 | +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" | |
| 1794 | 1953 | exit |
| 1795 | 1954 | |
| 1796 | 1955 | # Local variables: |
| 1797 | 1956 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1798 | 1957 | # time-stamp-start: "timestamp='" |
| 1799 | 1958 | # time-stamp-format: "%:y-%02m-%02d" |
| 1800 | 1959 | # time-stamp-end: "'" |
| 1801 | 1960 | # End: |
| 1802 | 1961 |
| --- autosetup/autosetup-config.sub | |
| +++ autosetup/autosetup-config.sub | |
| @@ -1,14 +1,16 @@ | |
| 1 | #! /bin/sh |
| 2 | # Configuration validation subroutine script. |
| 3 | # Copyright 1992-2018 Free Software Foundation, Inc. |
| 4 | |
| 5 | timestamp='2018-03-08' |
| 6 | |
| 7 | # This file is free software; you can redistribute it and/or modify it |
| 8 | # under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 3 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, but |
| 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -31,11 +33,11 @@ | |
| 31 | # Supply the specified configuration type as an argument. |
| 32 | # If it is invalid, we print an error message on stderr and exit with code 1. |
| 33 | # Otherwise, we print the canonical config type on stdout and succeed. |
| 34 | |
| 35 | # 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 |
| 37 | |
| 38 | # This file is supposed to be the same for all GNU packages |
| 39 | # and recognize all the CPU types, system types and aliases |
| 40 | # that are meaningful with *any* GNU software. |
| 41 | # Each package is responsible for reporting which valid configurations |
| @@ -47,10 +49,17 @@ | |
| 47 | # machine specification into a single specification in the form: |
| 48 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
| 49 | # or in some cases, the newer four-part form: |
| 50 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
| 51 | # It is wrong to echo any other type of specification. |
| 52 | |
| 53 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 54 | |
| 55 | usage="\ |
| 56 | Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS |
| @@ -65,17 +74,17 @@ | |
| 65 | Report bugs and patches to <[email protected]>." |
| 66 | |
| 67 | version="\ |
| 68 | GNU config.sub ($timestamp) |
| 69 | |
| 70 | Copyright 1992-2018 Free Software Foundation, Inc. |
| 71 | |
| 72 | This is free software; see the source for copying conditions. There is NO |
| 73 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 74 | |
| 75 | help=" |
| 76 | Try \`$me --help' for more information." |
| 77 | |
| 78 | # Parse command line |
| 79 | while test $# -gt 0 ; do |
| 80 | case $1 in |
| 81 | --time-stamp | --time* | -t ) |
| @@ -87,11 +96,11 @@ | |
| 87 | -- ) # Stop option processing |
| 88 | shift; break ;; |
| 89 | - ) # Use stdin as input. |
| 90 | break ;; |
| 91 | -* ) |
| 92 | echo "$me: invalid option $1$help" |
| 93 | exit 1 ;; |
| 94 | |
| 95 | *local*) |
| 96 | # First pass through any local machine types. |
| 97 | echo "$1" |
| @@ -108,1431 +117,1396 @@ | |
| 108 | 1) ;; |
| 109 | *) echo "$me: too many arguments$help" >&2 |
| 110 | exit 1;; |
| 111 | esac |
| 112 | |
| 113 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
| 114 | # Here we must recognize all the valid KERNEL-OS combinations. |
| 115 | maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
| 116 | case $maybe_os in |
| 117 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ |
| 118 | linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ |
| 119 | knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ |
| 120 | kopensolaris*-gnu* | cloudabi*-eabi* | \ |
| 121 | storm-chaos* | os2-emx* | rtmk-nova*) |
| 122 | os=-$maybe_os |
| 123 | basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
| 124 | ;; |
| 125 | android-linux) |
| 126 | os=-linux-android |
| 127 | basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown |
| 128 | ;; |
| 129 | *) |
| 130 | basic_machine=`echo "$1" | sed 's/-[^-]*$//'` |
| 131 | if [ "$basic_machine" != "$1" ] |
| 132 | then os=`echo "$1" | sed 's/.*-/-/'` |
| 133 | else os=; fi |
| 134 | ;; |
| 135 | esac |
| 136 | |
| 137 | ### Let's recognize common machines as not being operating systems so |
| 138 | ### that things like config.sub decstation-3100 work. We also |
| 139 | ### recognize some manufacturers as not being operating systems, so we |
| 140 | ### can provide default operating systems below. |
| 141 | case $os in |
| 142 | -sun*os*) |
| 143 | # Prevent following clause from handling this invalid input. |
| 144 | ;; |
| 145 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
| 146 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ |
| 147 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
| 148 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
| 149 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
| 150 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
| 151 | -apple | -axis | -knuth | -cray | -microblaze*) |
| 152 | os= |
| 153 | basic_machine=$1 |
| 154 | ;; |
| 155 | -bluegene*) |
| 156 | os=-cnk |
| 157 | ;; |
| 158 | -sim | -cisco | -oki | -wec | -winbond) |
| 159 | os= |
| 160 | basic_machine=$1 |
| 161 | ;; |
| 162 | -scout) |
| 163 | ;; |
| 164 | -wrs) |
| 165 | os=-vxworks |
| 166 | basic_machine=$1 |
| 167 | ;; |
| 168 | -chorusos*) |
| 169 | os=-chorusos |
| 170 | basic_machine=$1 |
| 171 | ;; |
| 172 | -chorusrdb) |
| 173 | os=-chorusrdb |
| 174 | basic_machine=$1 |
| 175 | ;; |
| 176 | -hiux*) |
| 177 | os=-hiuxwe2 |
| 178 | ;; |
| 179 | -sco6) |
| 180 | os=-sco5v6 |
| 181 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 182 | ;; |
| 183 | -sco5) |
| 184 | os=-sco3.2v5 |
| 185 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 186 | ;; |
| 187 | -sco4) |
| 188 | os=-sco3.2v4 |
| 189 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 190 | ;; |
| 191 | -sco3.2.[4-9]*) |
| 192 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
| 193 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 194 | ;; |
| 195 | -sco3.2v[4-9]*) |
| 196 | # Don't forget version if it is 3.2v4 or newer. |
| 197 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 198 | ;; |
| 199 | -sco5v6*) |
| 200 | # Don't forget version if it is 3.2v4 or newer. |
| 201 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 202 | ;; |
| 203 | -sco*) |
| 204 | os=-sco3.2v2 |
| 205 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 206 | ;; |
| 207 | -udk*) |
| 208 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 209 | ;; |
| 210 | -isc) |
| 211 | os=-isc2.2 |
| 212 | basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` |
| 213 | ;; |
| 214 | -clix*) |
| 215 | basic_machine=clipper-intergraph |
| 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 |
| 238 | ;; |
| 239 | esac |
| 240 | |
| 241 | # Decode aliases for certain CPU-COMPANY combinations. |
| 242 | case $basic_machine in |
| 243 | # Recognize the basic CPU types without company name. |
| 244 | # Some are omitted here because they have special meanings below. |
| 245 | 1750a | 580 \ |
| 246 | | a29k \ |
| 247 | | aarch64 | aarch64_be \ |
| 248 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ |
| 249 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ |
| 250 | | am33_2.0 \ |
| 251 | | arc | arceb \ |
| 252 | | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ |
| 253 | | avr | avr32 \ |
| 254 | | ba \ |
| 255 | | be32 | be64 \ |
| 256 | | bfin \ |
| 257 | | c4x | c8051 | clipper \ |
| 258 | | d10v | d30v | dlx | dsp16xx \ |
| 259 | | e2k | epiphany \ |
| 260 | | fido | fr30 | frv | ft32 \ |
| 261 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
| 262 | | hexagon \ |
| 263 | | i370 | i860 | i960 | ia16 | ia64 \ |
| 264 | | ip2k | iq2000 \ |
| 265 | | k1om \ |
| 266 | | le32 | le64 \ |
| 267 | | lm32 \ |
| 268 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ |
| 269 | | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ |
| 270 | | mips | mipsbe | mipseb | mipsel | mipsle \ |
| 271 | | mips16 \ |
| 272 | | mips64 | mips64el \ |
| 273 | | mips64octeon | mips64octeonel \ |
| 274 | | mips64orion | mips64orionel \ |
| 275 | | mips64r5900 | mips64r5900el \ |
| 276 | | mips64vr | mips64vrel \ |
| 277 | | mips64vr4100 | mips64vr4100el \ |
| 278 | | mips64vr4300 | mips64vr4300el \ |
| 279 | | mips64vr5000 | mips64vr5000el \ |
| 280 | | mips64vr5900 | mips64vr5900el \ |
| 281 | | mipsisa32 | mipsisa32el \ |
| 282 | | mipsisa32r2 | mipsisa32r2el \ |
| 283 | | mipsisa32r6 | mipsisa32r6el \ |
| 284 | | mipsisa64 | mipsisa64el \ |
| 285 | | mipsisa64r2 | mipsisa64r2el \ |
| 286 | | mipsisa64r6 | mipsisa64r6el \ |
| 287 | | mipsisa64sb1 | mipsisa64sb1el \ |
| 288 | | mipsisa64sr71k | mipsisa64sr71kel \ |
| 289 | | mipsr5900 | mipsr5900el \ |
| 290 | | mipstx39 | mipstx39el \ |
| 291 | | mn10200 | mn10300 \ |
| 292 | | moxie \ |
| 293 | | mt \ |
| 294 | | msp430 \ |
| 295 | | nds32 | nds32le | nds32be \ |
| 296 | | nios | nios2 | nios2eb | nios2el \ |
| 297 | | ns16k | ns32k \ |
| 298 | | open8 | or1k | or1knd | or32 \ |
| 299 | | pdp10 | pj | pjl \ |
| 300 | | powerpc | powerpc64 | powerpc64le | powerpcle \ |
| 301 | | pru \ |
| 302 | | pyramid \ |
| 303 | | riscv32 | riscv64 \ |
| 304 | | rl78 | rx \ |
| 305 | | score \ |
| 306 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
| 307 | | sh64 | sh64le \ |
| 308 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
| 309 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
| 310 | | spu \ |
| 311 | | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ |
| 312 | | ubicom32 \ |
| 313 | | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ |
| 314 | | visium \ |
| 315 | | wasm32 \ |
| 316 | | x86 | xc16x | xstormy16 | xtensa \ |
| 317 | | z8k | z80) |
| 318 | basic_machine=$basic_machine-unknown |
| 319 | ;; |
| 320 | c54x) |
| 321 | basic_machine=tic54x-unknown |
| 322 | ;; |
| 323 | c55x) |
| 324 | basic_machine=tic55x-unknown |
| 325 | ;; |
| 326 | c6x) |
| 327 | basic_machine=tic6x-unknown |
| 328 | ;; |
| 329 | leon|leon[3-9]) |
| 330 | basic_machine=sparc-$basic_machine |
| 331 | ;; |
| 332 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) |
| 333 | basic_machine=$basic_machine-unknown |
| 334 | os=-none |
| 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 |
| 344 | ;; |
| 345 | xgate) |
| 346 | basic_machine=$basic_machine-unknown |
| 347 | os=-none |
| 348 | ;; |
| 349 | xscaleeb) |
| 350 | basic_machine=armeb-unknown |
| 351 | ;; |
| 352 | |
| 353 | xscaleel) |
| 354 | basic_machine=armel-unknown |
| 355 | ;; |
| 356 | |
| 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 | # Recognize the various machine names and aliases which stand |
| 458 | # for a CPU type and a company and sometimes even an OS. |
| 459 | 386bsd) |
| 460 | basic_machine=i386-pc |
| 461 | os=-bsd |
| 462 | ;; |
| 463 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
| 464 | basic_machine=m68000-att |
| 465 | ;; |
| 466 | 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 |
| 541 | ;; |
| 542 | 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 |
| 613 | ;; |
| 614 | decsystem10* | dec10*) |
| 615 | basic_machine=pdp10-dec |
| 616 | os=-tops10 |
| 617 | ;; |
| 618 | 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 |
| 645 | ;; |
| 646 | e500v[12]) |
| 647 | basic_machine=powerpc-unknown |
| 648 | os=$os"spe" |
| 649 | ;; |
| 650 | e500v[12]-*) |
| 651 | basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 652 | os=$os"spe" |
| 653 | ;; |
| 654 | ebmon29k) |
| 655 | basic_machine=a29k-amd |
| 656 | os=-ebmon |
| 657 | ;; |
| 658 | elxsi) |
| 659 | basic_machine=elxsi-elxsi |
| 660 | os=-bsd |
| 661 | ;; |
| 662 | encore | umax | mmax) |
| 663 | basic_machine=ns32k-encore |
| 664 | ;; |
| 665 | es1800 | OSE68k | ose68k | ose | OSE) |
| 666 | basic_machine=m68k-ericsson |
| 667 | os=-ose |
| 668 | ;; |
| 669 | fx2800) |
| 670 | basic_machine=i860-alliant |
| 671 | ;; |
| 672 | 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 |
| 682 | ;; |
| 683 | 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 |
| 713 | ;; |
| 714 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
| 715 | basic_machine=hppa1.0-hp |
| 716 | ;; |
| 717 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
| 718 | basic_machine=m68000-hp |
| 719 | ;; |
| 720 | hp9k3[2-9][0-9]) |
| 721 | basic_machine=m68k-hp |
| 722 | ;; |
| 723 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
| 724 | basic_machine=hppa1.0-hp |
| 725 | ;; |
| 726 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
| 727 | basic_machine=hppa1.1-hp |
| 728 | ;; |
| 729 | hp9k78[0-9] | hp78[0-9]) |
| 730 | # FIXME: really hppa2.0-hp |
| 731 | basic_machine=hppa1.1-hp |
| 732 | ;; |
| 733 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
| 734 | # FIXME: really hppa2.0-hp |
| 735 | basic_machine=hppa1.1-hp |
| 736 | ;; |
| 737 | hp9k8[0-9][13679] | hp8[0-9][13679]) |
| 738 | basic_machine=hppa1.1-hp |
| 739 | ;; |
| 740 | 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 |
| 753 | ;; |
| 754 | i*86v32) |
| 755 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
| 756 | os=-sysv32 |
| 757 | ;; |
| 758 | i*86v4*) |
| 759 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
| 760 | os=-sysv4 |
| 761 | ;; |
| 762 | i*86v) |
| 763 | basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` |
| 764 | os=-sysv |
| 765 | ;; |
| 766 | 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 |
| 773 | ;; |
| 774 | vsta) |
| 775 | basic_machine=i386-unknown |
| 776 | os=-vsta |
| 777 | ;; |
| 778 | iris | iris4d) |
| 779 | basic_machine=mips-sgi |
| 780 | case $os in |
| 781 | -irix*) |
| 782 | ;; |
| 783 | *) |
| 784 | os=-irix4 |
| 785 | ;; |
| 786 | esac |
| 787 | ;; |
| 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 | miniframe) |
| 827 | basic_machine=m68000-convergent |
| 828 | ;; |
| 829 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) |
| 830 | basic_machine=m68k-atari |
| 831 | os=-mint |
| 832 | ;; |
| 833 | mips3*-*) |
| 834 | basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` |
| 835 | ;; |
| 836 | mips3*) |
| 837 | basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown |
| 838 | ;; |
| 839 | monitor) |
| 840 | basic_machine=m68k-rom68k |
| 841 | os=-coff |
| 842 | ;; |
| 843 | morphos) |
| 844 | basic_machine=powerpc-unknown |
| 845 | os=-morphos |
| 846 | ;; |
| 847 | moxiebox) |
| 848 | basic_machine=moxie-unknown |
| 849 | os=-moxiebox |
| 850 | ;; |
| 851 | msdos) |
| 852 | basic_machine=i386-pc |
| 853 | os=-msdos |
| 854 | ;; |
| 855 | ms1-*) |
| 856 | basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` |
| 857 | ;; |
| 858 | msys) |
| 859 | basic_machine=i686-pc |
| 860 | os=-msys |
| 861 | ;; |
| 862 | mvs) |
| 863 | basic_machine=i370-ibm |
| 864 | os=-mvs |
| 865 | ;; |
| 866 | nacl) |
| 867 | basic_machine=le32-unknown |
| 868 | os=-nacl |
| 869 | ;; |
| 870 | ncr3000) |
| 871 | basic_machine=i486-ncr |
| 872 | os=-sysv4 |
| 873 | ;; |
| 874 | netbsd386) |
| 875 | basic_machine=i386-unknown |
| 876 | os=-netbsd |
| 877 | ;; |
| 878 | netwinder) |
| 879 | basic_machine=armv4l-rebel |
| 880 | os=-linux |
| 881 | ;; |
| 882 | news | news700 | news800 | news900) |
| 883 | basic_machine=m68k-sony |
| 884 | os=-newsos |
| 885 | ;; |
| 886 | news1000) |
| 887 | basic_machine=m68030-sony |
| 888 | os=-newsos |
| 889 | ;; |
| 890 | news-3600 | risc-news) |
| 891 | basic_machine=mips-sony |
| 892 | os=-newsos |
| 893 | ;; |
| 894 | necv70) |
| 895 | basic_machine=v70-nec |
| 896 | os=-sysv |
| 897 | ;; |
| 898 | 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 |
| 914 | ;; |
| 915 | nh[45]000) |
| 916 | basic_machine=m88k-harris |
| 917 | os=-cxux |
| 918 | ;; |
| 919 | nindy960) |
| 920 | basic_machine=i960-intel |
| 921 | os=-nindy |
| 922 | ;; |
| 923 | mon960) |
| 924 | basic_machine=i960-intel |
| 925 | os=-mon960 |
| 926 | ;; |
| 927 | nonstopux) |
| 928 | basic_machine=mips-compaq |
| 929 | os=-nonstopux |
| 930 | ;; |
| 931 | np1) |
| 932 | basic_machine=np1-gould |
| 933 | ;; |
| 934 | neo-tandem) |
| 935 | basic_machine=neo-tandem |
| 936 | ;; |
| 937 | nse-tandem) |
| 938 | basic_machine=nse-tandem |
| 939 | ;; |
| 940 | nsr-tandem) |
| 941 | basic_machine=nsr-tandem |
| 942 | ;; |
| 943 | nsv-tandem) |
| 944 | basic_machine=nsv-tandem |
| 945 | ;; |
| 946 | nsx-tandem) |
| 947 | basic_machine=nsx-tandem |
| 948 | ;; |
| 949 | op50n-* | op60c-*) |
| 950 | basic_machine=hppa1.1-oki |
| 951 | os=-proelf |
| 952 | ;; |
| 953 | openrisc | openrisc-*) |
| 954 | basic_machine=or32-unknown |
| 955 | ;; |
| 956 | os400) |
| 957 | basic_machine=powerpc-ibm |
| 958 | os=-os400 |
| 959 | ;; |
| 960 | OSE68000 | ose68000) |
| 961 | basic_machine=m68000-ericsson |
| 962 | os=-ose |
| 963 | ;; |
| 964 | os68k) |
| 965 | basic_machine=m68k-none |
| 966 | os=-os68k |
| 967 | ;; |
| 968 | pa-hitachi) |
| 969 | basic_machine=hppa1.1-hitachi |
| 970 | os=-hiuxwe2 |
| 971 | ;; |
| 972 | paragon) |
| 973 | basic_machine=i860-intel |
| 974 | os=-osf |
| 975 | ;; |
| 976 | parisc) |
| 977 | basic_machine=hppa-unknown |
| 978 | os=-linux |
| 979 | ;; |
| 980 | parisc-*) |
| 981 | basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 982 | os=-linux |
| 983 | ;; |
| 984 | pbd) |
| 985 | basic_machine=sparc-tti |
| 986 | ;; |
| 987 | pbb) |
| 988 | basic_machine=m68k-tti |
| 989 | ;; |
| 990 | pc532 | pc532-*) |
| 991 | basic_machine=ns32k-pc532 |
| 992 | ;; |
| 993 | pc98) |
| 994 | basic_machine=i386-pc |
| 995 | ;; |
| 996 | pc98-*) |
| 997 | basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 998 | ;; |
| 999 | pentium | p5 | k5 | k6 | nexgen | viac3) |
| 1000 | basic_machine=i586-pc |
| 1001 | ;; |
| 1002 | pentiumpro | p6 | 6x86 | athlon | athlon_*) |
| 1003 | basic_machine=i686-pc |
| 1004 | ;; |
| 1005 | pentiumii | pentium2 | pentiumiii | pentium3) |
| 1006 | basic_machine=i686-pc |
| 1007 | ;; |
| 1008 | pentium4) |
| 1009 | basic_machine=i786-pc |
| 1010 | ;; |
| 1011 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
| 1012 | basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1013 | ;; |
| 1014 | pentiumpro-* | p6-* | 6x86-* | athlon-*) |
| 1015 | basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1016 | ;; |
| 1017 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
| 1018 | basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1019 | ;; |
| 1020 | pentium4-*) |
| 1021 | basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1022 | ;; |
| 1023 | pn) |
| 1024 | basic_machine=pn-gould |
| 1025 | ;; |
| 1026 | power) basic_machine=power-ibm |
| 1027 | ;; |
| 1028 | ppc | ppcbe) basic_machine=powerpc-unknown |
| 1029 | ;; |
| 1030 | ppc-* | ppcbe-*) |
| 1031 | basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1032 | ;; |
| 1033 | ppcle | powerpclittle) |
| 1034 | basic_machine=powerpcle-unknown |
| 1035 | ;; |
| 1036 | ppcle-* | powerpclittle-*) |
| 1037 | basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1038 | ;; |
| 1039 | ppc64) basic_machine=powerpc64-unknown |
| 1040 | ;; |
| 1041 | ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1042 | ;; |
| 1043 | ppc64le | powerpc64little) |
| 1044 | basic_machine=powerpc64le-unknown |
| 1045 | ;; |
| 1046 | ppc64le-* | powerpc64little-*) |
| 1047 | basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1048 | ;; |
| 1049 | ps2) |
| 1050 | basic_machine=i386-ibm |
| 1051 | ;; |
| 1052 | pw32) |
| 1053 | basic_machine=i586-unknown |
| 1054 | os=-pw32 |
| 1055 | ;; |
| 1056 | rdos | rdos64) |
| 1057 | basic_machine=x86_64-pc |
| 1058 | os=-rdos |
| 1059 | ;; |
| 1060 | rdos32) |
| 1061 | basic_machine=i386-pc |
| 1062 | os=-rdos |
| 1063 | ;; |
| 1064 | rom68k) |
| 1065 | basic_machine=m68k-rom68k |
| 1066 | os=-coff |
| 1067 | ;; |
| 1068 | rm[46]00) |
| 1069 | basic_machine=mips-siemens |
| 1070 | ;; |
| 1071 | rtpc | rtpc-*) |
| 1072 | basic_machine=romp-ibm |
| 1073 | ;; |
| 1074 | s390 | s390-*) |
| 1075 | basic_machine=s390-ibm |
| 1076 | ;; |
| 1077 | s390x | s390x-*) |
| 1078 | basic_machine=s390x-ibm |
| 1079 | ;; |
| 1080 | sa29200) |
| 1081 | basic_machine=a29k-amd |
| 1082 | os=-udi |
| 1083 | ;; |
| 1084 | sb1) |
| 1085 | basic_machine=mipsisa64sb1-unknown |
| 1086 | ;; |
| 1087 | sb1el) |
| 1088 | basic_machine=mipsisa64sb1el-unknown |
| 1089 | ;; |
| 1090 | sde) |
| 1091 | basic_machine=mipsisa32-sde |
| 1092 | os=-elf |
| 1093 | ;; |
| 1094 | sei) |
| 1095 | basic_machine=mips-sei |
| 1096 | os=-seiux |
| 1097 | ;; |
| 1098 | sequent) |
| 1099 | basic_machine=i386-sequent |
| 1100 | ;; |
| 1101 | sh5el) |
| 1102 | basic_machine=sh5le-unknown |
| 1103 | ;; |
| 1104 | simso-wrs) |
| 1105 | basic_machine=sparclite-wrs |
| 1106 | os=-vxworks |
| 1107 | ;; |
| 1108 | sps7) |
| 1109 | basic_machine=m68k-bull |
| 1110 | os=-sysv2 |
| 1111 | ;; |
| 1112 | spur) |
| 1113 | basic_machine=spur-unknown |
| 1114 | ;; |
| 1115 | st2000) |
| 1116 | basic_machine=m68k-tandem |
| 1117 | ;; |
| 1118 | stratus) |
| 1119 | basic_machine=i860-stratus |
| 1120 | os=-sysv4 |
| 1121 | ;; |
| 1122 | strongarm-* | thumb-*) |
| 1123 | basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` |
| 1124 | ;; |
| 1125 | sun2) |
| 1126 | basic_machine=m68000-sun |
| 1127 | ;; |
| 1128 | sun2os3) |
| 1129 | basic_machine=m68000-sun |
| 1130 | os=-sunos3 |
| 1131 | ;; |
| 1132 | sun2os4) |
| 1133 | basic_machine=m68000-sun |
| 1134 | os=-sunos4 |
| 1135 | ;; |
| 1136 | sun3os3) |
| 1137 | basic_machine=m68k-sun |
| 1138 | os=-sunos3 |
| 1139 | ;; |
| 1140 | sun3os4) |
| 1141 | basic_machine=m68k-sun |
| 1142 | os=-sunos4 |
| 1143 | ;; |
| 1144 | sun4os3) |
| 1145 | basic_machine=sparc-sun |
| 1146 | os=-sunos3 |
| 1147 | ;; |
| 1148 | sun4os4) |
| 1149 | basic_machine=sparc-sun |
| 1150 | os=-sunos4 |
| 1151 | ;; |
| 1152 | sun4sol2) |
| 1153 | basic_machine=sparc-sun |
| 1154 | os=-solaris2 |
| 1155 | ;; |
| 1156 | sun3 | sun3-*) |
| 1157 | basic_machine=m68k-sun |
| 1158 | ;; |
| 1159 | sun4) |
| 1160 | basic_machine=sparc-sun |
| 1161 | ;; |
| 1162 | sun386 | sun386i | roadrunner) |
| 1163 | basic_machine=i386-sun |
| 1164 | ;; |
| 1165 | sv1) |
| 1166 | basic_machine=sv1-cray |
| 1167 | os=-unicos |
| 1168 | ;; |
| 1169 | symmetry) |
| 1170 | basic_machine=i386-sequent |
| 1171 | os=-dynix |
| 1172 | ;; |
| 1173 | t3e) |
| 1174 | basic_machine=alphaev5-cray |
| 1175 | os=-unicos |
| 1176 | ;; |
| 1177 | t90) |
| 1178 | basic_machine=t90-cray |
| 1179 | os=-unicos |
| 1180 | ;; |
| 1181 | tile*) |
| 1182 | basic_machine=$basic_machine-unknown |
| 1183 | os=-linux-gnu |
| 1184 | ;; |
| 1185 | tx39) |
| 1186 | basic_machine=mipstx39-unknown |
| 1187 | ;; |
| 1188 | tx39el) |
| 1189 | basic_machine=mipstx39el-unknown |
| 1190 | ;; |
| 1191 | toad1) |
| 1192 | basic_machine=pdp10-xkl |
| 1193 | os=-tops20 |
| 1194 | ;; |
| 1195 | tower | tower-32) |
| 1196 | basic_machine=m68k-ncr |
| 1197 | ;; |
| 1198 | tpf) |
| 1199 | basic_machine=s390x-ibm |
| 1200 | os=-tpf |
| 1201 | ;; |
| 1202 | udi29k) |
| 1203 | basic_machine=a29k-amd |
| 1204 | os=-udi |
| 1205 | ;; |
| 1206 | ultra3) |
| 1207 | basic_machine=a29k-nyu |
| 1208 | os=-sym1 |
| 1209 | ;; |
| 1210 | v810 | necv810) |
| 1211 | basic_machine=v810-nec |
| 1212 | os=-none |
| 1213 | ;; |
| 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 |
| 1224 | ;; |
| 1225 | vxworks960) |
| 1226 | basic_machine=i960-wrs |
| 1227 | os=-vxworks |
| 1228 | ;; |
| 1229 | vxworks68) |
| 1230 | basic_machine=m68k-wrs |
| 1231 | os=-vxworks |
| 1232 | ;; |
| 1233 | vxworks29k) |
| 1234 | basic_machine=a29k-wrs |
| 1235 | os=-vxworks |
| 1236 | ;; |
| 1237 | w65*) |
| 1238 | basic_machine=w65-wdc |
| 1239 | os=-none |
| 1240 | ;; |
| 1241 | w89k-*) |
| 1242 | basic_machine=hppa1.1-winbond |
| 1243 | os=-proelf |
| 1244 | ;; |
| 1245 | x64) |
| 1246 | basic_machine=x86_64-pc |
| 1247 | ;; |
| 1248 | xbox) |
| 1249 | basic_machine=i686-pc |
| 1250 | os=-mingw32 |
| 1251 | ;; |
| 1252 | xps | xps100) |
| 1253 | basic_machine=xps100-honeywell |
| 1254 | ;; |
| 1255 | xscale-* | xscalee[bl]-*) |
| 1256 | basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` |
| 1257 | ;; |
| 1258 | ymp) |
| 1259 | basic_machine=ymp-cray |
| 1260 | os=-unicos |
| 1261 | ;; |
| 1262 | none) |
| 1263 | basic_machine=none-none |
| 1264 | os=-none |
| 1265 | ;; |
| 1266 | |
| 1267 | # Here we handle the default manufacturer of certain CPU types. It is in |
| 1268 | # some cases the only manufacturer, in others, it is the most popular. |
| 1269 | w89k) |
| 1270 | basic_machine=hppa1.1-winbond |
| 1271 | ;; |
| 1272 | op50n) |
| 1273 | basic_machine=hppa1.1-oki |
| 1274 | ;; |
| 1275 | op60c) |
| 1276 | basic_machine=hppa1.1-oki |
| 1277 | ;; |
| 1278 | romp) |
| 1279 | basic_machine=romp-ibm |
| 1280 | ;; |
| 1281 | mmix) |
| 1282 | basic_machine=mmix-knuth |
| 1283 | ;; |
| 1284 | rs6000) |
| 1285 | basic_machine=rs6000-ibm |
| 1286 | ;; |
| 1287 | vax) |
| 1288 | basic_machine=vax-dec |
| 1289 | ;; |
| 1290 | pdp11) |
| 1291 | basic_machine=pdp11-dec |
| 1292 | ;; |
| 1293 | we32k) |
| 1294 | basic_machine=we32k-att |
| 1295 | ;; |
| 1296 | sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) |
| 1297 | basic_machine=sh-unknown |
| 1298 | ;; |
| 1299 | cydra) |
| 1300 | basic_machine=cydra-cydrome |
| 1301 | ;; |
| 1302 | orion) |
| 1303 | basic_machine=orion-highlevel |
| 1304 | ;; |
| 1305 | orion105) |
| 1306 | basic_machine=clipper-highlevel |
| 1307 | ;; |
| 1308 | mac | mpw | mac-mpw) |
| 1309 | basic_machine=m68k-apple |
| 1310 | ;; |
| 1311 | pmac | pmac-mpw) |
| 1312 | basic_machine=powerpc-apple |
| 1313 | ;; |
| 1314 | *-unknown) |
| 1315 | # Make sure to match an already-canonicalized machine name. |
| 1316 | ;; |
| 1317 | *) |
| 1318 | echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 |
| 1319 | exit 1 |
| 1320 | ;; |
| 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/'` |
| 1327 | ;; |
| 1328 | *-commodore*) |
| 1329 | basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` |
| 1330 | ;; |
| 1331 | *) |
| 1332 | ;; |
| 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 |
| 1345 | ;; |
| 1346 | -solaris1 | -solaris1.*) |
| 1347 | os=`echo $os | sed -e 's|solaris1|sunos4|'` |
| 1348 | ;; |
| 1349 | -solaris) |
| 1350 | os=-solaris2 |
| 1351 | ;; |
| 1352 | -unixware*) |
| 1353 | os=-sysv4.2uw |
| 1354 | ;; |
| 1355 | -gnu/linux*) |
| 1356 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
| 1357 | ;; |
| 1358 | # es1800 is here to avoid being matched by es* (a different OS) |
| 1359 | -es1800*) |
| 1360 | os=-ose |
| 1361 | ;; |
| 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* | -hcos* \ |
| 1380 | | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ |
| 1381 | | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
| 1382 | | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ |
| 1383 | | -linux-newlib* | -linux-musl* | -linux-uclibc* \ |
| 1384 | | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ |
| 1385 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ |
| 1386 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
| 1387 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
| 1388 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
| 1389 | | -morphos* | -superux* | -rtmk* | -windiss* \ |
| 1390 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
| 1391 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ |
| 1392 | | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ |
| 1393 | | -midnightbsd*) |
| 1394 | # Remember, each alternative MUST END IN *, to match a version number. |
| 1395 | ;; |
| 1396 | -qnx*) |
| 1397 | case $basic_machine in |
| 1398 | x86-* | i*86-*) |
| 1399 | ;; |
| 1400 | *) |
| 1401 | os=-nto$os |
| 1402 | ;; |
| 1403 | esac |
| 1404 | ;; |
| 1405 | -nto-qnx*) |
| 1406 | ;; |
| 1407 | -nto*) |
| 1408 | os=`echo $os | sed -e 's|nto|nto-qnx|'` |
| 1409 | ;; |
| 1410 | -sim | -xray | -os68k* | -v88r* \ |
| 1411 | | -windows* | -osx | -abug | -netware* | -os9* \ |
| 1412 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
| 1413 | ;; |
| 1414 | -mac*) |
| 1415 | os=`echo "$os" | sed -e 's|mac|macos|'` |
| 1416 | ;; |
| 1417 | -linux-dietlibc) |
| 1418 | os=-linux-dietlibc |
| 1419 | ;; |
| 1420 | -linux*) |
| 1421 | os=`echo $os | sed -e 's|linux|linux-gnu|'` |
| 1422 | ;; |
| 1423 | -sunos5*) |
| 1424 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` |
| 1425 | ;; |
| 1426 | -sunos6*) |
| 1427 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` |
| 1428 | ;; |
| 1429 | -opened*) |
| 1430 | os=-openedition |
| 1431 | ;; |
| 1432 | -os400*) |
| 1433 | os=-os400 |
| 1434 | ;; |
| 1435 | -wince*) |
| 1436 | os=-wince |
| 1437 | ;; |
| 1438 | -utek*) |
| 1439 | os=-bsd |
| 1440 | ;; |
| 1441 | -dynix*) |
| 1442 | os=-bsd |
| 1443 | ;; |
| 1444 | -acis*) |
| 1445 | os=-aos |
| 1446 | ;; |
| 1447 | -atheos*) |
| 1448 | os=-atheos |
| 1449 | ;; |
| 1450 | -syllable*) |
| 1451 | os=-syllable |
| 1452 | ;; |
| 1453 | -386bsd) |
| 1454 | os=-bsd |
| 1455 | ;; |
| 1456 | -ctix* | -uts*) |
| 1457 | os=-sysv |
| 1458 | ;; |
| 1459 | -nova*) |
| 1460 | os=-rtmk-nova |
| 1461 | ;; |
| 1462 | -ns2) |
| 1463 | os=-nextstep2 |
| 1464 | ;; |
| 1465 | -nsk*) |
| 1466 | os=-nsk |
| 1467 | ;; |
| 1468 | # Preserve the version number of sinix5. |
| 1469 | -sinix5.*) |
| 1470 | os=`echo $os | sed -e 's|sinix|sysv|'` |
| 1471 | ;; |
| 1472 | -sinix*) |
| 1473 | os=-sysv4 |
| 1474 | ;; |
| 1475 | -tpf*) |
| 1476 | os=-tpf |
| 1477 | ;; |
| 1478 | -triton*) |
| 1479 | os=-sysv3 |
| 1480 | ;; |
| 1481 | -oss*) |
| 1482 | os=-sysv3 |
| 1483 | ;; |
| 1484 | -svr4*) |
| 1485 | os=-sysv4 |
| 1486 | ;; |
| 1487 | -svr3) |
| 1488 | os=-sysv3 |
| 1489 | ;; |
| 1490 | -sysvr4) |
| 1491 | os=-sysv4 |
| 1492 | ;; |
| 1493 | # This must come after -sysvr4. |
| 1494 | -sysv*) |
| 1495 | ;; |
| 1496 | -ose*) |
| 1497 | os=-ose |
| 1498 | ;; |
| 1499 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
| 1500 | os=-mint |
| 1501 | ;; |
| 1502 | -zvmoe) |
| 1503 | os=-zvmoe |
| 1504 | ;; |
| 1505 | -dicos*) |
| 1506 | os=-dicos |
| 1507 | ;; |
| 1508 | -pikeos*) |
| 1509 | # Until real need of OS specific support for |
| 1510 | # particular features comes up, bare metal |
| 1511 | # configurations are quite functional. |
| 1512 | case $basic_machine in |
| 1513 | arm*) |
| 1514 | os=-eabi |
| 1515 | ;; |
| 1516 | *) |
| 1517 | os=-elf |
| 1518 | ;; |
| 1519 | esac |
| 1520 | ;; |
| 1521 | -nacl*) |
| 1522 | ;; |
| 1523 | -ios) |
| 1524 | ;; |
| 1525 | -none) |
| 1526 | ;; |
| 1527 | *) |
| 1528 | # Get rid of the `-' at the beginning of $os. |
| 1529 | os=`echo $os | sed 's/[^-]*-//'` |
| 1530 | echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 |
| 1531 | exit 1 |
| 1532 | ;; |
| 1533 | esac |
| 1534 | else |
| 1535 | |
| 1536 | # Here we handle the default operating systems that come with various machines. |
| 1537 | # The value should be what the vendor currently ships out the door with their |
| 1538 | # machine or put another way, the most popular os provided with the machine. |
| @@ -1541,261 +1515,446 @@ | |
| 1541 | # "-sun"), then you have to tell the case statement up towards the top |
| 1542 | # that MANUFACTURER isn't an operating system. Otherwise, code above |
| 1543 | # will signal an error saying that MANUFACTURER isn't an operating |
| 1544 | # system, and we'll never get to this point. |
| 1545 | |
| 1546 | case $basic_machine in |
| 1547 | score-*) |
| 1548 | os=-elf |
| 1549 | ;; |
| 1550 | spu-*) |
| 1551 | os=-elf |
| 1552 | ;; |
| 1553 | *-acorn) |
| 1554 | os=-riscix1.2 |
| 1555 | ;; |
| 1556 | arm*-rebel) |
| 1557 | os=-linux |
| 1558 | ;; |
| 1559 | arm*-semi) |
| 1560 | os=-aout |
| 1561 | ;; |
| 1562 | c4x-* | tic4x-*) |
| 1563 | os=-coff |
| 1564 | ;; |
| 1565 | c8051-*) |
| 1566 | os=-elf |
| 1567 | ;; |
| 1568 | hexagon-*) |
| 1569 | os=-elf |
| 1570 | ;; |
| 1571 | tic54x-*) |
| 1572 | os=-coff |
| 1573 | ;; |
| 1574 | tic55x-*) |
| 1575 | os=-coff |
| 1576 | ;; |
| 1577 | tic6x-*) |
| 1578 | os=-coff |
| 1579 | ;; |
| 1580 | # This must come before the *-dec entry. |
| 1581 | pdp10-*) |
| 1582 | os=-tops20 |
| 1583 | ;; |
| 1584 | pdp11-*) |
| 1585 | os=-none |
| 1586 | ;; |
| 1587 | *-dec | vax-*) |
| 1588 | os=-ultrix4.2 |
| 1589 | ;; |
| 1590 | m68*-apollo) |
| 1591 | os=-domain |
| 1592 | ;; |
| 1593 | i386-sun) |
| 1594 | os=-sunos4.0.2 |
| 1595 | ;; |
| 1596 | m68000-sun) |
| 1597 | os=-sunos3 |
| 1598 | ;; |
| 1599 | m68*-cisco) |
| 1600 | os=-aout |
| 1601 | ;; |
| 1602 | mep-*) |
| 1603 | os=-elf |
| 1604 | ;; |
| 1605 | mips*-cisco) |
| 1606 | os=-elf |
| 1607 | ;; |
| 1608 | mips*-*) |
| 1609 | os=-elf |
| 1610 | ;; |
| 1611 | or32-*) |
| 1612 | os=-coff |
| 1613 | ;; |
| 1614 | *-tti) # must be before sparc entry or we get the wrong os. |
| 1615 | os=-sysv3 |
| 1616 | ;; |
| 1617 | sparc-* | *-sun) |
| 1618 | os=-sunos4.1.1 |
| 1619 | ;; |
| 1620 | pru-*) |
| 1621 | os=-elf |
| 1622 | ;; |
| 1623 | *-be) |
| 1624 | os=-beos |
| 1625 | ;; |
| 1626 | *-ibm) |
| 1627 | os=-aix |
| 1628 | ;; |
| 1629 | *-knuth) |
| 1630 | os=-mmixware |
| 1631 | ;; |
| 1632 | *-wec) |
| 1633 | os=-proelf |
| 1634 | ;; |
| 1635 | *-winbond) |
| 1636 | os=-proelf |
| 1637 | ;; |
| 1638 | *-oki) |
| 1639 | os=-proelf |
| 1640 | ;; |
| 1641 | *-hp) |
| 1642 | os=-hpux |
| 1643 | ;; |
| 1644 | *-hitachi) |
| 1645 | os=-hiux |
| 1646 | ;; |
| 1647 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
| 1648 | os=-sysv |
| 1649 | ;; |
| 1650 | *-cbm) |
| 1651 | os=-amigaos |
| 1652 | ;; |
| 1653 | *-dg) |
| 1654 | os=-dgux |
| 1655 | ;; |
| 1656 | *-dolphin) |
| 1657 | os=-sysv3 |
| 1658 | ;; |
| 1659 | m68k-ccur) |
| 1660 | os=-rtu |
| 1661 | ;; |
| 1662 | m88k-omron*) |
| 1663 | os=-luna |
| 1664 | ;; |
| 1665 | *-next) |
| 1666 | os=-nextstep |
| 1667 | ;; |
| 1668 | *-sequent) |
| 1669 | os=-ptx |
| 1670 | ;; |
| 1671 | *-crds) |
| 1672 | os=-unos |
| 1673 | ;; |
| 1674 | *-ns) |
| 1675 | os=-genix |
| 1676 | ;; |
| 1677 | i370-*) |
| 1678 | os=-mvs |
| 1679 | ;; |
| 1680 | *-gould) |
| 1681 | os=-sysv |
| 1682 | ;; |
| 1683 | *-highlevel) |
| 1684 | os=-bsd |
| 1685 | ;; |
| 1686 | *-encore) |
| 1687 | os=-bsd |
| 1688 | ;; |
| 1689 | *-sgi) |
| 1690 | os=-irix |
| 1691 | ;; |
| 1692 | *-siemens) |
| 1693 | os=-sysv4 |
| 1694 | ;; |
| 1695 | *-masscomp) |
| 1696 | os=-rtu |
| 1697 | ;; |
| 1698 | f30[01]-fujitsu | f700-fujitsu) |
| 1699 | os=-uxpv |
| 1700 | ;; |
| 1701 | *-rom68k) |
| 1702 | os=-coff |
| 1703 | ;; |
| 1704 | *-*bug) |
| 1705 | os=-coff |
| 1706 | ;; |
| 1707 | *-apple) |
| 1708 | os=-macos |
| 1709 | ;; |
| 1710 | *-atari*) |
| 1711 | os=-mint |
| 1712 | ;; |
| 1713 | *) |
| 1714 | os=-none |
| 1715 | ;; |
| 1716 | esac |
| 1717 | fi |
| 1718 | |
| 1719 | # Here we handle the case where we know the os, and the CPU type, but not the |
| 1720 | # manufacturer. We pick the logical manufacturer. |
| 1721 | vendor=unknown |
| 1722 | case $basic_machine in |
| 1723 | *-unknown) |
| 1724 | case $os in |
| 1725 | -riscix*) |
| 1726 | vendor=acorn |
| 1727 | ;; |
| 1728 | -sunos*) |
| 1729 | vendor=sun |
| 1730 | ;; |
| 1731 | -cnk*|-aix*) |
| 1732 | vendor=ibm |
| 1733 | ;; |
| 1734 | -beos*) |
| 1735 | vendor=be |
| 1736 | ;; |
| 1737 | -hpux*) |
| 1738 | vendor=hp |
| 1739 | ;; |
| 1740 | -mpeix*) |
| 1741 | vendor=hp |
| 1742 | ;; |
| 1743 | -hiux*) |
| 1744 | vendor=hitachi |
| 1745 | ;; |
| 1746 | -unos*) |
| 1747 | vendor=crds |
| 1748 | ;; |
| 1749 | -dgux*) |
| 1750 | vendor=dg |
| 1751 | ;; |
| 1752 | -luna*) |
| 1753 | vendor=omron |
| 1754 | ;; |
| 1755 | -genix*) |
| 1756 | vendor=ns |
| 1757 | ;; |
| 1758 | -mvs* | -opened*) |
| 1759 | vendor=ibm |
| 1760 | ;; |
| 1761 | -os400*) |
| 1762 | vendor=ibm |
| 1763 | ;; |
| 1764 | -ptx*) |
| 1765 | vendor=sequent |
| 1766 | ;; |
| 1767 | -tpf*) |
| 1768 | vendor=ibm |
| 1769 | ;; |
| 1770 | -vxsim* | -vxworks* | -windiss*) |
| 1771 | vendor=wrs |
| 1772 | ;; |
| 1773 | -aux*) |
| 1774 | vendor=apple |
| 1775 | ;; |
| 1776 | -hms*) |
| 1777 | vendor=hitachi |
| 1778 | ;; |
| 1779 | -mpw* | -macos*) |
| 1780 | vendor=apple |
| 1781 | ;; |
| 1782 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
| 1783 | vendor=atari |
| 1784 | ;; |
| 1785 | -vos*) |
| 1786 | vendor=stratus |
| 1787 | ;; |
| 1788 | esac |
| 1789 | basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` |
| 1790 | ;; |
| 1791 | esac |
| 1792 | |
| 1793 | echo "$basic_machine$os" |
| 1794 | exit |
| 1795 | |
| 1796 | # Local variables: |
| 1797 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1798 | # time-stamp-start: "timestamp='" |
| 1799 | # time-stamp-format: "%:y-%02m-%02d" |
| 1800 | # time-stamp-end: "'" |
| 1801 | # End: |
| 1802 |
| --- autosetup/autosetup-config.sub | |
| +++ autosetup/autosetup-config.sub | |
| @@ -1,14 +1,16 @@ | |
| 1 | #! /bin/sh |
| 2 | # Configuration validation subroutine script. |
| 3 | # Copyright 1992-2023 Free Software Foundation, Inc. |
| 4 | |
| 5 | # shellcheck disable=SC2006,SC2268 # see below for rationale |
| 6 | |
| 7 | timestamp='2023-09-19' |
| 8 | |
| 9 | # This file is free software; you can redistribute it and/or modify it |
| 10 | # under the terms of the GNU General Public License as published by |
| 11 | # the Free Software Foundation, either version 3 of the License, or |
| 12 | # (at your option) any later version. |
| 13 | # |
| 14 | # This program is distributed in the hope that it will be useful, but |
| 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| @@ -31,11 +33,11 @@ | |
| 33 | # Supply the specified configuration type as an argument. |
| 34 | # If it is invalid, we print an error message on stderr and exit with code 1. |
| 35 | # Otherwise, we print the canonical config type on stdout and succeed. |
| 36 | |
| 37 | # You can get the latest version of this script from: |
| 38 | # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub |
| 39 | |
| 40 | # This file is supposed to be the same for all GNU packages |
| 41 | # and recognize all the CPU types, system types and aliases |
| 42 | # that are meaningful with *any* GNU software. |
| 43 | # Each package is responsible for reporting which valid configurations |
| @@ -47,10 +49,17 @@ | |
| 49 | # machine specification into a single specification in the form: |
| 50 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
| 51 | # or in some cases, the newer four-part form: |
| 52 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
| 53 | # It is wrong to echo any other type of specification. |
| 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 | |
| 62 | me=`echo "$0" | sed -e 's,.*/,,'` |
| 63 | |
| 64 | usage="\ |
| 65 | Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS |
| @@ -65,17 +74,17 @@ | |
| 74 | Report bugs and patches to <[email protected]>." |
| 75 | |
| 76 | version="\ |
| 77 | GNU config.sub ($timestamp) |
| 78 | |
| 79 | Copyright 1992-2023 Free Software Foundation, Inc. |
| 80 | |
| 81 | This is free software; see the source for copying conditions. There is NO |
| 82 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 83 | |
| 84 | help=" |
| 85 | Try '$me --help' for more information." |
| 86 | |
| 87 | # Parse command line |
| 88 | while test $# -gt 0 ; do |
| 89 | case $1 in |
| 90 | --time-stamp | --time* | -t ) |
| @@ -87,11 +96,11 @@ | |
| 96 | -- ) # Stop option processing |
| 97 | shift; break ;; |
| 98 | - ) # Use stdin as input. |
| 99 | break ;; |
| 100 | -* ) |
| 101 | echo "$me: invalid option $1$help" >&2 |
| 102 | exit 1 ;; |
| 103 | |
| 104 | *local*) |
| 105 | # First pass through any local machine types. |
| 106 | echo "$1" |
| @@ -108,1431 +117,1396 @@ | |
| 117 | 1) ;; |
| 118 | *) echo "$me: too many arguments$help" >&2 |
| 119 | exit 1;; |
| 120 | esac |
| 121 | |
| 122 | # Split fields of configuration type |
| 123 | # shellcheck disable=SC2162 |
| 124 | saved_IFS=$IFS |
| 125 | IFS="-" read field1 field2 field3 field4 <<EOF |
| 126 | $1 |
| 127 | EOF |
| 128 | IFS=$saved_IFS |
| 129 | |
| 130 | # Separate into logical components for further validation |
| 131 | case $1 in |
| 132 | *-*-*-*-*) |
| 133 | echo "Invalid configuration '$1': more than four components" >&2 |
| 134 | exit 1 |
| 135 | ;; |
| 136 | *-*-*-*) |
| 137 | basic_machine=$field1-$field2 |
| 138 | basic_os=$field3-$field4 |
| 139 | ;; |
| 140 | *-*-*) |
| 141 | # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two |
| 142 | # parts |
| 143 | maybe_os=$field2-$field3 |
| 144 | case $maybe_os in |
| 145 | nto-qnx* | linux-* | uclinux-uclibc* \ |
| 146 | | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ |
| 147 | | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ |
| 148 | | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ |
| 149 | | windows-* ) |
| 150 | basic_machine=$field1 |
| 151 | basic_os=$maybe_os |
| 152 | ;; |
| 153 | android-linux) |
| 154 | basic_machine=$field1-unknown |
| 155 | basic_os=linux-android |
| 156 | ;; |
| 157 | *) |
| 158 | basic_machine=$field1-$field2 |
| 159 | basic_os=$field3 |
| 160 | ;; |
| 161 | esac |
| 162 | ;; |
| 163 | *-*) |
| 164 | # A lone config we happen to match not fitting any pattern |
| 165 | case $field1-$field2 in |
| 166 | decstation-3100) |
| 167 | basic_machine=mips-dec |
| 168 | basic_os= |
| 169 | ;; |
| 170 | *-*) |
| 171 | # Second component is usually, but not always the OS |
| 172 | case $field2 in |
| 173 | # Prevent following clause from handling this valid os |
| 174 | sun*os*) |
| 175 | basic_machine=$field1 |
| 176 | basic_os=$field2 |
| 177 | ;; |
| 178 | zephyr*) |
| 179 | basic_machine=$field1-unknown |
| 180 | basic_os=$field2 |
| 181 | ;; |
| 182 | # Manufacturers |
| 183 | dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ |
| 184 | | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ |
| 185 | | unicom* | ibm* | next | hp | isi* | apollo | altos* \ |
| 186 | | convergent* | ncr* | news | 32* | 3600* | 3100* \ |
| 187 | | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ |
| 188 | | ultra | tti* | harris | dolphin | highlevel | gould \ |
| 189 | | cbm | ns | masscomp | apple | axis | knuth | cray \ |
| 190 | | microblaze* | sim | cisco \ |
| 191 | | oki | wec | wrs | winbond) |
| 192 | basic_machine=$field1-$field2 |
| 193 | basic_os= |
| 194 | ;; |
| 195 | *) |
| 196 | basic_machine=$field1 |
| 197 | basic_os=$field2 |
| 198 | ;; |
| 199 | esac |
| 200 | ;; |
| 201 | esac |
| 202 | ;; |
| 203 | *) |
| 204 | # Convert single-component short-hands not valid as part of |
| 205 | # multi-component configurations. |
| 206 | case $field1 in |
| 207 | 386bsd) |
| 208 | basic_machine=i386-pc |
| 209 | basic_os=bsd |
| 210 | ;; |
| 211 | a29khif) |
| 212 | basic_machine=a29k-amd |
| 213 | basic_os=udi |
| 214 | ;; |
| 215 | adobe68k) |
| 216 | basic_machine=m68010-adobe |
| 217 | basic_os=scout |
| 218 | ;; |
| 219 | alliant) |
| 220 | basic_machine=fx80-alliant |
| 221 | basic_os= |
| 222 | ;; |
| 223 | altos | altos3068) |
| 224 | basic_machine=m68k-altos |
| 225 | basic_os= |
| 226 | ;; |
| 227 | am29k) |
| 228 | basic_machine=a29k-none |
| 229 | basic_os=bsd |
| 230 | ;; |
| 231 | amdahl) |
| 232 | basic_machine=580-amdahl |
| 233 | basic_os=sysv |
| 234 | ;; |
| 235 | amiga) |
| 236 | basic_machine=m68k-unknown |
| 237 | basic_os= |
| 238 | ;; |
| 239 | amigaos | amigados) |
| 240 | basic_machine=m68k-unknown |
| 241 | basic_os=amigaos |
| 242 | ;; |
| 243 | amigaunix | amix) |
| 244 | basic_machine=m68k-unknown |
| 245 | basic_os=sysv4 |
| 246 | ;; |
| 247 | apollo68) |
| 248 | basic_machine=m68k-apollo |
| 249 | basic_os=sysv |
| 250 | ;; |
| 251 | apollo68bsd) |
| 252 | basic_machine=m68k-apollo |
| 253 | basic_os=bsd |
| 254 | ;; |
| 255 | aros) |
| 256 | basic_machine=i386-pc |
| 257 | basic_os=aros |
| 258 | ;; |
| 259 | aux) |
| 260 | basic_machine=m68k-apple |
| 261 | basic_os=aux |
| 262 | ;; |
| 263 | balance) |
| 264 | basic_machine=ns32k-sequent |
| 265 | basic_os=dynix |
| 266 | ;; |
| 267 | blackfin) |
| 268 | basic_machine=bfin-unknown |
| 269 | basic_os=linux |
| 270 | ;; |
| 271 | cegcc) |
| 272 | basic_machine=arm-unknown |
| 273 | basic_os=cegcc |
| 274 | ;; |
| 275 | convex-c1) |
| 276 | basic_machine=c1-convex |
| 277 | basic_os=bsd |
| 278 | ;; |
| 279 | convex-c2) |
| 280 | basic_machine=c2-convex |
| 281 | basic_os=bsd |
| 282 | ;; |
| 283 | convex-c32) |
| 284 | basic_machine=c32-convex |
| 285 | basic_os=bsd |
| 286 | ;; |
| 287 | convex-c34) |
| 288 | basic_machine=c34-convex |
| 289 | basic_os=bsd |
| 290 | ;; |
| 291 | convex-c38) |
| 292 | basic_machine=c38-convex |
| 293 | basic_os=bsd |
| 294 | ;; |
| 295 | cray) |
| 296 | basic_machine=j90-cray |
| 297 | basic_os=unicos |
| 298 | ;; |
| 299 | crds | unos) |
| 300 | basic_machine=m68k-crds |
| 301 | basic_os= |
| 302 | ;; |
| 303 | da30) |
| 304 | basic_machine=m68k-da30 |
| 305 | basic_os= |
| 306 | ;; |
| 307 | decstation | pmax | pmin | dec3100 | decstatn) |
| 308 | basic_machine=mips-dec |
| 309 | basic_os= |
| 310 | ;; |
| 311 | delta88) |
| 312 | basic_machine=m88k-motorola |
| 313 | basic_os=sysv3 |
| 314 | ;; |
| 315 | dicos) |
| 316 | basic_machine=i686-pc |
| 317 | basic_os=dicos |
| 318 | ;; |
| 319 | djgpp) |
| 320 | basic_machine=i586-pc |
| 321 | basic_os=msdosdjgpp |
| 322 | ;; |
| 323 | ebmon29k) |
| 324 | basic_machine=a29k-amd |
| 325 | basic_os=ebmon |
| 326 | ;; |
| 327 | es1800 | OSE68k | ose68k | ose | OSE) |
| 328 | basic_machine=m68k-ericsson |
| 329 | basic_os=ose |
| 330 | ;; |
| 331 | gmicro) |
| 332 | basic_machine=tron-gmicro |
| 333 | basic_os=sysv |
| 334 | ;; |
| 335 | go32) |
| 336 | basic_machine=i386-pc |
| 337 | basic_os=go32 |
| 338 | ;; |
| 339 | h8300hms) |
| 340 | basic_machine=h8300-hitachi |
| 341 | basic_os=hms |
| 342 | ;; |
| 343 | h8300xray) |
| 344 | basic_machine=h8300-hitachi |
| 345 | basic_os=xray |
| 346 | ;; |
| 347 | h8500hms) |
| 348 | basic_machine=h8500-hitachi |
| 349 | basic_os=hms |
| 350 | ;; |
| 351 | harris) |
| 352 | basic_machine=m88k-harris |
| 353 | basic_os=sysv3 |
| 354 | ;; |
| 355 | hp300 | hp300hpux) |
| 356 | basic_machine=m68k-hp |
| 357 | basic_os=hpux |
| 358 | ;; |
| 359 | hp300bsd) |
| 360 | basic_machine=m68k-hp |
| 361 | basic_os=bsd |
| 362 | ;; |
| 363 | hppaosf) |
| 364 | basic_machine=hppa1.1-hp |
| 365 | basic_os=osf |
| 366 | ;; |
| 367 | hppro) |
| 368 | basic_machine=hppa1.1-hp |
| 369 | basic_os=proelf |
| 370 | ;; |
| 371 | i386mach) |
| 372 | basic_machine=i386-mach |
| 373 | basic_os=mach |
| 374 | ;; |
| 375 | isi68 | isi) |
| 376 | basic_machine=m68k-isi |
| 377 | basic_os=sysv |
| 378 | ;; |
| 379 | m68knommu) |
| 380 | basic_machine=m68k-unknown |
| 381 | basic_os=linux |
| 382 | ;; |
| 383 | magnum | m3230) |
| 384 | basic_machine=mips-mips |
| 385 | basic_os=sysv |
| 386 | ;; |
| 387 | merlin) |
| 388 | basic_machine=ns32k-utek |
| 389 | basic_os=sysv |
| 390 | ;; |
| 391 | mingw64) |
| 392 | basic_machine=x86_64-pc |
| 393 | basic_os=mingw64 |
| 394 | ;; |
| 395 | mingw32) |
| 396 | basic_machine=i686-pc |
| 397 | basic_os=mingw32 |
| 398 | ;; |
| 399 | mingw32ce) |
| 400 | basic_machine=arm-unknown |
| 401 | basic_os=mingw32ce |
| 402 | ;; |
| 403 | monitor) |
| 404 | basic_machine=m68k-rom68k |
| 405 | basic_os=coff |
| 406 | ;; |
| 407 | morphos) |
| 408 | basic_machine=powerpc-unknown |
| 409 | basic_os=morphos |
| 410 | ;; |
| 411 | moxiebox) |
| 412 | basic_machine=moxie-unknown |
| 413 | basic_os=moxiebox |
| 414 | ;; |
| 415 | msdos) |
| 416 | basic_machine=i386-pc |
| 417 | basic_os=msdos |
| 418 | ;; |
| 419 | msys) |
| 420 | basic_machine=i686-pc |
| 421 | basic_os=msys |
| 422 | ;; |
| 423 | mvs) |
| 424 | basic_machine=i370-ibm |
| 425 | basic_os=mvs |
| 426 | ;; |
| 427 | nacl) |
| 428 | basic_machine=le32-unknown |
| 429 | basic_os=nacl |
| 430 | ;; |
| 431 | ncr3000) |
| 432 | basic_machine=i486-ncr |
| 433 | basic_os=sysv4 |
| 434 | ;; |
| 435 | netbsd386) |
| 436 | basic_machine=i386-pc |
| 437 | basic_os=netbsd |
| 438 | ;; |
| 439 | netwinder) |
| 440 | basic_machine=armv4l-rebel |
| 441 | basic_os=linux |
| 442 | ;; |
| 443 | news | news700 | news800 | news900) |
| 444 | basic_machine=m68k-sony |
| 445 | basic_os=newsos |
| 446 | ;; |
| 447 | news1000) |
| 448 | basic_machine=m68030-sony |
| 449 | basic_os=newsos |
| 450 | ;; |
| 451 | necv70) |
| 452 | basic_machine=v70-nec |
| 453 | basic_os=sysv |
| 454 | ;; |
| 455 | nh3000) |
| 456 | basic_machine=m68k-harris |
| 457 | basic_os=cxux |
| 458 | ;; |
| 459 | nh[45]000) |
| 460 | basic_machine=m88k-harris |
| 461 | basic_os=cxux |
| 462 | ;; |
| 463 | nindy960) |
| 464 | basic_machine=i960-intel |
| 465 | basic_os=nindy |
| 466 | ;; |
| 467 | mon960) |
| 468 | basic_machine=i960-intel |
| 469 | basic_os=mon960 |
| 470 | ;; |
| 471 | nonstopux) |
| 472 | basic_machine=mips-compaq |
| 473 | basic_os=nonstopux |
| 474 | ;; |
| 475 | os400) |
| 476 | basic_machine=powerpc-ibm |
| 477 | basic_os=os400 |
| 478 | ;; |
| 479 | OSE68000 | ose68000) |
| 480 | basic_machine=m68000-ericsson |
| 481 | basic_os=ose |
| 482 | ;; |
| 483 | os68k) |
| 484 | basic_machine=m68k-none |
| 485 | basic_os=os68k |
| 486 | ;; |
| 487 | paragon) |
| 488 | basic_machine=i860-intel |
| 489 | basic_os=osf |
| 490 | ;; |
| 491 | parisc) |
| 492 | basic_machine=hppa-unknown |
| 493 | basic_os=linux |
| 494 | ;; |
| 495 | psp) |
| 496 | basic_machine=mipsallegrexel-sony |
| 497 | basic_os=psp |
| 498 | ;; |
| 499 | pw32) |
| 500 | basic_machine=i586-unknown |
| 501 | basic_os=pw32 |
| 502 | ;; |
| 503 | rdos | rdos64) |
| 504 | basic_machine=x86_64-pc |
| 505 | basic_os=rdos |
| 506 | ;; |
| 507 | rdos32) |
| 508 | basic_machine=i386-pc |
| 509 | basic_os=rdos |
| 510 | ;; |
| 511 | rom68k) |
| 512 | basic_machine=m68k-rom68k |
| 513 | basic_os=coff |
| 514 | ;; |
| 515 | sa29200) |
| 516 | basic_machine=a29k-amd |
| 517 | basic_os=udi |
| 518 | ;; |
| 519 | sei) |
| 520 | basic_machine=mips-sei |
| 521 | basic_os=seiux |
| 522 | ;; |
| 523 | sequent) |
| 524 | basic_machine=i386-sequent |
| 525 | basic_os= |
| 526 | ;; |
| 527 | sps7) |
| 528 | basic_machine=m68k-bull |
| 529 | basic_os=sysv2 |
| 530 | ;; |
| 531 | st2000) |
| 532 | basic_machine=m68k-tandem |
| 533 | basic_os= |
| 534 | ;; |
| 535 | stratus) |
| 536 | basic_machine=i860-stratus |
| 537 | basic_os=sysv4 |
| 538 | ;; |
| 539 | sun2) |
| 540 | basic_machine=m68000-sun |
| 541 | basic_os= |
| 542 | ;; |
| 543 | sun2os3) |
| 544 | basic_machine=m68000-sun |
| 545 | basic_os=sunos3 |
| 546 | ;; |
| 547 | sun2os4) |
| 548 | basic_machine=m68000-sun |
| 549 | basic_os=sunos4 |
| 550 | ;; |
| 551 | sun3) |
| 552 | basic_machine=m68k-sun |
| 553 | basic_os= |
| 554 | ;; |
| 555 | sun3os3) |
| 556 | basic_machine=m68k-sun |
| 557 | basic_os=sunos3 |
| 558 | ;; |
| 559 | sun3os4) |
| 560 | basic_machine=m68k-sun |
| 561 | basic_os=sunos4 |
| 562 | ;; |
| 563 | sun4) |
| 564 | basic_machine=sparc-sun |
| 565 | basic_os= |
| 566 | ;; |
| 567 | sun4os3) |
| 568 | basic_machine=sparc-sun |
| 569 | basic_os=sunos3 |
| 570 | ;; |
| 571 | sun4os4) |
| 572 | basic_machine=sparc-sun |
| 573 | basic_os=sunos4 |
| 574 | ;; |
| 575 | sun4sol2) |
| 576 | basic_machine=sparc-sun |
| 577 | basic_os=solaris2 |
| 578 | ;; |
| 579 | sun386 | sun386i | roadrunner) |
| 580 | basic_machine=i386-sun |
| 581 | basic_os= |
| 582 | ;; |
| 583 | sv1) |
| 584 | basic_machine=sv1-cray |
| 585 | basic_os=unicos |
| 586 | ;; |
| 587 | symmetry) |
| 588 | basic_machine=i386-sequent |
| 589 | basic_os=dynix |
| 590 | ;; |
| 591 | t3e) |
| 592 | basic_machine=alphaev5-cray |
| 593 | basic_os=unicos |
| 594 | ;; |
| 595 | t90) |
| 596 | basic_machine=t90-cray |
| 597 | basic_os=unicos |
| 598 | ;; |
| 599 | toad1) |
| 600 | basic_machine=pdp10-xkl |
| 601 | basic_os=tops20 |
| 602 | ;; |
| 603 | tpf) |
| 604 | basic_machine=s390x-ibm |
| 605 | basic_os=tpf |
| 606 | ;; |
| 607 | udi29k) |
| 608 | basic_machine=a29k-amd |
| 609 | basic_os=udi |
| 610 | ;; |
| 611 | ultra3) |
| 612 | basic_machine=a29k-nyu |
| 613 | basic_os=sym1 |
| 614 | ;; |
| 615 | v810 | necv810) |
| 616 | basic_machine=v810-nec |
| 617 | basic_os=none |
| 618 | ;; |
| 619 | vaxv) |
| 620 | basic_machine=vax-dec |
| 621 | basic_os=sysv |
| 622 | ;; |
| 623 | vms) |
| 624 | basic_machine=vax-dec |
| 625 | basic_os=vms |
| 626 | ;; |
| 627 | vsta) |
| 628 | basic_machine=i386-pc |
| 629 | basic_os=vsta |
| 630 | ;; |
| 631 | vxworks960) |
| 632 | basic_machine=i960-wrs |
| 633 | basic_os=vxworks |
| 634 | ;; |
| 635 | vxworks68) |
| 636 | basic_machine=m68k-wrs |
| 637 | basic_os=vxworks |
| 638 | ;; |
| 639 | vxworks29k) |
| 640 | basic_machine=a29k-wrs |
| 641 | basic_os=vxworks |
| 642 | ;; |
| 643 | xbox) |
| 644 | basic_machine=i686-pc |
| 645 | basic_os=mingw32 |
| 646 | ;; |
| 647 | ymp) |
| 648 | basic_machine=ymp-cray |
| 649 | basic_os=unicos |
| 650 | ;; |
| 651 | *) |
| 652 | basic_machine=$1 |
| 653 | basic_os= |
| 654 | ;; |
| 655 | esac |
| 656 | ;; |
| 657 | esac |
| 658 | |
| 659 | # Decode 1-component or ad-hoc basic machines |
| 660 | case $basic_machine in |
| 661 | # Here we handle the default manufacturer of certain CPU types. It is in |
| 662 | # some cases the only manufacturer, in others, it is the most popular. |
| 663 | w89k) |
| 664 | cpu=hppa1.1 |
| 665 | vendor=winbond |
| 666 | ;; |
| 667 | op50n) |
| 668 | cpu=hppa1.1 |
| 669 | vendor=oki |
| 670 | ;; |
| 671 | op60c) |
| 672 | cpu=hppa1.1 |
| 673 | vendor=oki |
| 674 | ;; |
| 675 | ibm*) |
| 676 | cpu=i370 |
| 677 | vendor=ibm |
| 678 | ;; |
| 679 | orion105) |
| 680 | cpu=clipper |
| 681 | vendor=highlevel |
| 682 | ;; |
| 683 | mac | mpw | mac-mpw) |
| 684 | cpu=m68k |
| 685 | vendor=apple |
| 686 | ;; |
| 687 | pmac | pmac-mpw) |
| 688 | cpu=powerpc |
| 689 | vendor=apple |
| 690 | ;; |
| 691 | |
| 692 | # Recognize the various machine names and aliases which stand |
| 693 | # for a CPU type and a company and sometimes even an OS. |
| 694 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
| 695 | cpu=m68000 |
| 696 | vendor=att |
| 697 | ;; |
| 698 | 3b*) |
| 699 | cpu=we32k |
| 700 | vendor=att |
| 701 | ;; |
| 702 | bluegene*) |
| 703 | cpu=powerpc |
| 704 | vendor=ibm |
| 705 | basic_os=cnk |
| 706 | ;; |
| 707 | decsystem10* | dec10*) |
| 708 | cpu=pdp10 |
| 709 | vendor=dec |
| 710 | basic_os=tops10 |
| 711 | ;; |
| 712 | decsystem20* | dec20*) |
| 713 | cpu=pdp10 |
| 714 | vendor=dec |
| 715 | basic_os=tops20 |
| 716 | ;; |
| 717 | delta | 3300 | motorola-3300 | motorola-delta \ |
| 718 | | 3300-motorola | delta-motorola) |
| 719 | cpu=m68k |
| 720 | vendor=motorola |
| 721 | ;; |
| 722 | dpx2*) |
| 723 | cpu=m68k |
| 724 | vendor=bull |
| 725 | basic_os=sysv3 |
| 726 | ;; |
| 727 | encore | umax | mmax) |
| 728 | cpu=ns32k |
| 729 | vendor=encore |
| 730 | ;; |
| 731 | elxsi) |
| 732 | cpu=elxsi |
| 733 | vendor=elxsi |
| 734 | basic_os=${basic_os:-bsd} |
| 735 | ;; |
| 736 | fx2800) |
| 737 | cpu=i860 |
| 738 | vendor=alliant |
| 739 | ;; |
| 740 | genix) |
| 741 | cpu=ns32k |
| 742 | vendor=ns |
| 743 | ;; |
| 744 | h3050r* | hiux*) |
| 745 | cpu=hppa1.1 |
| 746 | vendor=hitachi |
| 747 | basic_os=hiuxwe2 |
| 748 | ;; |
| 749 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) |
| 750 | cpu=hppa1.0 |
| 751 | vendor=hp |
| 752 | ;; |
| 753 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
| 754 | cpu=m68000 |
| 755 | vendor=hp |
| 756 | ;; |
| 757 | hp9k3[2-9][0-9]) |
| 758 | cpu=m68k |
| 759 | vendor=hp |
| 760 | ;; |
| 761 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) |
| 762 | cpu=hppa1.0 |
| 763 | vendor=hp |
| 764 | ;; |
| 765 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) |
| 766 | cpu=hppa1.1 |
| 767 | vendor=hp |
| 768 | ;; |
| 769 | hp9k78[0-9] | hp78[0-9]) |
| 770 | # FIXME: really hppa2.0-hp |
| 771 | cpu=hppa1.1 |
| 772 | vendor=hp |
| 773 | ;; |
| 774 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) |
| 775 | # FIXME: really hppa2.0-hp |
| 776 | cpu=hppa1.1 |
| 777 | vendor=hp |
| 778 | ;; |
| 779 | hp9k8[0-9][13679] | hp8[0-9][13679]) |
| 780 | cpu=hppa1.1 |
| 781 | vendor=hp |
| 782 | ;; |
| 783 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
| 784 | cpu=hppa1.0 |
| 785 | vendor=hp |
| 786 | ;; |
| 787 | i*86v32) |
| 788 | cpu=`echo "$1" | sed -e 's/86.*/86/'` |
| 789 | vendor=pc |
| 790 | basic_os=sysv32 |
| 791 | ;; |
| 792 | i*86v4*) |
| 793 | cpu=`echo "$1" | sed -e 's/86.*/86/'` |
| 794 | vendor=pc |
| 795 | basic_os=sysv4 |
| 796 | ;; |
| 797 | i*86v) |
| 798 | cpu=`echo "$1" | sed -e 's/86.*/86/'` |
| 799 | vendor=pc |
| 800 | basic_os=sysv |
| 801 | ;; |
| 802 | i*86sol2) |
| 803 | cpu=`echo "$1" | sed -e 's/86.*/86/'` |
| 804 | vendor=pc |
| 805 | basic_os=solaris2 |
| 806 | ;; |
| 807 | j90 | j90-cray) |
| 808 | cpu=j90 |
| 809 | vendor=cray |
| 810 | basic_os=${basic_os:-unicos} |
| 811 | ;; |
| 812 | iris | iris4d) |
| 813 | cpu=mips |
| 814 | vendor=sgi |
| 815 | case $basic_os in |
| 816 | irix*) |
| 817 | ;; |
| 818 | *) |
| 819 | basic_os=irix4 |
| 820 | ;; |
| 821 | esac |
| 822 | ;; |
| 823 | miniframe) |
| 824 | cpu=m68000 |
| 825 | vendor=convergent |
| 826 | ;; |
| 827 | *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) |
| 828 | cpu=m68k |
| 829 | vendor=atari |
| 830 | basic_os=mint |
| 831 | ;; |
| 832 | news-3600 | risc-news) |
| 833 | cpu=mips |
| 834 | vendor=sony |
| 835 | basic_os=newsos |
| 836 | ;; |
| 837 | next | m*-next) |
| 838 | cpu=m68k |
| 839 | vendor=next |
| 840 | case $basic_os in |
| 841 | openstep*) |
| 842 | ;; |
| 843 | nextstep*) |
| 844 | ;; |
| 845 | ns2*) |
| 846 | basic_os=nextstep2 |
| 847 | ;; |
| 848 | *) |
| 849 | basic_os=nextstep3 |
| 850 | ;; |
| 851 | esac |
| 852 | ;; |
| 853 | np1) |
| 854 | cpu=np1 |
| 855 | vendor=gould |
| 856 | ;; |
| 857 | op50n-* | op60c-*) |
| 858 | cpu=hppa1.1 |
| 859 | vendor=oki |
| 860 | basic_os=proelf |
| 861 | ;; |
| 862 | pa-hitachi) |
| 863 | cpu=hppa1.1 |
| 864 | vendor=hitachi |
| 865 | basic_os=hiuxwe2 |
| 866 | ;; |
| 867 | pbd) |
| 868 | cpu=sparc |
| 869 | vendor=tti |
| 870 | ;; |
| 871 | pbb) |
| 872 | cpu=m68k |
| 873 | vendor=tti |
| 874 | ;; |
| 875 | pc532) |
| 876 | cpu=ns32k |
| 877 | vendor=pc532 |
| 878 | ;; |
| 879 | pn) |
| 880 | cpu=pn |
| 881 | vendor=gould |
| 882 | ;; |
| 883 | power) |
| 884 | cpu=power |
| 885 | vendor=ibm |
| 886 | ;; |
| 887 | ps2) |
| 888 | cpu=i386 |
| 889 | vendor=ibm |
| 890 | ;; |
| 891 | rm[46]00) |
| 892 | cpu=mips |
| 893 | vendor=siemens |
| 894 | ;; |
| 895 | rtpc | rtpc-*) |
| 896 | cpu=romp |
| 897 | vendor=ibm |
| 898 | ;; |
| 899 | sde) |
| 900 | cpu=mipsisa32 |
| 901 | vendor=sde |
| 902 | basic_os=${basic_os:-elf} |
| 903 | ;; |
| 904 | simso-wrs) |
| 905 | cpu=sparclite |
| 906 | vendor=wrs |
| 907 | basic_os=vxworks |
| 908 | ;; |
| 909 | tower | tower-32) |
| 910 | cpu=m68k |
| 911 | vendor=ncr |
| 912 | ;; |
| 913 | vpp*|vx|vx-*) |
| 914 | cpu=f301 |
| 915 | vendor=fujitsu |
| 916 | ;; |
| 917 | w65) |
| 918 | cpu=w65 |
| 919 | vendor=wdc |
| 920 | ;; |
| 921 | w89k-*) |
| 922 | cpu=hppa1.1 |
| 923 | vendor=winbond |
| 924 | basic_os=proelf |
| 925 | ;; |
| 926 | none) |
| 927 | cpu=none |
| 928 | vendor=none |
| 929 | ;; |
| 930 | leon|leon[3-9]) |
| 931 | cpu=sparc |
| 932 | vendor=$basic_machine |
| 933 | ;; |
| 934 | leon-*|leon[3-9]-*) |
| 935 | cpu=sparc |
| 936 | vendor=`echo "$basic_machine" | sed 's/-.*//'` |
| 937 | ;; |
| 938 | |
| 939 | *-*) |
| 940 | # shellcheck disable=SC2162 |
| 941 | saved_IFS=$IFS |
| 942 | IFS="-" read cpu vendor <<EOF |
| 943 | $basic_machine |
| 944 | EOF |
| 945 | IFS=$saved_IFS |
| 946 | ;; |
| 947 | # We use 'pc' rather than 'unknown' |
| 948 | # because (1) that's what they normally are, and |
| 949 | # (2) the word "unknown" tends to confuse beginning users. |
| 950 | i*86 | x86_64) |
| 951 | cpu=$basic_machine |
| 952 | vendor=pc |
| 953 | ;; |
| 954 | # These rules are duplicated from below for sake of the special case above; |
| 955 | # i.e. things that normalized to x86 arches should also default to "pc" |
| 956 | pc98) |
| 957 | cpu=i386 |
| 958 | vendor=pc |
| 959 | ;; |
| 960 | x64 | amd64) |
| 961 | cpu=x86_64 |
| 962 | vendor=pc |
| 963 | ;; |
| 964 | # Recognize the basic CPU types without company name. |
| 965 | *) |
| 966 | cpu=$basic_machine |
| 967 | vendor=unknown |
| 968 | ;; |
| 969 | esac |
| 970 | |
| 971 | unset -v basic_machine |
| 972 | |
| 973 | # Decode basic machines in the full and proper CPU-Company form. |
| 974 | case $cpu-$vendor in |
| 975 | # Here we handle the default manufacturer of certain CPU types in canonical form. It is in |
| 976 | # some cases the only manufacturer, in others, it is the most popular. |
| 977 | craynv-unknown) |
| 978 | vendor=cray |
| 979 | basic_os=${basic_os:-unicosmp} |
| 980 | ;; |
| 981 | c90-unknown | c90-cray) |
| 982 | vendor=cray |
| 983 | basic_os=${Basic_os:-unicos} |
| 984 | ;; |
| 985 | fx80-unknown) |
| 986 | vendor=alliant |
| 987 | ;; |
| 988 | romp-unknown) |
| 989 | vendor=ibm |
| 990 | ;; |
| 991 | mmix-unknown) |
| 992 | vendor=knuth |
| 993 | ;; |
| 994 | microblaze-unknown | microblazeel-unknown) |
| 995 | vendor=xilinx |
| 996 | ;; |
| 997 | rs6000-unknown) |
| 998 | vendor=ibm |
| 999 | ;; |
| 1000 | vax-unknown) |
| 1001 | vendor=dec |
| 1002 | ;; |
| 1003 | pdp11-unknown) |
| 1004 | vendor=dec |
| 1005 | ;; |
| 1006 | we32k-unknown) |
| 1007 | vendor=att |
| 1008 | ;; |
| 1009 | cydra-unknown) |
| 1010 | vendor=cydrome |
| 1011 | ;; |
| 1012 | i370-ibm*) |
| 1013 | vendor=ibm |
| 1014 | ;; |
| 1015 | orion-unknown) |
| 1016 | vendor=highlevel |
| 1017 | ;; |
| 1018 | xps-unknown | xps100-unknown) |
| 1019 | cpu=xps100 |
| 1020 | vendor=honeywell |
| 1021 | ;; |
| 1022 | |
| 1023 | # Here we normalize CPU types with a missing or matching vendor |
| 1024 | armh-unknown | armh-alt) |
| 1025 | cpu=armv7l |
| 1026 | vendor=alt |
| 1027 | basic_os=${basic_os:-linux-gnueabihf} |
| 1028 | ;; |
| 1029 | dpx20-unknown | dpx20-bull) |
| 1030 | cpu=rs6000 |
| 1031 | vendor=bull |
| 1032 | basic_os=${basic_os:-bosx} |
| 1033 | ;; |
| 1034 | |
| 1035 | # Here we normalize CPU types irrespective of the vendor |
| 1036 | amd64-*) |
| 1037 | cpu=x86_64 |
| 1038 | ;; |
| 1039 | blackfin-*) |
| 1040 | cpu=bfin |
| 1041 | basic_os=linux |
| 1042 | ;; |
| 1043 | c54x-*) |
| 1044 | cpu=tic54x |
| 1045 | ;; |
| 1046 | c55x-*) |
| 1047 | cpu=tic55x |
| 1048 | ;; |
| 1049 | c6x-*) |
| 1050 | cpu=tic6x |
| 1051 | ;; |
| 1052 | e500v[12]-*) |
| 1053 | cpu=powerpc |
| 1054 | basic_os=${basic_os}"spe" |
| 1055 | ;; |
| 1056 | mips3*-*) |
| 1057 | cpu=mips64 |
| 1058 | ;; |
| 1059 | ms1-*) |
| 1060 | cpu=mt |
| 1061 | ;; |
| 1062 | m68knommu-*) |
| 1063 | cpu=m68k |
| 1064 | basic_os=linux |
| 1065 | ;; |
| 1066 | m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) |
| 1067 | cpu=s12z |
| 1068 | ;; |
| 1069 | openrisc-*) |
| 1070 | cpu=or32 |
| 1071 | ;; |
| 1072 | parisc-*) |
| 1073 | cpu=hppa |
| 1074 | basic_os=linux |
| 1075 | ;; |
| 1076 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
| 1077 | cpu=i586 |
| 1078 | ;; |
| 1079 | pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) |
| 1080 | cpu=i686 |
| 1081 | ;; |
| 1082 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
| 1083 | cpu=i686 |
| 1084 | ;; |
| 1085 | pentium4-*) |
| 1086 | cpu=i786 |
| 1087 | ;; |
| 1088 | pc98-*) |
| 1089 | cpu=i386 |
| 1090 | ;; |
| 1091 | ppc-* | ppcbe-*) |
| 1092 | cpu=powerpc |
| 1093 | ;; |
| 1094 | ppcle-* | powerpclittle-*) |
| 1095 | cpu=powerpcle |
| 1096 | ;; |
| 1097 | ppc64-*) |
| 1098 | cpu=powerpc64 |
| 1099 | ;; |
| 1100 | ppc64le-* | powerpc64little-*) |
| 1101 | cpu=powerpc64le |
| 1102 | ;; |
| 1103 | sb1-*) |
| 1104 | cpu=mipsisa64sb1 |
| 1105 | ;; |
| 1106 | sb1el-*) |
| 1107 | cpu=mipsisa64sb1el |
| 1108 | ;; |
| 1109 | sh5e[lb]-*) |
| 1110 | cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` |
| 1111 | ;; |
| 1112 | spur-*) |
| 1113 | cpu=spur |
| 1114 | ;; |
| 1115 | strongarm-* | thumb-*) |
| 1116 | cpu=arm |
| 1117 | ;; |
| 1118 | tx39-*) |
| 1119 | cpu=mipstx39 |
| 1120 | ;; |
| 1121 | tx39el-*) |
| 1122 | cpu=mipstx39el |
| 1123 | ;; |
| 1124 | x64-*) |
| 1125 | cpu=x86_64 |
| 1126 | ;; |
| 1127 | xscale-* | xscalee[bl]-*) |
| 1128 | cpu=`echo "$cpu" | sed 's/^xscale/arm/'` |
| 1129 | ;; |
| 1130 | arm64-* | aarch64le-*) |
| 1131 | cpu=aarch64 |
| 1132 | ;; |
| 1133 | |
| 1134 | # Recognize the canonical CPU Types that limit and/or modify the |
| 1135 | # company names they are paired with. |
| 1136 | cr16-*) |
| 1137 | basic_os=${basic_os:-elf} |
| 1138 | ;; |
| 1139 | crisv32-* | etraxfs*-*) |
| 1140 | cpu=crisv32 |
| 1141 | vendor=axis |
| 1142 | ;; |
| 1143 | cris-* | etrax*-*) |
| 1144 | cpu=cris |
| 1145 | vendor=axis |
| 1146 | ;; |
| 1147 | crx-*) |
| 1148 | basic_os=${basic_os:-elf} |
| 1149 | ;; |
| 1150 | neo-tandem) |
| 1151 | cpu=neo |
| 1152 | vendor=tandem |
| 1153 | ;; |
| 1154 | nse-tandem) |
| 1155 | cpu=nse |
| 1156 | vendor=tandem |
| 1157 | ;; |
| 1158 | nsr-tandem) |
| 1159 | cpu=nsr |
| 1160 | vendor=tandem |
| 1161 | ;; |
| 1162 | nsv-tandem) |
| 1163 | cpu=nsv |
| 1164 | vendor=tandem |
| 1165 | ;; |
| 1166 | nsx-tandem) |
| 1167 | cpu=nsx |
| 1168 | vendor=tandem |
| 1169 | ;; |
| 1170 | mipsallegrexel-sony) |
| 1171 | cpu=mipsallegrexel |
| 1172 | vendor=sony |
| 1173 | ;; |
| 1174 | tile*-*) |
| 1175 | basic_os=${basic_os:-linux-gnu} |
| 1176 | ;; |
| 1177 | |
| 1178 | *) |
| 1179 | # Recognize the canonical CPU types that are allowed with any |
| 1180 | # company name. |
| 1181 | case $cpu in |
| 1182 | 1750a | 580 \ |
| 1183 | | a29k \ |
| 1184 | | aarch64 | aarch64_be | aarch64c | arm64ec \ |
| 1185 | | abacus \ |
| 1186 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ |
| 1187 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ |
| 1188 | | alphapca5[67] | alpha64pca5[67] \ |
| 1189 | | am33_2.0 \ |
| 1190 | | amdgcn \ |
| 1191 | | arc | arceb | arc32 | arc64 \ |
| 1192 | | arm | arm[lb]e | arme[lb] | armv* \ |
| 1193 | | avr | avr32 \ |
| 1194 | | asmjs \ |
| 1195 | | ba \ |
| 1196 | | be32 | be64 \ |
| 1197 | | bfin | bpf | bs2000 \ |
| 1198 | | c[123]* | c30 | [cjt]90 | c4x \ |
| 1199 | | c8051 | clipper | craynv | csky | cydra \ |
| 1200 | | d10v | d30v | dlx | dsp16xx \ |
| 1201 | | e2k | elxsi | epiphany \ |
| 1202 | | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ |
| 1203 | | javascript \ |
| 1204 | | h8300 | h8500 \ |
| 1205 | | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
| 1206 | | hexagon \ |
| 1207 | | i370 | i*86 | i860 | i960 | ia16 | ia64 \ |
| 1208 | | ip2k | iq2000 \ |
| 1209 | | k1om \ |
| 1210 | | kvx \ |
| 1211 | | le32 | le64 \ |
| 1212 | | lm32 \ |
| 1213 | | loongarch32 | loongarch64 \ |
| 1214 | | m32c | m32r | m32rle \ |
| 1215 | | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ |
| 1216 | | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ |
| 1217 | | m88110 | m88k | maxq | mb | mcore | mep | metag \ |
| 1218 | | microblaze | microblazeel \ |
| 1219 | | mips* \ |
| 1220 | | mmix \ |
| 1221 | | mn10200 | mn10300 \ |
| 1222 | | moxie \ |
| 1223 | | mt \ |
| 1224 | | msp430 \ |
| 1225 | | nds32 | nds32le | nds32be \ |
| 1226 | | nfp \ |
| 1227 | | nios | nios2 | nios2eb | nios2el \ |
| 1228 | | none | np1 | ns16k | ns32k | nvptx \ |
| 1229 | | open8 \ |
| 1230 | | or1k* \ |
| 1231 | | or32 \ |
| 1232 | | orion \ |
| 1233 | | picochip \ |
| 1234 | | pdp10 | pdp11 | pj | pjl | pn | power \ |
| 1235 | | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ |
| 1236 | | pru \ |
| 1237 | | pyramid \ |
| 1238 | | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ |
| 1239 | | rl78 | romp | rs6000 | rx \ |
| 1240 | | s390 | s390x \ |
| 1241 | | score \ |
| 1242 | | sh | shl \ |
| 1243 | | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ |
| 1244 | | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ |
| 1245 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ |
| 1246 | | sparclite \ |
| 1247 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ |
| 1248 | | spu \ |
| 1249 | | tahoe \ |
| 1250 | | thumbv7* \ |
| 1251 | | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ |
| 1252 | | tron \ |
| 1253 | | ubicom32 \ |
| 1254 | | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ |
| 1255 | | vax \ |
| 1256 | | visium \ |
| 1257 | | w65 \ |
| 1258 | | wasm32 | wasm64 \ |
| 1259 | | we32k \ |
| 1260 | | x86 | x86_64 | xc16x | xgate | xps100 \ |
| 1261 | | xstormy16 | xtensa* \ |
| 1262 | | ymp \ |
| 1263 | | z8k | z80) |
| 1264 | ;; |
| 1265 | |
| 1266 | *) |
| 1267 | echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 |
| 1268 | exit 1 |
| 1269 | ;; |
| 1270 | esac |
| 1271 | ;; |
| 1272 | esac |
| 1273 | |
| 1274 | # Here we canonicalize certain aliases for manufacturers. |
| 1275 | case $vendor in |
| 1276 | digital*) |
| 1277 | vendor=dec |
| 1278 | ;; |
| 1279 | commodore*) |
| 1280 | vendor=cbm |
| 1281 | ;; |
| 1282 | *) |
| 1283 | ;; |
| 1284 | esac |
| 1285 | |
| 1286 | # Decode manufacturer-specific aliases for certain operating systems. |
| 1287 | |
| 1288 | if test x"$basic_os" != x |
| 1289 | then |
| 1290 | |
| 1291 | # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just |
| 1292 | # set os. |
| 1293 | obj= |
| 1294 | case $basic_os in |
| 1295 | gnu/linux*) |
| 1296 | kernel=linux |
| 1297 | os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` |
| 1298 | ;; |
| 1299 | os2-emx) |
| 1300 | kernel=os2 |
| 1301 | os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` |
| 1302 | ;; |
| 1303 | nto-qnx*) |
| 1304 | kernel=nto |
| 1305 | os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` |
| 1306 | ;; |
| 1307 | *-*) |
| 1308 | # shellcheck disable=SC2162 |
| 1309 | saved_IFS=$IFS |
| 1310 | IFS="-" read kernel os <<EOF |
| 1311 | $basic_os |
| 1312 | EOF |
| 1313 | IFS=$saved_IFS |
| 1314 | ;; |
| 1315 | # Default OS when just kernel was specified |
| 1316 | nto*) |
| 1317 | kernel=nto |
| 1318 | os=`echo "$basic_os" | sed -e 's|nto|qnx|'` |
| 1319 | ;; |
| 1320 | linux*) |
| 1321 | kernel=linux |
| 1322 | os=`echo "$basic_os" | sed -e 's|linux|gnu|'` |
| 1323 | ;; |
| 1324 | managarm*) |
| 1325 | kernel=managarm |
| 1326 | os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` |
| 1327 | ;; |
| 1328 | *) |
| 1329 | kernel= |
| 1330 | os=$basic_os |
| 1331 | ;; |
| 1332 | esac |
| 1333 | |
| 1334 | # Now, normalize the OS (knowing we just have one component, it's not a kernel, |
| 1335 | # etc.) |
| 1336 | case $os in |
| 1337 | # First match some system type aliases that might get confused |
| 1338 | # with valid system types. |
| 1339 | # solaris* is a basic system type, with this one exception. |
| 1340 | auroraux) |
| 1341 | os=auroraux |
| 1342 | ;; |
| 1343 | bluegene*) |
| 1344 | os=cnk |
| 1345 | ;; |
| 1346 | solaris1 | solaris1.*) |
| 1347 | os=`echo "$os" | sed -e 's|solaris1|sunos4|'` |
| 1348 | ;; |
| 1349 | solaris) |
| 1350 | os=solaris2 |
| 1351 | ;; |
| 1352 | unixware*) |
| 1353 | os=sysv4.2uw |
| 1354 | ;; |
| 1355 | # es1800 is here to avoid being matched by es* (a different OS) |
| 1356 | es1800*) |
| 1357 | os=ose |
| 1358 | ;; |
| 1359 | # Some version numbers need modification |
| 1360 | chorusos*) |
| 1361 | os=chorusos |
| 1362 | ;; |
| 1363 | isc) |
| 1364 | os=isc2.2 |
| 1365 | ;; |
| 1366 | sco6) |
| 1367 | os=sco5v6 |
| 1368 | ;; |
| 1369 | sco5) |
| 1370 | os=sco3.2v5 |
| 1371 | ;; |
| 1372 | sco4) |
| 1373 | os=sco3.2v4 |
| 1374 | ;; |
| 1375 | sco3.2.[4-9]*) |
| 1376 | os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` |
| 1377 | ;; |
| 1378 | sco*v* | scout) |
| 1379 | # Don't match below |
| 1380 | ;; |
| 1381 | sco*) |
| 1382 | os=sco3.2v2 |
| 1383 | ;; |
| 1384 | psos*) |
| 1385 | os=psos |
| 1386 | ;; |
| 1387 | qnx*) |
| 1388 | os=qnx |
| 1389 | ;; |
| 1390 | hiux*) |
| 1391 | os=hiuxwe2 |
| 1392 | ;; |
| 1393 | lynx*178) |
| 1394 | os=lynxos178 |
| 1395 | ;; |
| 1396 | lynx*5) |
| 1397 | os=lynxos5 |
| 1398 | ;; |
| 1399 | lynxos*) |
| 1400 | # don't get caught up in next wildcard |
| 1401 | ;; |
| 1402 | lynx*) |
| 1403 | os=lynxos |
| 1404 | ;; |
| 1405 | mac[0-9]*) |
| 1406 | os=`echo "$os" | sed -e 's|mac|macos|'` |
| 1407 | ;; |
| 1408 | opened*) |
| 1409 | os=openedition |
| 1410 | ;; |
| 1411 | os400*) |
| 1412 | os=os400 |
| 1413 | ;; |
| 1414 | sunos5*) |
| 1415 | os=`echo "$os" | sed -e 's|sunos5|solaris2|'` |
| 1416 | ;; |
| 1417 | sunos6*) |
| 1418 | os=`echo "$os" | sed -e 's|sunos6|solaris3|'` |
| 1419 | ;; |
| 1420 | wince*) |
| 1421 | os=wince |
| 1422 | ;; |
| 1423 | utek*) |
| 1424 | os=bsd |
| 1425 | ;; |
| 1426 | dynix*) |
| 1427 | os=bsd |
| 1428 | ;; |
| 1429 | acis*) |
| 1430 | os=aos |
| 1431 | ;; |
| 1432 | atheos*) |
| 1433 | os=atheos |
| 1434 | ;; |
| 1435 | syllable*) |
| 1436 | os=syllable |
| 1437 | ;; |
| 1438 | 386bsd) |
| 1439 | os=bsd |
| 1440 | ;; |
| 1441 | ctix* | uts*) |
| 1442 | os=sysv |
| 1443 | ;; |
| 1444 | nova*) |
| 1445 | os=rtmk-nova |
| 1446 | ;; |
| 1447 | ns2) |
| 1448 | os=nextstep2 |
| 1449 | ;; |
| 1450 | # Preserve the version number of sinix5. |
| 1451 | sinix5.*) |
| 1452 | os=`echo "$os" | sed -e 's|sinix|sysv|'` |
| 1453 | ;; |
| 1454 | sinix*) |
| 1455 | os=sysv4 |
| 1456 | ;; |
| 1457 | tpf*) |
| 1458 | os=tpf |
| 1459 | ;; |
| 1460 | triton*) |
| 1461 | os=sysv3 |
| 1462 | ;; |
| 1463 | oss*) |
| 1464 | os=sysv3 |
| 1465 | ;; |
| 1466 | svr4*) |
| 1467 | os=sysv4 |
| 1468 | ;; |
| 1469 | svr3) |
| 1470 | os=sysv3 |
| 1471 | ;; |
| 1472 | sysvr4) |
| 1473 | os=sysv4 |
| 1474 | ;; |
| 1475 | ose*) |
| 1476 | os=ose |
| 1477 | ;; |
| 1478 | *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) |
| 1479 | os=mint |
| 1480 | ;; |
| 1481 | dicos*) |
| 1482 | os=dicos |
| 1483 | ;; |
| 1484 | pikeos*) |
| 1485 | # Until real need of OS specific support for |
| 1486 | # particular features comes up, bare metal |
| 1487 | # configurations are quite functional. |
| 1488 | case $cpu in |
| 1489 | arm*) |
| 1490 | os=eabi |
| 1491 | ;; |
| 1492 | *) |
| 1493 | os= |
| 1494 | obj=elf |
| 1495 | ;; |
| 1496 | esac |
| 1497 | ;; |
| 1498 | aout* | coff* | elf* | pe*) |
| 1499 | # These are machine code file formats, not OSes |
| 1500 | obj=$os |
| 1501 | os= |
| 1502 | ;; |
| 1503 | *) |
| 1504 | # No normalization, but not necessarily accepted, that comes below. |
| 1505 | ;; |
| 1506 | esac |
| 1507 | |
| 1508 | else |
| 1509 | |
| 1510 | # Here we handle the default operating systems that come with various machines. |
| 1511 | # The value should be what the vendor currently ships out the door with their |
| 1512 | # machine or put another way, the most popular os provided with the machine. |
| @@ -1541,261 +1515,446 @@ | |
| 1515 | # "-sun"), then you have to tell the case statement up towards the top |
| 1516 | # that MANUFACTURER isn't an operating system. Otherwise, code above |
| 1517 | # will signal an error saying that MANUFACTURER isn't an operating |
| 1518 | # system, and we'll never get to this point. |
| 1519 | |
| 1520 | kernel= |
| 1521 | obj= |
| 1522 | case $cpu-$vendor in |
| 1523 | score-*) |
| 1524 | os= |
| 1525 | obj=elf |
| 1526 | ;; |
| 1527 | spu-*) |
| 1528 | os= |
| 1529 | obj=elf |
| 1530 | ;; |
| 1531 | *-acorn) |
| 1532 | os=riscix1.2 |
| 1533 | ;; |
| 1534 | arm*-rebel) |
| 1535 | kernel=linux |
| 1536 | os=gnu |
| 1537 | ;; |
| 1538 | arm*-semi) |
| 1539 | os= |
| 1540 | obj=aout |
| 1541 | ;; |
| 1542 | c4x-* | tic4x-*) |
| 1543 | os= |
| 1544 | obj=coff |
| 1545 | ;; |
| 1546 | c8051-*) |
| 1547 | os= |
| 1548 | obj=elf |
| 1549 | ;; |
| 1550 | clipper-intergraph) |
| 1551 | os=clix |
| 1552 | ;; |
| 1553 | hexagon-*) |
| 1554 | os= |
| 1555 | obj=elf |
| 1556 | ;; |
| 1557 | tic54x-*) |
| 1558 | os= |
| 1559 | obj=coff |
| 1560 | ;; |
| 1561 | tic55x-*) |
| 1562 | os= |
| 1563 | obj=coff |
| 1564 | ;; |
| 1565 | tic6x-*) |
| 1566 | os= |
| 1567 | obj=coff |
| 1568 | ;; |
| 1569 | # This must come before the *-dec entry. |
| 1570 | pdp10-*) |
| 1571 | os=tops20 |
| 1572 | ;; |
| 1573 | pdp11-*) |
| 1574 | os=none |
| 1575 | ;; |
| 1576 | *-dec | vax-*) |
| 1577 | os=ultrix4.2 |
| 1578 | ;; |
| 1579 | m68*-apollo) |
| 1580 | os=domain |
| 1581 | ;; |
| 1582 | i386-sun) |
| 1583 | os=sunos4.0.2 |
| 1584 | ;; |
| 1585 | m68000-sun) |
| 1586 | os=sunos3 |
| 1587 | ;; |
| 1588 | m68*-cisco) |
| 1589 | os= |
| 1590 | obj=aout |
| 1591 | ;; |
| 1592 | mep-*) |
| 1593 | os= |
| 1594 | obj=elf |
| 1595 | ;; |
| 1596 | mips*-cisco) |
| 1597 | os= |
| 1598 | obj=elf |
| 1599 | ;; |
| 1600 | mips*-*) |
| 1601 | os= |
| 1602 | obj=elf |
| 1603 | ;; |
| 1604 | or32-*) |
| 1605 | os= |
| 1606 | obj=coff |
| 1607 | ;; |
| 1608 | *-tti) # must be before sparc entry or we get the wrong os. |
| 1609 | os=sysv3 |
| 1610 | ;; |
| 1611 | sparc-* | *-sun) |
| 1612 | os=sunos4.1.1 |
| 1613 | ;; |
| 1614 | pru-*) |
| 1615 | os= |
| 1616 | obj=elf |
| 1617 | ;; |
| 1618 | *-be) |
| 1619 | os=beos |
| 1620 | ;; |
| 1621 | *-ibm) |
| 1622 | os=aix |
| 1623 | ;; |
| 1624 | *-knuth) |
| 1625 | os=mmixware |
| 1626 | ;; |
| 1627 | *-wec) |
| 1628 | os=proelf |
| 1629 | ;; |
| 1630 | *-winbond) |
| 1631 | os=proelf |
| 1632 | ;; |
| 1633 | *-oki) |
| 1634 | os=proelf |
| 1635 | ;; |
| 1636 | *-hp) |
| 1637 | os=hpux |
| 1638 | ;; |
| 1639 | *-hitachi) |
| 1640 | os=hiux |
| 1641 | ;; |
| 1642 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
| 1643 | os=sysv |
| 1644 | ;; |
| 1645 | *-cbm) |
| 1646 | os=amigaos |
| 1647 | ;; |
| 1648 | *-dg) |
| 1649 | os=dgux |
| 1650 | ;; |
| 1651 | *-dolphin) |
| 1652 | os=sysv3 |
| 1653 | ;; |
| 1654 | m68k-ccur) |
| 1655 | os=rtu |
| 1656 | ;; |
| 1657 | m88k-omron*) |
| 1658 | os=luna |
| 1659 | ;; |
| 1660 | *-next) |
| 1661 | os=nextstep |
| 1662 | ;; |
| 1663 | *-sequent) |
| 1664 | os=ptx |
| 1665 | ;; |
| 1666 | *-crds) |
| 1667 | os=unos |
| 1668 | ;; |
| 1669 | *-ns) |
| 1670 | os=genix |
| 1671 | ;; |
| 1672 | i370-*) |
| 1673 | os=mvs |
| 1674 | ;; |
| 1675 | *-gould) |
| 1676 | os=sysv |
| 1677 | ;; |
| 1678 | *-highlevel) |
| 1679 | os=bsd |
| 1680 | ;; |
| 1681 | *-encore) |
| 1682 | os=bsd |
| 1683 | ;; |
| 1684 | *-sgi) |
| 1685 | os=irix |
| 1686 | ;; |
| 1687 | *-siemens) |
| 1688 | os=sysv4 |
| 1689 | ;; |
| 1690 | *-masscomp) |
| 1691 | os=rtu |
| 1692 | ;; |
| 1693 | f30[01]-fujitsu | f700-fujitsu) |
| 1694 | os=uxpv |
| 1695 | ;; |
| 1696 | *-rom68k) |
| 1697 | os= |
| 1698 | obj=coff |
| 1699 | ;; |
| 1700 | *-*bug) |
| 1701 | os= |
| 1702 | obj=coff |
| 1703 | ;; |
| 1704 | *-apple) |
| 1705 | os=macos |
| 1706 | ;; |
| 1707 | *-atari*) |
| 1708 | os=mint |
| 1709 | ;; |
| 1710 | *-wrs) |
| 1711 | os=vxworks |
| 1712 | ;; |
| 1713 | *) |
| 1714 | os=none |
| 1715 | ;; |
| 1716 | esac |
| 1717 | |
| 1718 | fi |
| 1719 | |
| 1720 | # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). |
| 1721 | |
| 1722 | case $os in |
| 1723 | # Sometimes we do "kernel-libc", so those need to count as OSes. |
| 1724 | musl* | newlib* | relibc* | uclibc*) |
| 1725 | ;; |
| 1726 | # Likewise for "kernel-abi" |
| 1727 | eabi* | gnueabi*) |
| 1728 | ;; |
| 1729 | # VxWorks passes extra cpu info in the 4th filed. |
| 1730 | simlinux | simwindows | spe) |
| 1731 | ;; |
| 1732 | # See `case $cpu-$os` validation below |
| 1733 | ghcjs) |
| 1734 | ;; |
| 1735 | # Now accept the basic system types. |
| 1736 | # The portable systems comes first. |
| 1737 | # Each alternative MUST end in a * to match a version number. |
| 1738 | gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ |
| 1739 | | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ |
| 1740 | | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ |
| 1741 | | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ |
| 1742 | | hiux* | abug | nacl* | netware* | windows* \ |
| 1743 | | os9* | macos* | osx* | ios* | tvos* | watchos* \ |
| 1744 | | mpw* | magic* | mmixware* | mon960* | lnews* \ |
| 1745 | | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ |
| 1746 | | aos* | aros* | cloudabi* | sortix* | twizzler* \ |
| 1747 | | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ |
| 1748 | | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ |
| 1749 | | mirbsd* | netbsd* | dicos* | openedition* | ose* \ |
| 1750 | | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ |
| 1751 | | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ |
| 1752 | | bosx* | nextstep* | cxux* | oabi* \ |
| 1753 | | ptx* | ecoff* | winnt* | domain* | vsta* \ |
| 1754 | | udi* | lites* | ieee* | go32* | aux* | hcos* \ |
| 1755 | | chorusrdb* | cegcc* | glidix* | serenity* \ |
| 1756 | | cygwin* | msys* | moss* | proelf* | rtems* \ |
| 1757 | | midipix* | mingw32* | mingw64* | mint* \ |
| 1758 | | uxpv* | beos* | mpeix* | udk* | moxiebox* \ |
| 1759 | | interix* | uwin* | mks* | rhapsody* | darwin* \ |
| 1760 | | openstep* | oskit* | conix* | pw32* | nonstopux* \ |
| 1761 | | storm-chaos* | tops10* | tenex* | tops20* | its* \ |
| 1762 | | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ |
| 1763 | | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ |
| 1764 | | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ |
| 1765 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ |
| 1766 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ |
| 1767 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ |
| 1768 | | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ |
| 1769 | | fiwix* | mlibc* | cos* | mbr* ) |
| 1770 | ;; |
| 1771 | # This one is extra strict with allowed versions |
| 1772 | sco3.2v2 | sco3.2v[4-9]* | sco5v6*) |
| 1773 | # Don't forget version if it is 3.2v4 or newer. |
| 1774 | ;; |
| 1775 | none) |
| 1776 | ;; |
| 1777 | kernel* | msvc* ) |
| 1778 | # Restricted further below |
| 1779 | ;; |
| 1780 | '') |
| 1781 | if test x"$obj" = x |
| 1782 | then |
| 1783 | echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 |
| 1784 | fi |
| 1785 | ;; |
| 1786 | *) |
| 1787 | echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 |
| 1788 | exit 1 |
| 1789 | ;; |
| 1790 | esac |
| 1791 | |
| 1792 | case $obj in |
| 1793 | aout* | coff* | elf* | pe*) |
| 1794 | ;; |
| 1795 | '') |
| 1796 | # empty is fine |
| 1797 | ;; |
| 1798 | *) |
| 1799 | echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 |
| 1800 | exit 1 |
| 1801 | ;; |
| 1802 | esac |
| 1803 | |
| 1804 | # Here we handle the constraint that a (synthetic) cpu and os are |
| 1805 | # valid only in combination with each other and nowhere else. |
| 1806 | case $cpu-$os in |
| 1807 | # The "javascript-unknown-ghcjs" triple is used by GHC; we |
| 1808 | # accept it here in order to tolerate that, but reject any |
| 1809 | # variations. |
| 1810 | javascript-ghcjs) |
| 1811 | ;; |
| 1812 | javascript-* | *-ghcjs) |
| 1813 | echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 |
| 1814 | exit 1 |
| 1815 | ;; |
| 1816 | esac |
| 1817 | |
| 1818 | # As a final step for OS-related things, validate the OS-kernel combination |
| 1819 | # (given a valid OS), if there is a kernel. |
| 1820 | case $kernel-$os-$obj in |
| 1821 | linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ |
| 1822 | | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) |
| 1823 | ;; |
| 1824 | uclinux-uclibc*- ) |
| 1825 | ;; |
| 1826 | managarm-mlibc*- | managarm-kernel*- ) |
| 1827 | ;; |
| 1828 | windows*-msvc*-) |
| 1829 | ;; |
| 1830 | -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) |
| 1831 | # These are just libc implementations, not actual OSes, and thus |
| 1832 | # require a kernel. |
| 1833 | echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 |
| 1834 | exit 1 |
| 1835 | ;; |
| 1836 | -kernel*- ) |
| 1837 | echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 |
| 1838 | exit 1 |
| 1839 | ;; |
| 1840 | *-kernel*- ) |
| 1841 | echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 |
| 1842 | exit 1 |
| 1843 | ;; |
| 1844 | *-msvc*- ) |
| 1845 | echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 |
| 1846 | exit 1 |
| 1847 | ;; |
| 1848 | kfreebsd*-gnu*- | kopensolaris*-gnu*-) |
| 1849 | ;; |
| 1850 | vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) |
| 1851 | ;; |
| 1852 | nto-qnx*-) |
| 1853 | ;; |
| 1854 | os2-emx-) |
| 1855 | ;; |
| 1856 | *-eabi*- | *-gnueabi*-) |
| 1857 | ;; |
| 1858 | none--*) |
| 1859 | # None (no kernel, i.e. freestanding / bare metal), |
| 1860 | # can be paired with an machine code file format |
| 1861 | ;; |
| 1862 | -*-) |
| 1863 | # Blank kernel with real OS is always fine. |
| 1864 | ;; |
| 1865 | --*) |
| 1866 | # Blank kernel and OS with real machine code file format is always fine. |
| 1867 | ;; |
| 1868 | *-*-*) |
| 1869 | echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 |
| 1870 | exit 1 |
| 1871 | ;; |
| 1872 | esac |
| 1873 | |
| 1874 | # Here we handle the case where we know the os, and the CPU type, but not the |
| 1875 | # manufacturer. We pick the logical manufacturer. |
| 1876 | case $vendor in |
| 1877 | unknown) |
| 1878 | case $cpu-$os in |
| 1879 | *-riscix*) |
| 1880 | vendor=acorn |
| 1881 | ;; |
| 1882 | *-sunos*) |
| 1883 | vendor=sun |
| 1884 | ;; |
| 1885 | *-cnk* | *-aix*) |
| 1886 | vendor=ibm |
| 1887 | ;; |
| 1888 | *-beos*) |
| 1889 | vendor=be |
| 1890 | ;; |
| 1891 | *-hpux*) |
| 1892 | vendor=hp |
| 1893 | ;; |
| 1894 | *-mpeix*) |
| 1895 | vendor=hp |
| 1896 | ;; |
| 1897 | *-hiux*) |
| 1898 | vendor=hitachi |
| 1899 | ;; |
| 1900 | *-unos*) |
| 1901 | vendor=crds |
| 1902 | ;; |
| 1903 | *-dgux*) |
| 1904 | vendor=dg |
| 1905 | ;; |
| 1906 | *-luna*) |
| 1907 | vendor=omron |
| 1908 | ;; |
| 1909 | *-genix*) |
| 1910 | vendor=ns |
| 1911 | ;; |
| 1912 | *-clix*) |
| 1913 | vendor=intergraph |
| 1914 | ;; |
| 1915 | *-mvs* | *-opened*) |
| 1916 | vendor=ibm |
| 1917 | ;; |
| 1918 | *-os400*) |
| 1919 | vendor=ibm |
| 1920 | ;; |
| 1921 | s390-* | s390x-*) |
| 1922 | vendor=ibm |
| 1923 | ;; |
| 1924 | *-ptx*) |
| 1925 | vendor=sequent |
| 1926 | ;; |
| 1927 | *-tpf*) |
| 1928 | vendor=ibm |
| 1929 | ;; |
| 1930 | *-vxsim* | *-vxworks* | *-windiss*) |
| 1931 | vendor=wrs |
| 1932 | ;; |
| 1933 | *-aux*) |
| 1934 | vendor=apple |
| 1935 | ;; |
| 1936 | *-hms*) |
| 1937 | vendor=hitachi |
| 1938 | ;; |
| 1939 | *-mpw* | *-macos*) |
| 1940 | vendor=apple |
| 1941 | ;; |
| 1942 | *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) |
| 1943 | vendor=atari |
| 1944 | ;; |
| 1945 | *-vos*) |
| 1946 | vendor=stratus |
| 1947 | ;; |
| 1948 | esac |
| 1949 | ;; |
| 1950 | esac |
| 1951 | |
| 1952 | echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" |
| 1953 | exit |
| 1954 | |
| 1955 | # Local variables: |
| 1956 | # eval: (add-hook 'before-save-hook 'time-stamp) |
| 1957 | # time-stamp-start: "timestamp='" |
| 1958 | # time-stamp-format: "%:y-%02m-%02d" |
| 1959 | # time-stamp-end: "'" |
| 1960 | # End: |
| 1961 |