Changeset 169e80d1 in OpenModelica
- Timestamp:
- 2021-06-09T19:28:29+02:00 (3 years ago)
- Children:
- 60f921a9
- Parents:
- 7e0d8c8
- git-author:
- Martin Sjölund <martin@…> (06/09/21 19:26:01)
- git-committer:
- Martin Sjölund <martin@…> (06/09/21 19:28:29)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
OMCompiler/3rdParty
- Property commit changed from 13cccd4fa169c8df0fae13628917e1c6479a9e18 to a0d0cec5c208d26e2d9b1e581bf66232315800cf
-
common/config.guess
rb66fa07 r169e80d1 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 # Copyright 1992-20 15Free Software Foundation, Inc.4 5 timestamp='20 15-03-04'3 # Copyright 1992-2021 Free Software Foundation, Inc. 4 5 timestamp='2021-05-24' 6 6 7 7 # This file is free software; you can redistribute it and/or modify it … … 16 16 # 17 17 # You should have received a copy of the GNU General Public License 18 # along with this program; if not, see <http ://www.gnu.org/licenses/>.18 # along with this program; if not, see <https://www.gnu.org/licenses/>. 19 19 # 20 20 # As a special exception to the GNU General Public License, if you … … 28 28 # 29 29 # You can get the latest version of this script from: 30 # http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD30 # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess 31 31 # 32 32 # Please send patches to <config-patches@gnu.org>. 33 33 34 34 35 me= `echo "$0" | sed -e 's,.*/,,'`35 me=$(echo "$0" | sed -e 's,.*/,,') 36 36 37 37 usage="\ … … 40 40 Output the configuration name of the system \`$me' is run on. 41 41 42 Op eration modes:42 Options: 43 43 -h, --help print this help, then exit 44 44 -t, --time-stamp print date of last modification, then exit … … 51 51 52 52 Originally written by Per Bothner. 53 Copyright 1992-20 15Free Software Foundation, Inc.53 Copyright 1992-2021 Free Software Foundation, Inc. 54 54 55 55 This is free software; see the source for copying conditions. There is NO … … 85 85 fi 86 86 87 trap 'exit 1' 1 2 1588 89 87 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90 88 # compiler to aid in system detection is discouraged as it requires … … 97 95 # Portable tmp directory creation inspired by the Autoconf team. 98 96 99 set_cc_for_build=' 100 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102 : ${TMPDIR=/tmp} ; 103 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107 dummy=$tmp/dummy ; 108 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109 case $CC_FOR_BUILD,$HOST_CC,$CC in 110 ,,) echo "int x;" > $dummy.c ; 111 for c in cc gcc c89 c99 ; do 112 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113 CC_FOR_BUILD="$c"; break ; 114 fi ; 115 done ; 116 if test x"$CC_FOR_BUILD" = x ; then 117 CC_FOR_BUILD=no_compiler_found ; 118 fi 119 ;; 120 ,,*) CC_FOR_BUILD=$CC ;; 121 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122 esac ; set_cc_for_build= ;' 97 tmp= 98 # shellcheck disable=SC2172 99 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 100 101 set_cc_for_build() { 102 # prevent multiple calls if $tmp is already set 103 test "$tmp" && return 0 104 : "${TMPDIR=/tmp}" 105 # shellcheck disable=SC2039 106 { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || 107 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || 108 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || 109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } 110 dummy=$tmp/dummy 111 case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in 112 ,,) echo "int x;" > "$dummy.c" 113 for driver in cc gcc c89 c99 ; do 114 if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then 115 CC_FOR_BUILD="$driver" 116 break 117 fi 118 done 119 if test x"$CC_FOR_BUILD" = x ; then 120 CC_FOR_BUILD=no_compiler_found 121 fi 122 ;; 123 ,,*) CC_FOR_BUILD=$CC ;; 124 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 125 esac 126 } 123 127 124 128 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125 129 # (ghazi@noc.rutgers.edu 1994-08-24) 126 if (test -f /.attbin/uname) >/dev/null 2>&1; then130 if test -f /.attbin/uname ; then 127 131 PATH=$PATH:/.attbin ; export PATH 128 132 fi 129 133 130 UNAME_MACHINE= `(uname -m) 2>/dev/null`|| UNAME_MACHINE=unknown131 UNAME_RELEASE= `(uname -r) 2>/dev/null`|| UNAME_RELEASE=unknown132 UNAME_SYSTEM= `(uname -s) 2>/dev/null`|| UNAME_SYSTEM=unknown133 UNAME_VERSION= `(uname -v) 2>/dev/null`|| UNAME_VERSION=unknown134 135 case "${UNAME_SYSTEM}"in134 UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown 135 UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown 136 UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown 137 UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown 138 139 case $UNAME_SYSTEM in 136 140 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 141 LIBC=unknown 142 143 set_cc_for_build 144 cat <<-EOF > "$dummy.c" 143 145 #include <features.h> 144 146 #if defined(__UCLIBC__) … … 146 148 #elif defined(__dietlibc__) 147 149 LIBC=dietlibc 150 #elif defined(__GLIBC__) 151 LIBC=gnu 148 152 #else 149 LIBC=gnu 153 #include <stdarg.h> 154 /* First heuristic to detect musl libc. */ 155 #ifdef __DEFINED_va_list 156 LIBC=musl 157 #endif 150 158 #endif 151 159 EOF 152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 160 eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" 161 162 # Second heuristic to detect musl libc. 163 if [ "$LIBC" = unknown ] && 164 command -v ldd >/dev/null && 165 ldd --version 2>&1 | grep -q ^musl; then 166 LIBC=musl 167 fi 168 169 # If the system lacks a compiler, then just pick glibc. 170 # We could probably try harder. 171 if [ "$LIBC" = unknown ]; then 172 LIBC=gnu 173 fi 153 174 ;; 154 175 esac … … 156 177 # Note: order is significant - the case branches are not exclusive. 157 178 158 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}"in179 case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in 159 180 *:NetBSD:*:*) 160 181 # NetBSD (nbsd) targets should (where applicable) match one or … … 168 189 # Note: NetBSD doesn't particularly care about the vendor 169 190 # portion of the name. We always set it to "unknown". 170 sysctl="sysctl -n hw.machine_arch"171 UNAME_MACHINE_ARCH=`(uname -p2>/dev/null || \172 / sbin/$sysctl2>/dev/null || \173 /usr/sbin/$sysctl 2>/dev/null || \174 echo unknown)`175 case "${UNAME_MACHINE_ARCH}" in191 UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ 192 /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ 193 /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ 194 echo unknown)) 195 case $UNAME_MACHINE_ARCH in 196 aarch64eb) machine=aarch64_be-unknown ;; 176 197 armeb) machine=armeb-unknown ;; 177 198 arm*) machine=arm-unknown ;; … … 180 201 sh5el) machine=sh5le-unknown ;; 181 202 earmv*) 182 arch= `echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`183 endian= `echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`184 machine= ${arch}${endian}-unknown203 arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') 204 endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') 205 machine="${arch}${endian}"-unknown 185 206 ;; 186 *) machine= ${UNAME_MACHINE_ARCH}-unknown ;;207 *) machine="$UNAME_MACHINE_ARCH"-unknown ;; 187 208 esac 188 209 # The Operating System including object format, if it has switched 189 # to ELF recently, or will in the future. 190 case "${UNAME_MACHINE_ARCH}" in 191 arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) 192 eval $set_cc_for_build 210 # to ELF recently (or will in the future) and ABI. 211 case $UNAME_MACHINE_ARCH in 212 earm*) 213 os=netbsdelf 214 ;; 215 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 216 set_cc_for_build 193 217 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 194 218 | grep -q __ELF__ … … 206 230 esac 207 231 # Determine ABI tags. 208 case "${UNAME_MACHINE_ARCH}"in232 case $UNAME_MACHINE_ARCH in 209 233 earm*) 210 234 expr='s/^earmv[0-9]/-eabi/;s/eb$//' 211 abi= `echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`235 abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") 212 236 ;; 213 237 esac … … 217 241 # kernel version information, so it can be replaced with a 218 242 # suitable tag, in the style of linux-gnu. 219 case "${UNAME_VERSION}"in243 case $UNAME_VERSION in 220 244 Debian*) 221 245 release='-gnu' 222 246 ;; 223 247 *) 224 release= `echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`248 release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) 225 249 ;; 226 250 esac … … 228 252 # contains redundant information, the shorter form: 229 253 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 230 echo "$ {machine}-${os}${release}${abi}"254 echo "$machine-${os}${release}${abi-}" 231 255 exit ;; 232 256 *:Bitrig:*:*) 233 UNAME_MACHINE_ARCH= `arch | sed 's/Bitrig.//'`234 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}257 UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') 258 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" 235 259 exit ;; 236 260 *:OpenBSD:*:*) 237 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 238 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 261 UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') 262 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" 263 exit ;; 264 *:SecBSD:*:*) 265 UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//') 266 echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE" 267 exit ;; 268 *:LibertyBSD:*:*) 269 UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') 270 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" 271 exit ;; 272 *:MidnightBSD:*:*) 273 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" 239 274 exit ;; 240 275 *:ekkoBSD:*:*) 241 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}276 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" 242 277 exit ;; 243 278 *:SolidBSD:*:*) 244 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 279 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" 280 exit ;; 281 *:OS108:*:*) 282 echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" 245 283 exit ;; 246 284 macppc:MirBSD:*:*) 247 echo powerpc-unknown-mirbsd ${UNAME_RELEASE}285 echo powerpc-unknown-mirbsd"$UNAME_RELEASE" 248 286 exit ;; 249 287 *:MirBSD:*:*) 250 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 288 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" 289 exit ;; 290 *:Sortix:*:*) 291 echo "$UNAME_MACHINE"-unknown-sortix 292 exit ;; 293 *:Twizzler:*:*) 294 echo "$UNAME_MACHINE"-unknown-twizzler 295 exit ;; 296 *:Redox:*:*) 297 echo "$UNAME_MACHINE"-unknown-redox 298 exit ;; 299 mips:OSF1:*.*) 300 echo mips-dec-osf1 251 301 exit ;; 252 302 alpha:OSF1:*:*) 303 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 304 trap '' 0 253 305 case $UNAME_RELEASE in 254 306 *4.0) 255 UNAME_RELEASE= `/usr/sbin/sizer -v | awk '{print $3}'`307 UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') 256 308 ;; 257 309 *5.*) 258 UNAME_RELEASE= `/usr/sbin/sizer -v | awk '{print $4}'`310 UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') 259 311 ;; 260 312 esac … … 263 315 # covers most systems running today. This code pipes the CPU 264 316 # types through head -n 1, so we only detect the type of CPU 0. 265 ALPHA_CPU_TYPE= `/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`266 case "$ALPHA_CPU_TYPE"in317 ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) 318 case $ALPHA_CPU_TYPE in 267 319 "EV4 (21064)") 268 UNAME_MACHINE= "alpha";;320 UNAME_MACHINE=alpha ;; 269 321 "EV4.5 (21064)") 270 UNAME_MACHINE= "alpha";;322 UNAME_MACHINE=alpha ;; 271 323 "LCA4 (21066/21068)") 272 UNAME_MACHINE= "alpha";;324 UNAME_MACHINE=alpha ;; 273 325 "EV5 (21164)") 274 UNAME_MACHINE= "alphaev5";;326 UNAME_MACHINE=alphaev5 ;; 275 327 "EV5.6 (21164A)") 276 UNAME_MACHINE= "alphaev56";;328 UNAME_MACHINE=alphaev56 ;; 277 329 "EV5.6 (21164PC)") 278 UNAME_MACHINE= "alphapca56";;330 UNAME_MACHINE=alphapca56 ;; 279 331 "EV5.7 (21164PC)") 280 UNAME_MACHINE= "alphapca57";;332 UNAME_MACHINE=alphapca57 ;; 281 333 "EV6 (21264)") 282 UNAME_MACHINE= "alphaev6";;334 UNAME_MACHINE=alphaev6 ;; 283 335 "EV6.7 (21264A)") 284 UNAME_MACHINE= "alphaev67";;336 UNAME_MACHINE=alphaev67 ;; 285 337 "EV6.8CB (21264C)") 286 UNAME_MACHINE= "alphaev68";;338 UNAME_MACHINE=alphaev68 ;; 287 339 "EV6.8AL (21264B)") 288 UNAME_MACHINE= "alphaev68";;340 UNAME_MACHINE=alphaev68 ;; 289 341 "EV6.8CX (21264D)") 290 UNAME_MACHINE= "alphaev68";;342 UNAME_MACHINE=alphaev68 ;; 291 343 "EV6.9A (21264/EV69A)") 292 UNAME_MACHINE= "alphaev69";;344 UNAME_MACHINE=alphaev69 ;; 293 345 "EV7 (21364)") 294 UNAME_MACHINE= "alphaev7";;346 UNAME_MACHINE=alphaev7 ;; 295 347 "EV7.9 (21364A)") 296 UNAME_MACHINE= "alphaev79";;348 UNAME_MACHINE=alphaev79 ;; 297 349 esac 298 350 # A Pn.n version is a patched version. … … 301 353 # A Xn.n version is an unreleased experimental baselevel. 302 354 # 1.2 uses "1.2" for uname -r. 303 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 304 # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 305 exitcode=$? 306 trap '' 0 307 exit $exitcode ;; 308 Alpha\ *:Windows_NT*:*) 309 # How do we know it's Interix rather than the generic POSIX subsystem? 310 # Should we change UNAME_MACHINE based on the output of uname instead 311 # of the specific Alpha model? 312 echo alpha-pc-interix 313 exit ;; 314 21064:Windows_NT:50:3) 315 echo alpha-dec-winnt3.5 355 echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" 316 356 exit ;; 317 357 Amiga*:UNIX_System_V:4.0:*) … … 319 359 exit ;; 320 360 *:[Aa]miga[Oo][Ss]:*:*) 321 echo ${UNAME_MACHINE}-unknown-amigaos361 echo "$UNAME_MACHINE"-unknown-amigaos 322 362 exit ;; 323 363 *:[Mm]orph[Oo][Ss]:*:*) 324 echo ${UNAME_MACHINE}-unknown-morphos364 echo "$UNAME_MACHINE"-unknown-morphos 325 365 exit ;; 326 366 *:OS/390:*:*) … … 334 374 exit ;; 335 375 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 336 echo arm-acorn-riscix ${UNAME_RELEASE}376 echo arm-acorn-riscix"$UNAME_RELEASE" 337 377 exit ;; 338 378 arm*:riscos:*:*|arm*:RISCOS:*:*) … … 344 384 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 345 385 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 346 if test " `(/bin/universe) 2>/dev/null`" = att ; then386 if test "$( (/bin/universe) 2>/dev/null)" = att ; then 347 387 echo pyramid-pyramid-sysv3 348 388 else … … 357 397 exit ;; 358 398 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 359 case `/usr/bin/uname -p`in399 case $(/usr/bin/uname -p) in 360 400 sparc) echo sparc-icl-nx7; exit ;; 361 401 esac ;; 362 402 s390x:SunOS:*:*) 363 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`403 echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" 364 404 exit ;; 365 405 sun4H:SunOS:5.*:*) 366 echo sparc-hal-solaris2 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`406 echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" 367 407 exit ;; 368 408 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 369 echo sparc-sun-solaris2 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`409 echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" 370 410 exit ;; 371 411 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 372 echo i386-pc-auroraux ${UNAME_RELEASE}412 echo i386-pc-auroraux"$UNAME_RELEASE" 373 413 exit ;; 374 414 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 375 eval $set_cc_for_build376 SUN_ARCH= "i386"415 set_cc_for_build 416 SUN_ARCH=i386 377 417 # If there is a compiler, see if it is configured for 64-bit objects. 378 418 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 379 419 # This test works for both compilers. 380 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then420 if test "$CC_FOR_BUILD" != no_compiler_found; then 381 421 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 382 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \422 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 383 423 grep IS_64BIT_ARCH >/dev/null 384 424 then 385 SUN_ARCH= "x86_64"425 SUN_ARCH=x86_64 386 426 fi 387 427 fi 388 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`428 echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" 389 429 exit ;; 390 430 sun4*:SunOS:6*:*) … … 392 432 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 393 433 # it's likely to be more like Solaris than SunOS4. 394 echo sparc-sun-solaris3 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`434 echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" 395 435 exit ;; 396 436 sun4*:SunOS:*:*) 397 case "`/usr/bin/arch -k`"in437 case $(/usr/bin/arch -k) in 398 438 Series*|S4*) 399 UNAME_RELEASE= `uname -v`439 UNAME_RELEASE=$(uname -v) 400 440 ;; 401 441 esac 402 442 # Japanese Language versions have a version number like `4.1.3-JL'. 403 echo sparc-sun-sunos `echo ${UNAME_RELEASE}|sed -e 's/-/_/'`443 echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" 404 444 exit ;; 405 445 sun3*:SunOS:*:*) 406 echo m68k-sun-sunos ${UNAME_RELEASE}446 echo m68k-sun-sunos"$UNAME_RELEASE" 407 447 exit ;; 408 448 sun*:*:4.2BSD:*) 409 UNAME_RELEASE= `(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`410 test "x$ {UNAME_RELEASE}" = "x"&& UNAME_RELEASE=3411 case "`/bin/arch`"in449 UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) 450 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 451 case $(/bin/arch) in 412 452 sun3) 413 echo m68k-sun-sunos ${UNAME_RELEASE}453 echo m68k-sun-sunos"$UNAME_RELEASE" 414 454 ;; 415 455 sun4) 416 echo sparc-sun-sunos ${UNAME_RELEASE}456 echo sparc-sun-sunos"$UNAME_RELEASE" 417 457 ;; 418 458 esac 419 459 exit ;; 420 460 aushp:SunOS:*:*) 421 echo sparc-auspex-sunos ${UNAME_RELEASE}461 echo sparc-auspex-sunos"$UNAME_RELEASE" 422 462 exit ;; 423 463 # The situation for MiNT is a little confusing. The machine name … … 430 470 # be no problem. 431 471 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 432 echo m68k-atari-mint ${UNAME_RELEASE}472 echo m68k-atari-mint"$UNAME_RELEASE" 433 473 exit ;; 434 474 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 435 echo m68k-atari-mint ${UNAME_RELEASE}475 echo m68k-atari-mint"$UNAME_RELEASE" 436 476 exit ;; 437 477 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 438 echo m68k-atari-mint ${UNAME_RELEASE}478 echo m68k-atari-mint"$UNAME_RELEASE" 439 479 exit ;; 440 480 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 441 echo m68k-milan-mint ${UNAME_RELEASE}481 echo m68k-milan-mint"$UNAME_RELEASE" 442 482 exit ;; 443 483 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 444 echo m68k-hades-mint ${UNAME_RELEASE}484 echo m68k-hades-mint"$UNAME_RELEASE" 445 485 exit ;; 446 486 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 447 echo m68k-unknown-mint ${UNAME_RELEASE}487 echo m68k-unknown-mint"$UNAME_RELEASE" 448 488 exit ;; 449 489 m68k:machten:*:*) 450 echo m68k-apple-machten ${UNAME_RELEASE}490 echo m68k-apple-machten"$UNAME_RELEASE" 451 491 exit ;; 452 492 powerpc:machten:*:*) 453 echo powerpc-apple-machten ${UNAME_RELEASE}493 echo powerpc-apple-machten"$UNAME_RELEASE" 454 494 exit ;; 455 495 RISC*:Mach:*:*) … … 457 497 exit ;; 458 498 RISC*:ULTRIX:*:*) 459 echo mips-dec-ultrix ${UNAME_RELEASE}499 echo mips-dec-ultrix"$UNAME_RELEASE" 460 500 exit ;; 461 501 VAX*:ULTRIX*:*:*) 462 echo vax-dec-ultrix ${UNAME_RELEASE}502 echo vax-dec-ultrix"$UNAME_RELEASE" 463 503 exit ;; 464 504 2020:CLIX:*:* | 2430:CLIX:*:*) 465 echo clipper-intergraph-clix ${UNAME_RELEASE}505 echo clipper-intergraph-clix"$UNAME_RELEASE" 466 506 exit ;; 467 507 mips:*:*:UMIPS | mips:*:*:RISCos) 468 eval $set_cc_for_build469 sed 's/^ //' << EOF > $dummy.c508 set_cc_for_build 509 sed 's/^ //' << EOF > "$dummy.c" 470 510 #ifdef __cplusplus 471 511 #include <stdio.h> /* for printf() prototype */ … … 476 516 #if defined (host_mips) && defined (MIPSEB) 477 517 #if defined (SYSTYPE_SYSV) 478 printf ("mips-mips-riscos%ssysv\ n", argv[1]); exit (0);518 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); 479 519 #endif 480 520 #if defined (SYSTYPE_SVR4) 481 printf ("mips-mips-riscos%ssvr4\ n", argv[1]); exit (0);521 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); 482 522 #endif 483 523 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 484 printf ("mips-mips-riscos%sbsd\ n", argv[1]); exit (0);524 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); 485 525 #endif 486 526 #endif … … 488 528 } 489 529 EOF 490 $CC_FOR_BUILD -o $dummy $dummy.c&&491 dummyarg= `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'`&&492 SYSTEM_NAME= `$dummy $dummyarg`&&530 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && 531 dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && 532 SYSTEM_NAME=$("$dummy" "$dummyarg") && 493 533 { echo "$SYSTEM_NAME"; exit; } 494 echo mips-mips-riscos ${UNAME_RELEASE}534 echo mips-mips-riscos"$UNAME_RELEASE" 495 535 exit ;; 496 536 Motorola:PowerMAX_OS:*:*) … … 517 557 AViiON:dgux:*:*) 518 558 # DG/UX returns AViiON for all architectures 519 UNAME_PROCESSOR= `/usr/bin/uname -p`520 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]559 UNAME_PROCESSOR=$(/usr/bin/uname -p) 560 if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 521 561 then 522 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ]|| \523 [ ${TARGET_BINARY_INTERFACE}x = x ]562 if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ 563 test "$TARGET_BINARY_INTERFACE"x = x 524 564 then 525 echo m88k-dg-dgux ${UNAME_RELEASE}565 echo m88k-dg-dgux"$UNAME_RELEASE" 526 566 else 527 echo m88k-dg-dguxbcs ${UNAME_RELEASE}567 echo m88k-dg-dguxbcs"$UNAME_RELEASE" 528 568 fi 529 569 else 530 echo i586-dg-dgux ${UNAME_RELEASE}570 echo i586-dg-dgux"$UNAME_RELEASE" 531 571 fi 532 572 exit ;; … … 545 585 exit ;; 546 586 *:IRIX*:*:*) 547 echo mips-sgi-irix `echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`587 echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" 548 588 exit ;; 549 589 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 550 590 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 551 exit ;; # Note that: echo "' `uname -s`'" gives 'AIX '591 exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' 552 592 i*86:AIX:*:*) 553 593 echo i386-ibm-aix 554 594 exit ;; 555 595 ia64:AIX:*:*) 556 if [ -x /usr/bin/oslevel ]; then557 IBM_REV= `/usr/bin/oslevel`596 if test -x /usr/bin/oslevel ; then 597 IBM_REV=$(/usr/bin/oslevel) 558 598 else 559 IBM_REV= ${UNAME_VERSION}.${UNAME_RELEASE}560 fi 561 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}599 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" 600 fi 601 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" 562 602 exit ;; 563 603 *:AIX:2:3) 564 604 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 565 eval $set_cc_for_build566 sed 's/^ //' << EOF > $dummy.c605 set_cc_for_build 606 sed 's/^ //' << EOF > "$dummy.c" 567 607 #include <sys/systemcfg.h> 568 608 … … 575 615 } 576 616 EOF 577 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`617 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") 578 618 then 579 619 echo "$SYSTEM_NAME" … … 588 628 exit ;; 589 629 *:AIX:*:[4567]) 590 IBM_CPU_ID= `/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`591 if /usr/sbin/lsattr -El ${IBM_CPU_ID}| grep ' POWER' >/dev/null 2>&1; then630 IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') 631 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then 592 632 IBM_ARCH=rs6000 593 633 else 594 634 IBM_ARCH=powerpc 595 635 fi 596 if [ -x /usr/bin/lslpp ]; then597 IBM_REV= `/usr/bin/lslpp -Lqc bos.rte.libc |598 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/ `636 if test -x /usr/bin/lslpp ; then 637 IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | 638 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) 599 639 else 600 IBM_REV= ${UNAME_VERSION}.${UNAME_RELEASE}601 fi 602 echo ${IBM_ARCH}-ibm-aix${IBM_REV}640 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" 641 fi 642 echo "$IBM_ARCH"-ibm-aix"$IBM_REV" 603 643 exit ;; 604 644 *:AIX:*:*) 605 645 echo rs6000-ibm-aix 606 646 exit ;; 607 ibmrt:4.4BSD:*|romp-ibm: BSD:*)647 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) 608 648 echo romp-ibm-bsd4.4 609 649 exit ;; 610 650 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 611 echo romp-ibm-bsd ${UNAME_RELEASE}# 4.3 with uname added to651 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to 612 652 exit ;; # report: romp-ibm BSD 4.3 613 653 *:BOSX:*:*) … … 624 664 exit ;; 625 665 9000/[34678]??:HP-UX:*:*) 626 HPUX_REV= `echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`627 case "${UNAME_MACHINE}"in628 9000/31? 629 9000/[34]?? 666 HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') 667 case $UNAME_MACHINE in 668 9000/31?) HP_ARCH=m68000 ;; 669 9000/[34]??) HP_ARCH=m68k ;; 630 670 9000/[678][0-9][0-9]) 631 if [ -x /usr/bin/getconf ]; then632 sc_cpu_version= `/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`633 sc_kernel_bits= `/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`634 case "${sc_cpu_version}"in635 523) HP_ARCH= "hppa1.0";; # CPU_PA_RISC1_0636 528) HP_ARCH= "hppa1.1";; # CPU_PA_RISC1_1671 if test -x /usr/bin/getconf; then 672 sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) 673 sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) 674 case $sc_cpu_version in 675 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 676 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 637 677 532) # CPU_PA_RISC2_0 638 case "${sc_kernel_bits}"in639 32) HP_ARCH= "hppa2.0n";;640 64) HP_ARCH= "hppa2.0w";;641 '') HP_ARCH= "hppa2.0";; # HP-UX 10.20678 case $sc_kernel_bits in 679 32) HP_ARCH=hppa2.0n ;; 680 64) HP_ARCH=hppa2.0w ;; 681 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 642 682 esac ;; 643 683 esac 644 684 fi 645 if [ "${HP_ARCH}" = "" ]; then646 eval $set_cc_for_build647 sed 's/^ //' << EOF > $dummy.c685 if test "$HP_ARCH" = ""; then 686 set_cc_for_build 687 sed 's/^ //' << EOF > "$dummy.c" 648 688 649 689 #define _HPUX_SOURCE … … 678 718 } 679 719 EOF 680 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`720 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") 681 721 test -z "$HP_ARCH" && HP_ARCH=hppa 682 722 fi ;; 683 723 esac 684 if [ ${HP_ARCH} = "hppa2.0w" ]724 if test "$HP_ARCH" = hppa2.0w 685 725 then 686 eval $set_cc_for_build726 set_cc_for_build 687 727 688 728 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating … … 695 735 # => hppa64-hp-hpux11.23 696 736 697 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |737 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | 698 738 grep -q __LP64__ 699 739 then 700 HP_ARCH= "hppa2.0w"740 HP_ARCH=hppa2.0w 701 741 else 702 HP_ARCH= "hppa64"742 HP_ARCH=hppa64 703 743 fi 704 744 fi 705 echo ${HP_ARCH}-hp-hpux${HPUX_REV}745 echo "$HP_ARCH"-hp-hpux"$HPUX_REV" 706 746 exit ;; 707 747 ia64:HP-UX:*:*) 708 HPUX_REV= `echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`709 echo ia64-hp-hpux ${HPUX_REV}748 HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') 749 echo ia64-hp-hpux"$HPUX_REV" 710 750 exit ;; 711 751 3050*:HI-UX:*:*) 712 eval $set_cc_for_build713 sed 's/^ //' << EOF > $dummy.c752 set_cc_for_build 753 sed 's/^ //' << EOF > "$dummy.c" 714 754 #include <unistd.h> 715 755 int … … 736 776 } 737 777 EOF 738 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`&&778 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && 739 779 { echo "$SYSTEM_NAME"; exit; } 740 780 echo unknown-hitachi-hiuxwe2 741 781 exit ;; 742 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* 782 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) 743 783 echo hppa1.1-hp-bsd 744 784 exit ;; … … 749 789 echo hppa1.0-hp-mpeix 750 790 exit ;; 751 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* 791 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) 752 792 echo hppa1.1-hp-osf 753 793 exit ;; … … 756 796 exit ;; 757 797 i*86:OSF1:*:*) 758 if [ -x /usr/sbin/sysversion ]; then759 echo ${UNAME_MACHINE}-unknown-osf1mk798 if test -x /usr/sbin/sysversion ; then 799 echo "$UNAME_MACHINE"-unknown-osf1mk 760 800 else 761 echo ${UNAME_MACHINE}-unknown-osf1801 echo "$UNAME_MACHINE"-unknown-osf1 762 802 fi 763 803 exit ;; … … 784 824 exit ;; 785 825 CRAY*Y-MP:*:*:*) 786 echo ymp-cray-unicos ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'826 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 787 827 exit ;; 788 828 CRAY*[A-Z]90:*:*:*) 789 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE}\829 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ 790 830 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 791 831 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ … … 793 833 exit ;; 794 834 CRAY*TS:*:*:*) 795 echo t90-cray-unicos ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'835 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 796 836 exit ;; 797 837 CRAY*T3E:*:*:*) 798 echo alphaev5-cray-unicosmk ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'838 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 799 839 exit ;; 800 840 CRAY*SV1:*:*:*) 801 echo sv1-cray-unicos ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'841 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 802 842 exit ;; 803 843 *:UNICOS/mp:*:*) 804 echo craynv-cray-unicosmp ${UNAME_RELEASE}| sed -e 's/\.[^.]*$/.X/'844 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' 805 845 exit ;; 806 846 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 807 FUJITSU_PROC= `uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`808 FUJITSU_SYS= `uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`809 FUJITSU_REL= `echo ${UNAME_RELEASE} | sed -e 's/ /_/'`847 FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) 848 FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') 849 FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') 810 850 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 811 851 exit ;; 812 852 5000:UNIX_System_V:4.*:*) 813 FUJITSU_SYS= `uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`814 FUJITSU_REL= `echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`853 FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') 854 FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') 815 855 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 816 856 exit ;; 817 857 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 818 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}858 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" 819 859 exit ;; 820 860 sparc*:BSD/OS:*:*) 821 echo sparc-unknown-bsdi ${UNAME_RELEASE}861 echo sparc-unknown-bsdi"$UNAME_RELEASE" 822 862 exit ;; 823 863 *:BSD/OS:*:*) 824 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 864 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" 865 exit ;; 866 arm:FreeBSD:*:*) 867 UNAME_PROCESSOR=$(uname -p) 868 set_cc_for_build 869 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 870 | grep -q __ARM_PCS_VFP 871 then 872 echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi 873 else 874 echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf 875 fi 825 876 exit ;; 826 877 *:FreeBSD:*:*) 827 UNAME_PROCESSOR= `/usr/bin/uname -p`828 case $ {UNAME_PROCESSOR}in878 UNAME_PROCESSOR=$(/usr/bin/uname -p) 879 case $UNAME_PROCESSOR in 829 880 amd64) 830 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`;;831 *)832 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`;;881 UNAME_PROCESSOR=x86_64 ;; 882 i386) 883 UNAME_PROCESSOR=i586 ;; 833 884 esac 885 echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" 834 886 exit ;; 835 887 i*:CYGWIN*:*) 836 echo ${UNAME_MACHINE}-pc-cygwin888 echo "$UNAME_MACHINE"-pc-cygwin 837 889 exit ;; 838 890 *:MINGW64*:*) 839 echo ${UNAME_MACHINE}-pc-mingw64891 echo "$UNAME_MACHINE"-pc-mingw64 840 892 exit ;; 841 893 *:MINGW*:*) 842 echo ${UNAME_MACHINE}-pc-mingw32894 echo "$UNAME_MACHINE"-pc-mingw32 843 895 exit ;; 844 896 *:MSYS*:*) 845 echo ${UNAME_MACHINE}-pc-msys 846 exit ;; 847 i*:windows32*:*) 848 # uname -m includes "-pc" on this system. 849 echo ${UNAME_MACHINE}-mingw32 897 echo "$UNAME_MACHINE"-pc-msys 850 898 exit ;; 851 899 i*:PW*:*) 852 echo ${UNAME_MACHINE}-pc-pw32900 echo "$UNAME_MACHINE"-pc-pw32 853 901 exit ;; 854 902 *:Interix*:*) 855 case $ {UNAME_MACHINE}in903 case $UNAME_MACHINE in 856 904 x86) 857 echo i586-pc-interix ${UNAME_RELEASE}905 echo i586-pc-interix"$UNAME_RELEASE" 858 906 exit ;; 859 907 authenticamd | genuineintel | EM64T) 860 echo x86_64-unknown-interix ${UNAME_RELEASE}908 echo x86_64-unknown-interix"$UNAME_RELEASE" 861 909 exit ;; 862 910 IA64) 863 echo ia64-unknown-interix ${UNAME_RELEASE}911 echo ia64-unknown-interix"$UNAME_RELEASE" 864 912 exit ;; 865 913 esac ;; 866 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)867 echo i${UNAME_MACHINE}-pc-mks868 exit ;;869 8664:Windows_NT:*)870 echo x86_64-pc-mks871 exit ;;872 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)873 # How do we know it's Interix rather than the generic POSIX subsystem?874 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we875 # UNAME_MACHINE based on the output of uname instead of i386?876 echo i586-pc-interix877 exit ;;878 914 i*:UWIN*:*) 879 echo ${UNAME_MACHINE}-pc-uwin915 echo "$UNAME_MACHINE"-pc-uwin 880 916 exit ;; 881 917 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 882 echo x86_64-unknown-cygwin 883 exit ;; 884 p*:CYGWIN*:*) 885 echo powerpcle-unknown-cygwin 918 echo x86_64-pc-cygwin 886 919 exit ;; 887 920 prep*:SunOS:5.*:*) 888 echo powerpcle-unknown-solaris2 `echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`921 echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" 889 922 exit ;; 890 923 *:GNU:*:*) 891 924 # the GNU system 892 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`925 echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" 893 926 exit ;; 894 927 *:GNU/*:*:*) 895 928 # other systems with GNU libc and userland 896 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}897 exit ;; 898 i*86:Minix:*:*)899 echo ${UNAME_MACHINE}-pc-minix929 echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" 930 exit ;; 931 *:Minix:*:*) 932 echo "$UNAME_MACHINE"-unknown-minix 900 933 exit ;; 901 934 aarch64:Linux:*:*) 902 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 903 936 exit ;; 904 937 aarch64_be:Linux:*:*) 905 938 UNAME_MACHINE=aarch64_be 906 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}939 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 907 940 exit ;; 908 941 alpha:Linux:*:*) 909 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo`in942 case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in 910 943 EV5) UNAME_MACHINE=alphaev5 ;; 911 944 EV56) UNAME_MACHINE=alphaev56 ;; … … 917 950 esac 918 951 objdump --private-headers /bin/sh | grep -q ld.so.1 919 if test "$?" = 0 ; then LIBC= "gnulibc1"; fi920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}921 exit ;; 922 arc:Linux:*:* | arceb:Linux:*:* )923 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}952 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi 953 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 954 exit ;; 955 arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*) 956 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 924 957 exit ;; 925 958 arm*:Linux:*:*) 926 eval $set_cc_for_build959 set_cc_for_build 927 960 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 928 961 | grep -q __ARM_EABI__ 929 962 then 930 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}963 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 931 964 else 932 965 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 933 966 | grep -q __ARM_PCS_VFP 934 967 then 935 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi968 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi 936 969 else 937 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf 938 971 fi 939 972 fi 940 973 exit ;; 941 974 avr32*:Linux:*:*) 942 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}975 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 943 976 exit ;; 944 977 cris:Linux:*:*) 945 echo ${UNAME_MACHINE}-axis-linux-${LIBC}978 echo "$UNAME_MACHINE"-axis-linux-"$LIBC" 946 979 exit ;; 947 980 crisv32:Linux:*:*) 948 echo ${UNAME_MACHINE}-axis-linux-${LIBC}981 echo "$UNAME_MACHINE"-axis-linux-"$LIBC" 949 982 exit ;; 950 983 e2k:Linux:*:*) 951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}984 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 952 985 exit ;; 953 986 frv:Linux:*:*) 954 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}987 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 955 988 exit ;; 956 989 hexagon:Linux:*:*) 957 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}990 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 958 991 exit ;; 959 992 i*86:Linux:*:*) 960 echo ${UNAME_MACHINE}-pc-linux-${LIBC}993 echo "$UNAME_MACHINE"-pc-linux-"$LIBC" 961 994 exit ;; 962 995 ia64:Linux:*:*) 963 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 996 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 997 exit ;; 998 k1om:Linux:*:*) 999 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1000 exit ;; 1001 loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) 1002 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 964 1003 exit ;; 965 1004 m32r*:Linux:*:*) 966 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1005 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 967 1006 exit ;; 968 1007 m68*:Linux:*:*) 969 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1008 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 970 1009 exit ;; 971 1010 mips:Linux:*:* | mips64:Linux:*:*) 972 eval $set_cc_for_build 973 sed 's/^ //' << EOF >$dummy.c 1011 set_cc_for_build 1012 IS_GLIBC=0 1013 test x"${LIBC}" = xgnu && IS_GLIBC=1 1014 sed 's/^ //' << EOF > "$dummy.c" 974 1015 #undef CPU 975 #undef ${UNAME_MACHINE} 976 #undef ${UNAME_MACHINE}el 1016 #undef mips 1017 #undef mipsel 1018 #undef mips64 1019 #undef mips64el 1020 #if ${IS_GLIBC} && defined(_ABI64) 1021 LIBCABI=gnuabi64 1022 #else 1023 #if ${IS_GLIBC} && defined(_ABIN32) 1024 LIBCABI=gnuabin32 1025 #else 1026 LIBCABI=${LIBC} 1027 #endif 1028 #endif 1029 1030 #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 1031 CPU=mipsisa64r6 1032 #else 1033 #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 1034 CPU=mipsisa32r6 1035 #else 1036 #if defined(__mips64) 1037 CPU=mips64 1038 #else 1039 CPU=mips 1040 #endif 1041 #endif 1042 #endif 1043 977 1044 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 978 CPU=${UNAME_MACHINE}el1045 MIPS_ENDIAN=el 979 1046 #else 980 1047 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 981 CPU=${UNAME_MACHINE}1048 MIPS_ENDIAN= 982 1049 #else 983 CPU=1050 MIPS_ENDIAN= 984 1051 #endif 985 1052 #endif 986 1053 EOF 987 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`988 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }1054 eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" 1055 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } 989 1056 ;; 1057 mips64el:Linux:*:*) 1058 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1059 exit ;; 990 1060 openrisc*:Linux:*:*) 991 echo or1k-unknown-linux- ${LIBC}1061 echo or1k-unknown-linux-"$LIBC" 992 1062 exit ;; 993 1063 or32:Linux:*:* | or1k*:Linux:*:*) 994 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1064 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 995 1065 exit ;; 996 1066 padre:Linux:*:*) 997 echo sparc-unknown-linux- ${LIBC}1067 echo sparc-unknown-linux-"$LIBC" 998 1068 exit ;; 999 1069 parisc64:Linux:*:* | hppa64:Linux:*:*) 1000 echo hppa64-unknown-linux- ${LIBC}1070 echo hppa64-unknown-linux-"$LIBC" 1001 1071 exit ;; 1002 1072 parisc:Linux:*:* | hppa:Linux:*:*) 1003 1073 # Look for CPU level 1004 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2`in1005 PA7*) echo hppa1.1-unknown-linux- ${LIBC};;1006 PA8*) echo hppa2.0-unknown-linux- ${LIBC};;1007 *) echo hppa-unknown-linux- ${LIBC};;1074 case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in 1075 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; 1076 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; 1077 *) echo hppa-unknown-linux-"$LIBC" ;; 1008 1078 esac 1009 1079 exit ;; 1010 1080 ppc64:Linux:*:*) 1011 echo powerpc64-unknown-linux- ${LIBC}1081 echo powerpc64-unknown-linux-"$LIBC" 1012 1082 exit ;; 1013 1083 ppc:Linux:*:*) 1014 echo powerpc-unknown-linux- ${LIBC}1084 echo powerpc-unknown-linux-"$LIBC" 1015 1085 exit ;; 1016 1086 ppc64le:Linux:*:*) 1017 echo powerpc64le-unknown-linux- ${LIBC}1087 echo powerpc64le-unknown-linux-"$LIBC" 1018 1088 exit ;; 1019 1089 ppcle:Linux:*:*) 1020 echo powerpcle-unknown-linux-${LIBC} 1090 echo powerpcle-unknown-linux-"$LIBC" 1091 exit ;; 1092 riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) 1093 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1021 1094 exit ;; 1022 1095 s390:Linux:*:* | s390x:Linux:*:*) 1023 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}1096 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" 1024 1097 exit ;; 1025 1098 sh64*:Linux:*:*) 1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1099 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1027 1100 exit ;; 1028 1101 sh*:Linux:*:*) 1029 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1102 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1030 1103 exit ;; 1031 1104 sparc:Linux:*:* | sparc64:Linux:*:*) 1032 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1105 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1033 1106 exit ;; 1034 1107 tile*:Linux:*:*) 1035 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1108 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1036 1109 exit ;; 1037 1110 vax:Linux:*:*) 1038 echo ${UNAME_MACHINE}-dec-linux-${LIBC}1111 echo "$UNAME_MACHINE"-dec-linux-"$LIBC" 1039 1112 exit ;; 1040 1113 x86_64:Linux:*:*) 1041 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1114 set_cc_for_build 1115 LIBCABI=$LIBC 1116 if test "$CC_FOR_BUILD" != no_compiler_found; then 1117 if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ 1118 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1119 grep IS_X32 >/dev/null 1120 then 1121 LIBCABI="$LIBC"x32 1122 fi 1123 fi 1124 echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" 1042 1125 exit ;; 1043 1126 xtensa*:Linux:*:*) 1044 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}1127 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" 1045 1128 exit ;; 1046 1129 i*86:DYNIX/ptx:4*:*) … … 1056 1139 # I just have to hope. -- rms. 1057 1140 # Use sysv4.2uw... so that sysv4* matches it. 1058 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}1141 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" 1059 1142 exit ;; 1060 1143 i*86:OS/2:*:*) 1061 1144 # If we were able to find `uname', then EMX Unix compatibility 1062 1145 # is probably installed. 1063 echo ${UNAME_MACHINE}-pc-os2-emx1146 echo "$UNAME_MACHINE"-pc-os2-emx 1064 1147 exit ;; 1065 1148 i*86:XTS-300:*:STOP) 1066 echo ${UNAME_MACHINE}-unknown-stop1149 echo "$UNAME_MACHINE"-unknown-stop 1067 1150 exit ;; 1068 1151 i*86:atheos:*:*) 1069 echo ${UNAME_MACHINE}-unknown-atheos1152 echo "$UNAME_MACHINE"-unknown-atheos 1070 1153 exit ;; 1071 1154 i*86:syllable:*:*) 1072 echo ${UNAME_MACHINE}-pc-syllable1155 echo "$UNAME_MACHINE"-pc-syllable 1073 1156 exit ;; 1074 1157 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1075 echo i386-unknown-lynxos ${UNAME_RELEASE}1158 echo i386-unknown-lynxos"$UNAME_RELEASE" 1076 1159 exit ;; 1077 1160 i*86:*DOS:*:*) 1078 echo ${UNAME_MACHINE}-pc-msdosdjgpp1079 exit ;; 1080 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)1081 UNAME_REL= `echo ${UNAME_RELEASE} | sed 's/\/MP$//'`1161 echo "$UNAME_MACHINE"-pc-msdosdjgpp 1162 exit ;; 1163 i*86:*:4.*:*) 1164 UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') 1082 1165 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1083 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}1166 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" 1084 1167 else 1085 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}1168 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" 1086 1169 fi 1087 1170 exit ;; 1088 1171 i*86:*:5:[678]*) 1089 1172 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1090 case `/bin/uname -X | grep "^Machine"`in1173 case $(/bin/uname -X | grep "^Machine") in 1091 1174 *486*) UNAME_MACHINE=i486 ;; 1092 1175 *Pentium) UNAME_MACHINE=i586 ;; 1093 1176 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1094 1177 esac 1095 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}1178 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" 1096 1179 exit ;; 1097 1180 i*86:*:3.2:*) 1098 1181 if test -f /usr/options/cb.name; then 1099 UNAME_REL= `sed -n 's/.*Version //p' </usr/options/cb.name`1100 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL1182 UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name) 1183 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" 1101 1184 elif /bin/uname -X 2>/dev/null >/dev/null ; then 1102 UNAME_REL= `(/bin/uname -X|grep Release|sed -e 's/.*= //')`1185 UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) 1103 1186 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1104 1187 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ … … 1108 1191 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1109 1192 && UNAME_MACHINE=i686 1110 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL1193 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" 1111 1194 else 1112 echo ${UNAME_MACHINE}-pc-sysv321195 echo "$UNAME_MACHINE"-pc-sysv32 1113 1196 fi 1114 1197 exit ;; … … 1118 1201 # the processor, so we play safe by assuming i586. 1119 1202 # Note: whatever this is, it MUST be the same as what config.sub 1120 # prints for the "djgpp" host, or else GDB configur ywill decide that1203 # prints for the "djgpp" host, or else GDB configure will decide that 1121 1204 # this is a cross-build. 1122 1205 echo i586-pc-msdosdjgpp … … 1130 1213 i860:*:4.*:*) # i860-SVR4 1131 1214 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1132 echo i860-stardent-sysv ${UNAME_RELEASE}# Stardent Vistra i860-SVR41215 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 1133 1216 else # Add other i860-SVR4 vendors below as they are discovered. 1134 echo i860-unknown-sysv ${UNAME_RELEASE}# Unknown i860-SVR41217 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 1135 1218 fi 1136 1219 exit ;; … … 1150 1233 OS_REL='' 1151 1234 test -r /etc/.relid \ 1152 && OS_REL=. `sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`1235 && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) 1153 1236 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1154 && { echo i486-ncr-sysv4.3 ${OS_REL}; exit; }1237 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } 1155 1238 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1156 && { echo i586-ncr-sysv4.3 ${OS_REL}; exit; } ;;1239 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 1157 1240 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1158 1241 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ … … 1161 1244 OS_REL='.3' 1162 1245 test -r /etc/.relid \ 1163 && OS_REL=. `sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`1246 && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) 1164 1247 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1165 && { echo i486-ncr-sysv4.3 ${OS_REL}; exit; }1248 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } 1166 1249 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1167 && { echo i586-ncr-sysv4.3 ${OS_REL}; exit; }1250 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } 1168 1251 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1169 && { echo i586-ncr-sysv4.3 ${OS_REL}; exit; } ;;1252 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 1170 1253 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1171 echo m68k-unknown-lynxos ${UNAME_RELEASE}1254 echo m68k-unknown-lynxos"$UNAME_RELEASE" 1172 1255 exit ;; 1173 1256 mc68030:UNIX_System_V:4.*:*) … … 1175 1258 exit ;; 1176 1259 TSUNAMI:LynxOS:2.*:*) 1177 echo sparc-unknown-lynxos ${UNAME_RELEASE}1260 echo sparc-unknown-lynxos"$UNAME_RELEASE" 1178 1261 exit ;; 1179 1262 rs6000:LynxOS:2.*:*) 1180 echo rs6000-unknown-lynxos ${UNAME_RELEASE}1263 echo rs6000-unknown-lynxos"$UNAME_RELEASE" 1181 1264 exit ;; 1182 1265 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1183 echo powerpc-unknown-lynxos ${UNAME_RELEASE}1266 echo powerpc-unknown-lynxos"$UNAME_RELEASE" 1184 1267 exit ;; 1185 1268 SM[BE]S:UNIX_SV:*:*) 1186 echo mips-dde-sysv ${UNAME_RELEASE}1269 echo mips-dde-sysv"$UNAME_RELEASE" 1187 1270 exit ;; 1188 1271 RM*:ReliantUNIX-*:*:*) … … 1194 1277 *:SINIX-*:*:*) 1195 1278 if uname -p 2>/dev/null >/dev/null ; then 1196 UNAME_MACHINE= `(uname -p) 2>/dev/null`1197 echo ${UNAME_MACHINE}-sni-sysv41279 UNAME_MACHINE=$( (uname -p) 2>/dev/null) 1280 echo "$UNAME_MACHINE"-sni-sysv4 1198 1281 else 1199 1282 echo ns32k-sni-sysv … … 1215 1298 i*86:VOS:*:*) 1216 1299 # From Paul.Green@stratus.com. 1217 echo ${UNAME_MACHINE}-stratus-vos1300 echo "$UNAME_MACHINE"-stratus-vos 1218 1301 exit ;; 1219 1302 *:VOS:*:*) … … 1222 1305 exit ;; 1223 1306 mc68*:A/UX:*:*) 1224 echo m68k-apple-aux ${UNAME_RELEASE}1307 echo m68k-apple-aux"$UNAME_RELEASE" 1225 1308 exit ;; 1226 1309 news*:NEWS-OS:6*:*) … … 1228 1311 exit ;; 1229 1312 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1230 if [ -d /usr/nec ]; then1231 echo mips-nec-sysv ${UNAME_RELEASE}1313 if test -d /usr/nec; then 1314 echo mips-nec-sysv"$UNAME_RELEASE" 1232 1315 else 1233 echo mips-unknown-sysv ${UNAME_RELEASE}1316 echo mips-unknown-sysv"$UNAME_RELEASE" 1234 1317 fi 1235 1318 exit ;; … … 1250 1333 exit ;; 1251 1334 SX-4:SUPER-UX:*:*) 1252 echo sx4-nec-superux ${UNAME_RELEASE}1335 echo sx4-nec-superux"$UNAME_RELEASE" 1253 1336 exit ;; 1254 1337 SX-5:SUPER-UX:*:*) 1255 echo sx5-nec-superux ${UNAME_RELEASE}1338 echo sx5-nec-superux"$UNAME_RELEASE" 1256 1339 exit ;; 1257 1340 SX-6:SUPER-UX:*:*) 1258 echo sx6-nec-superux ${UNAME_RELEASE}1341 echo sx6-nec-superux"$UNAME_RELEASE" 1259 1342 exit ;; 1260 1343 SX-7:SUPER-UX:*:*) 1261 echo sx7-nec-superux ${UNAME_RELEASE}1344 echo sx7-nec-superux"$UNAME_RELEASE" 1262 1345 exit ;; 1263 1346 SX-8:SUPER-UX:*:*) 1264 echo sx8-nec-superux ${UNAME_RELEASE}1347 echo sx8-nec-superux"$UNAME_RELEASE" 1265 1348 exit ;; 1266 1349 SX-8R:SUPER-UX:*:*) 1267 echo sx8r-nec-superux${UNAME_RELEASE} 1350 echo sx8r-nec-superux"$UNAME_RELEASE" 1351 exit ;; 1352 SX-ACE:SUPER-UX:*:*) 1353 echo sxace-nec-superux"$UNAME_RELEASE" 1268 1354 exit ;; 1269 1355 Power*:Rhapsody:*:*) 1270 echo powerpc-apple-rhapsody ${UNAME_RELEASE}1356 echo powerpc-apple-rhapsody"$UNAME_RELEASE" 1271 1357 exit ;; 1272 1358 *:Rhapsody:*:*) 1273 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1359 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" 1360 exit ;; 1361 arm64:Darwin:*:*) 1362 echo aarch64-apple-darwin"$UNAME_RELEASE" 1274 1363 exit ;; 1275 1364 *:Darwin:*:*) 1276 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1277 eval $set_cc_for_build 1278 if test "$UNAME_PROCESSOR" = unknown ; then 1279 UNAME_PROCESSOR=powerpc 1280 fi 1281 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1282 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1283 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1284 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1285 grep IS_64BIT_ARCH >/dev/null 1286 then 1287 case $UNAME_PROCESSOR in 1288 i386) UNAME_PROCESSOR=x86_64 ;; 1289 powerpc) UNAME_PROCESSOR=powerpc64 ;; 1290 esac 1291 fi 1365 UNAME_PROCESSOR=$(uname -p) 1366 case $UNAME_PROCESSOR in 1367 unknown) UNAME_PROCESSOR=powerpc ;; 1368 esac 1369 if command -v xcode-select > /dev/null 2> /dev/null && \ 1370 ! xcode-select --print-path > /dev/null 2> /dev/null ; then 1371 # Avoid executing cc if there is no toolchain installed as 1372 # cc will be a stub that puts up a graphical alert 1373 # prompting the user to install developer tools. 1374 CC_FOR_BUILD=no_compiler_found 1375 else 1376 set_cc_for_build 1377 fi 1378 if test "$CC_FOR_BUILD" != no_compiler_found; then 1379 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1380 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1381 grep IS_64BIT_ARCH >/dev/null 1382 then 1383 case $UNAME_PROCESSOR in 1384 i386) UNAME_PROCESSOR=x86_64 ;; 1385 powerpc) UNAME_PROCESSOR=powerpc64 ;; 1386 esac 1387 fi 1388 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc 1389 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ 1390 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 1391 grep IS_PPC >/dev/null 1392 then 1393 UNAME_PROCESSOR=powerpc 1292 1394 fi 1293 1395 elif test "$UNAME_PROCESSOR" = i386 ; then 1294 # Avoid executing cc on OS X 10.9, as it ships with a stub 1295 # that puts up a graphical alert prompting to install 1296 # developer tools. Any system running Mac OS X 10.7 or 1297 # later (Darwin 11 and later) is required to have a 64-bit 1298 # processor. This is not true of the ARM version of Darwin 1299 # that Apple uses in portable devices. 1300 UNAME_PROCESSOR=x86_64 1301 fi 1302 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1396 # uname -m returns i386 or x86_64 1397 UNAME_PROCESSOR=$UNAME_MACHINE 1398 fi 1399 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" 1303 1400 exit ;; 1304 1401 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1305 UNAME_PROCESSOR= `uname -p`1306 if test "$UNAME_PROCESSOR" = "x86"; then1402 UNAME_PROCESSOR=$(uname -p) 1403 if test "$UNAME_PROCESSOR" = x86; then 1307 1404 UNAME_PROCESSOR=i386 1308 1405 UNAME_MACHINE=pc 1309 1406 fi 1310 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}1407 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" 1311 1408 exit ;; 1312 1409 *:QNX:*:4*) 1313 1410 echo i386-pc-qnx 1314 1411 exit ;; 1315 NEO- ?:NONSTOP_KERNEL:*:*)1316 echo neo-tandem-nsk ${UNAME_RELEASE}1412 NEO-*:NONSTOP_KERNEL:*:*) 1413 echo neo-tandem-nsk"$UNAME_RELEASE" 1317 1414 exit ;; 1318 1415 NSE-*:NONSTOP_KERNEL:*:*) 1319 echo nse-tandem-nsk${UNAME_RELEASE} 1320 exit ;; 1321 NSR-?:NONSTOP_KERNEL:*:*) 1322 echo nsr-tandem-nsk${UNAME_RELEASE} 1416 echo nse-tandem-nsk"$UNAME_RELEASE" 1417 exit ;; 1418 NSR-*:NONSTOP_KERNEL:*:*) 1419 echo nsr-tandem-nsk"$UNAME_RELEASE" 1420 exit ;; 1421 NSV-*:NONSTOP_KERNEL:*:*) 1422 echo nsv-tandem-nsk"$UNAME_RELEASE" 1423 exit ;; 1424 NSX-*:NONSTOP_KERNEL:*:*) 1425 echo nsx-tandem-nsk"$UNAME_RELEASE" 1323 1426 exit ;; 1324 1427 *:NonStop-UX:*:*) … … 1329 1432 exit ;; 1330 1433 DS/*:UNIX_System_V:*:*) 1331 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}1434 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" 1332 1435 exit ;; 1333 1436 *:Plan9:*:*) … … 1335 1438 # is converted to i386 for consistency with other x86 1336 1439 # operating systems. 1337 if test "$ cputype" = "386"; then1440 if test "${cputype-}" = 386; then 1338 1441 UNAME_MACHINE=i386 1339 el se1442 elif test "x${cputype-}" != x; then 1340 1443 UNAME_MACHINE="$cputype" 1341 1444 fi 1342 echo ${UNAME_MACHINE}-unknown-plan91445 echo "$UNAME_MACHINE"-unknown-plan9 1343 1446 exit ;; 1344 1447 *:TOPS-10:*:*) … … 1361 1464 exit ;; 1362 1465 SEI:*:*:SEIUX) 1363 echo mips-sei-seiux ${UNAME_RELEASE}1466 echo mips-sei-seiux"$UNAME_RELEASE" 1364 1467 exit ;; 1365 1468 *:DragonFly:*:*) 1366 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`1469 echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" 1367 1470 exit ;; 1368 1471 *:*VMS:*:*) 1369 UNAME_MACHINE= `(uname -p) 2>/dev/null`1370 case "${UNAME_MACHINE}"in1472 UNAME_MACHINE=$( (uname -p) 2>/dev/null) 1473 case $UNAME_MACHINE in 1371 1474 A*) echo alpha-dec-vms ; exit ;; 1372 1475 I*) echo ia64-dec-vms ; exit ;; … … 1377 1480 exit ;; 1378 1481 i*86:skyos:*:*) 1379 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'1482 echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" 1380 1483 exit ;; 1381 1484 i*86:rdos:*:*) 1382 echo ${UNAME_MACHINE}-pc-rdos1383 exit ;; 1384 i*86:AROS:*:*)1385 echo ${UNAME_MACHINE}-pc-aros1485 echo "$UNAME_MACHINE"-pc-rdos 1486 exit ;; 1487 *:AROS:*:*) 1488 echo "$UNAME_MACHINE"-unknown-aros 1386 1489 exit ;; 1387 1490 x86_64:VMkernel:*:*) 1388 echo ${UNAME_MACHINE}-unknown-esx 1491 echo "$UNAME_MACHINE"-unknown-esx 1492 exit ;; 1493 amd64:Isilon\ OneFS:*:*) 1494 echo x86_64-unknown-onefs 1495 exit ;; 1496 *:Unleashed:*:*) 1497 echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" 1389 1498 exit ;; 1390 1499 esac 1391 1500 1501 # No uname command or uname output not recognized. 1502 set_cc_for_build 1503 cat > "$dummy.c" <<EOF 1504 #ifdef _SEQUENT_ 1505 #include <sys/types.h> 1506 #include <sys/utsname.h> 1507 #endif 1508 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) 1509 #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) 1510 #include <signal.h> 1511 #if defined(_SIZE_T_) || defined(SIGLOST) 1512 #include <sys/utsname.h> 1513 #endif 1514 #endif 1515 #endif 1516 main () 1517 { 1518 #if defined (sony) 1519 #if defined (MIPSEB) 1520 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1521 I don't know.... */ 1522 printf ("mips-sony-bsd\n"); exit (0); 1523 #else 1524 #include <sys/param.h> 1525 printf ("m68k-sony-newsos%s\n", 1526 #ifdef NEWSOS4 1527 "4" 1528 #else 1529 "" 1530 #endif 1531 ); exit (0); 1532 #endif 1533 #endif 1534 1535 #if defined (NeXT) 1536 #if !defined (__ARCHITECTURE__) 1537 #define __ARCHITECTURE__ "m68k" 1538 #endif 1539 int version; 1540 version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); 1541 if (version < 4) 1542 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1543 else 1544 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1545 exit (0); 1546 #endif 1547 1548 #if defined (MULTIMAX) || defined (n16) 1549 #if defined (UMAXV) 1550 printf ("ns32k-encore-sysv\n"); exit (0); 1551 #else 1552 #if defined (CMU) 1553 printf ("ns32k-encore-mach\n"); exit (0); 1554 #else 1555 printf ("ns32k-encore-bsd\n"); exit (0); 1556 #endif 1557 #endif 1558 #endif 1559 1560 #if defined (__386BSD__) 1561 printf ("i386-pc-bsd\n"); exit (0); 1562 #endif 1563 1564 #if defined (sequent) 1565 #if defined (i386) 1566 printf ("i386-sequent-dynix\n"); exit (0); 1567 #endif 1568 #if defined (ns32000) 1569 printf ("ns32k-sequent-dynix\n"); exit (0); 1570 #endif 1571 #endif 1572 1573 #if defined (_SEQUENT_) 1574 struct utsname un; 1575 1576 uname(&un); 1577 if (strncmp(un.version, "V2", 2) == 0) { 1578 printf ("i386-sequent-ptx2\n"); exit (0); 1579 } 1580 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1581 printf ("i386-sequent-ptx1\n"); exit (0); 1582 } 1583 printf ("i386-sequent-ptx\n"); exit (0); 1584 #endif 1585 1586 #if defined (vax) 1587 #if !defined (ultrix) 1588 #include <sys/param.h> 1589 #if defined (BSD) 1590 #if BSD == 43 1591 printf ("vax-dec-bsd4.3\n"); exit (0); 1592 #else 1593 #if BSD == 199006 1594 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1595 #else 1596 printf ("vax-dec-bsd\n"); exit (0); 1597 #endif 1598 #endif 1599 #else 1600 printf ("vax-dec-bsd\n"); exit (0); 1601 #endif 1602 #else 1603 #if defined(_SIZE_T_) || defined(SIGLOST) 1604 struct utsname un; 1605 uname (&un); 1606 printf ("vax-dec-ultrix%s\n", un.release); exit (0); 1607 #else 1608 printf ("vax-dec-ultrix\n"); exit (0); 1609 #endif 1610 #endif 1611 #endif 1612 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) 1613 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) 1614 #if defined(_SIZE_T_) || defined(SIGLOST) 1615 struct utsname *un; 1616 uname (&un); 1617 printf ("mips-dec-ultrix%s\n", un.release); exit (0); 1618 #else 1619 printf ("mips-dec-ultrix\n"); exit (0); 1620 #endif 1621 #endif 1622 #endif 1623 1624 #if defined (alliant) && defined (i860) 1625 printf ("i860-alliant-bsd\n"); exit (0); 1626 #endif 1627 1628 exit (1); 1629 } 1630 EOF 1631 1632 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && 1633 { echo "$SYSTEM_NAME"; exit; } 1634 1635 # Apollos put the system type in the environment. 1636 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } 1637 1638 echo "$0: unable to guess system type" >&2 1639 1640 case $UNAME_MACHINE:$UNAME_SYSTEM in 1641 mips:Linux | mips64:Linux) 1642 # If we got here on MIPS GNU/Linux, output extra information. 1643 cat >&2 <<EOF 1644 1645 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize 1646 the system type. Please install a C compiler and try again. 1647 EOF 1648 ;; 1649 esac 1650 1392 1651 cat >&2 <<EOF 1393 $0: unable to guess system type 1394 1395 This script, last modified $timestamp, has failed to recognize 1396 the operating system you are using. It is advised that you 1397 download the most up to date version of the config scripts from 1398 1399 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1652 1653 This script (version $timestamp), has failed to recognize the 1654 operating system you are using. If your script is old, overwrite *all* 1655 copies of config.guess and config.sub with the latest versions from: 1656 1657 https://git.savannah.gnu.org/cgit/config.git/plain/config.guess 1400 1658 and 1401 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1402 1403 If the version you run ($0) is already up to date, please 1404 send the following data and any information you think might be 1405 pertinent to <config-patches@gnu.org> in order to provide the needed 1406 information to handle your system. 1659 https://git.savannah.gnu.org/cgit/config.git/plain/config.sub 1660 EOF 1661 1662 year=$(echo $timestamp | sed 's,-.*,,') 1663 # shellcheck disable=SC2003 1664 if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then 1665 cat >&2 <<EOF 1666 1667 If $0 has already been updated, send the following data and any 1668 information you think might be pertinent to config-patches@gnu.org to 1669 provide the necessary information to handle your system. 1407 1670 1408 1671 config.guess timestamp = $timestamp 1409 1672 1410 uname -m = `(uname -m) 2>/dev/null || echo unknown`1411 uname -r = `(uname -r) 2>/dev/null || echo unknown`1412 uname -s = `(uname -s) 2>/dev/null || echo unknown`1413 uname -v = `(uname -v) 2>/dev/null || echo unknown`1414 1415 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`1416 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`1417 1418 hostinfo = `(hostinfo) 2>/dev/null`1419 /bin/universe = `(/bin/universe) 2>/dev/null`1420 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`1421 /bin/arch = `(/bin/arch) 2>/dev/null`1422 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`1423 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`1424 1425 UNAME_MACHINE = ${UNAME_MACHINE}1426 UNAME_RELEASE = ${UNAME_RELEASE}1427 UNAME_SYSTEM = ${UNAME_SYSTEM}1428 UNAME_VERSION = ${UNAME_VERSION}1673 uname -m = $( (uname -m) 2>/dev/null || echo unknown) 1674 uname -r = $( (uname -r) 2>/dev/null || echo unknown) 1675 uname -s = $( (uname -s) 2>/dev/null || echo unknown) 1676 uname -v = $( (uname -v) 2>/dev/null || echo unknown) 1677 1678 /usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) 1679 /bin/uname -X = $( (/bin/uname -X) 2>/dev/null) 1680 1681 hostinfo = $( (hostinfo) 2>/dev/null) 1682 /bin/universe = $( (/bin/universe) 2>/dev/null) 1683 /usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) 1684 /bin/arch = $( (/bin/arch) 2>/dev/null) 1685 /usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) 1686 /usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) 1687 1688 UNAME_MACHINE = "$UNAME_MACHINE" 1689 UNAME_RELEASE = "$UNAME_RELEASE" 1690 UNAME_SYSTEM = "$UNAME_SYSTEM" 1691 UNAME_VERSION = "$UNAME_VERSION" 1429 1692 EOF 1693 fi 1430 1694 1431 1695 exit 1 1432 1696 1433 1697 # Local variables: 1434 # eval: (add-hook ' write-file-hooks'time-stamp)1698 # eval: (add-hook 'before-save-hook 'time-stamp) 1435 1699 # time-stamp-start: "timestamp='" 1436 1700 # time-stamp-format: "%:y-%02m-%02d" -
common/config.sub
rb66fa07 r169e80d1 1 1 #! /bin/sh 2 2 # Configuration validation subroutine script. 3 # Copyright 1992-20 15Free Software Foundation, Inc.4 5 timestamp='20 15-03-08'3 # Copyright 1992-2021 Free Software Foundation, Inc. 4 5 timestamp='2021-04-30' 6 6 7 7 # This file is free software; you can redistribute it and/or modify it … … 16 16 # 17 17 # You should have received a copy of the GNU General Public License 18 # along with this program; if not, see <http ://www.gnu.org/licenses/>.18 # along with this program; if not, see <https://www.gnu.org/licenses/>. 19 19 # 20 20 # As a special exception to the GNU General Public License, if you … … 34 34 35 35 # You can get the latest version of this script from: 36 # http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD36 # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub 37 37 38 38 # This file is supposed to be the same for all GNU packages … … 51 51 # It is wrong to echo any other type of specification. 52 52 53 me= `echo "$0" | sed -e 's,.*/,,'`53 me=$(echo "$0" | sed -e 's,.*/,,') 54 54 55 55 usage="\ 56 Usage: $0 [OPTION] CPU-MFR-OPSYS 57 $0 [OPTION] ALIAS 56 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS 58 57 59 58 Canonicalize a configuration name. 60 59 61 Op eration modes:60 Options: 62 61 -h, --help print this help, then exit 63 62 -t, --time-stamp print date of last modification, then exit … … 69 68 GNU config.sub ($timestamp) 70 69 71 Copyright 1992-20 15Free Software Foundation, Inc.70 Copyright 1992-2021 Free Software Foundation, Inc. 72 71 73 72 This is free software; see the source for copying conditions. There is NO … … 91 90 break ;; 92 91 -* ) 93 echo "$me: invalid option $1$help" 92 echo "$me: invalid option $1$help" >&2 94 93 exit 1 ;; 95 94 96 95 *local*) 97 96 # First pass through any local machine types. 98 echo $197 echo "$1" 99 98 exit ;; 100 99 … … 112 111 esac 113 112 114 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 115 # Here we must recognize all the valid KERNEL-OS combinations. 116 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 117 case $maybe_os in 118 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 119 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 121 kopensolaris*-gnu* | \ 122 storm-chaos* | os2-emx* | rtmk-nova*) 123 os=-$maybe_os 124 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 125 ;; 126 android-linux) 127 os=-linux-android 128 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 129 ;; 130 *) 131 basic_machine=`echo $1 | sed 's/-[^-]*$//'` 132 if [ $basic_machine != $1 ] 133 then os=`echo $1 | sed 's/.*-/-/'` 134 else os=; fi 135 ;; 113 # Split fields of configuration type 114 # shellcheck disable=SC2162 115 IFS="-" read field1 field2 field3 field4 <<EOF 116 $1 117 EOF 118 119 # Separate into logical components for further validation 120 case $1 in 121 *-*-*-*-*) 122 echo Invalid configuration \`"$1"\': more than four components >&2 123 exit 1 124 ;; 125 *-*-*-*) 126 basic_machine=$field1-$field2 127 basic_os=$field3-$field4 128 ;; 129 *-*-*) 130 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two 131 # parts 132 maybe_os=$field2-$field3 133 case $maybe_os in 134 nto-qnx* | linux-* | uclinux-uclibc* \ 135 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ 136 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ 137 | storm-chaos* | os2-emx* | rtmk-nova*) 138 basic_machine=$field1 139 basic_os=$maybe_os 140 ;; 141 android-linux) 142 basic_machine=$field1-unknown 143 basic_os=linux-android 144 ;; 145 *) 146 basic_machine=$field1-$field2 147 basic_os=$field3 148 ;; 149 esac 150 ;; 151 *-*) 152 # A lone config we happen to match not fitting any pattern 153 case $field1-$field2 in 154 decstation-3100) 155 basic_machine=mips-dec 156 basic_os= 157 ;; 158 *-*) 159 # Second component is usually, but not always the OS 160 case $field2 in 161 # Prevent following clause from handling this valid os 162 sun*os*) 163 basic_machine=$field1 164 basic_os=$field2 165 ;; 166 # Manufacturers 167 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ 168 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ 169 | unicom* | ibm* | next | hp | isi* | apollo | altos* \ 170 | convergent* | ncr* | news | 32* | 3600* | 3100* \ 171 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ 172 | ultra | tti* | harris | dolphin | highlevel | gould \ 173 | cbm | ns | masscomp | apple | axis | knuth | cray \ 174 | microblaze* | sim | cisco \ 175 | oki | wec | wrs | winbond) 176 basic_machine=$field1-$field2 177 basic_os= 178 ;; 179 *) 180 basic_machine=$field1 181 basic_os=$field2 182 ;; 183 esac 184 ;; 185 esac 186 ;; 187 *) 188 # Convert single-component short-hands not valid as part of 189 # multi-component configurations. 190 case $field1 in 191 386bsd) 192 basic_machine=i386-pc 193 basic_os=bsd 194 ;; 195 a29khif) 196 basic_machine=a29k-amd 197 basic_os=udi 198 ;; 199 adobe68k) 200 basic_machine=m68010-adobe 201 basic_os=scout 202 ;; 203 alliant) 204 basic_machine=fx80-alliant 205 basic_os= 206 ;; 207 altos | altos3068) 208 basic_machine=m68k-altos 209 basic_os= 210 ;; 211 am29k) 212 basic_machine=a29k-none 213 basic_os=bsd 214 ;; 215 amdahl) 216 basic_machine=580-amdahl 217 basic_os=sysv 218 ;; 219 amiga) 220 basic_machine=m68k-unknown 221 basic_os= 222 ;; 223 amigaos | amigados) 224 basic_machine=m68k-unknown 225 basic_os=amigaos 226 ;; 227 amigaunix | amix) 228 basic_machine=m68k-unknown 229 basic_os=sysv4 230 ;; 231 apollo68) 232 basic_machine=m68k-apollo 233 basic_os=sysv 234 ;; 235 apollo68bsd) 236 basic_machine=m68k-apollo 237 basic_os=bsd 238 ;; 239 aros) 240 basic_machine=i386-pc 241 basic_os=aros 242 ;; 243 aux) 244 basic_machine=m68k-apple 245 basic_os=aux 246 ;; 247 balance) 248 basic_machine=ns32k-sequent 249 basic_os=dynix 250 ;; 251 blackfin) 252 basic_machine=bfin-unknown 253 basic_os=linux 254 ;; 255 cegcc) 256 basic_machine=arm-unknown 257 basic_os=cegcc 258 ;; 259 convex-c1) 260 basic_machine=c1-convex 261 basic_os=bsd 262 ;; 263 convex-c2) 264 basic_machine=c2-convex 265 basic_os=bsd 266 ;; 267 convex-c32) 268 basic_machine=c32-convex 269 basic_os=bsd 270 ;; 271 convex-c34) 272 basic_machine=c34-convex 273 basic_os=bsd 274 ;; 275 convex-c38) 276 basic_machine=c38-convex 277 basic_os=bsd 278 ;; 279 cray) 280 basic_machine=j90-cray 281 basic_os=unicos 282 ;; 283 crds | unos) 284 basic_machine=m68k-crds 285 basic_os= 286 ;; 287 da30) 288 basic_machine=m68k-da30 289 basic_os= 290 ;; 291 decstation | pmax | pmin | dec3100 | decstatn) 292 basic_machine=mips-dec 293 basic_os= 294 ;; 295 delta88) 296 basic_machine=m88k-motorola 297 basic_os=sysv3 298 ;; 299 dicos) 300 basic_machine=i686-pc 301 basic_os=dicos 302 ;; 303 djgpp) 304 basic_machine=i586-pc 305 basic_os=msdosdjgpp 306 ;; 307 ebmon29k) 308 basic_machine=a29k-amd 309 basic_os=ebmon 310 ;; 311 es1800 | OSE68k | ose68k | ose | OSE) 312 basic_machine=m68k-ericsson 313 basic_os=ose 314 ;; 315 gmicro) 316 basic_machine=tron-gmicro 317 basic_os=sysv 318 ;; 319 go32) 320 basic_machine=i386-pc 321 basic_os=go32 322 ;; 323 h8300hms) 324 basic_machine=h8300-hitachi 325 basic_os=hms 326 ;; 327 h8300xray) 328 basic_machine=h8300-hitachi 329 basic_os=xray 330 ;; 331 h8500hms) 332 basic_machine=h8500-hitachi 333 basic_os=hms 334 ;; 335 harris) 336 basic_machine=m88k-harris 337 basic_os=sysv3 338 ;; 339 hp300 | hp300hpux) 340 basic_machine=m68k-hp 341 basic_os=hpux 342 ;; 343 hp300bsd) 344 basic_machine=m68k-hp 345 basic_os=bsd 346 ;; 347 hppaosf) 348 basic_machine=hppa1.1-hp 349 basic_os=osf 350 ;; 351 hppro) 352 basic_machine=hppa1.1-hp 353 basic_os=proelf 354 ;; 355 i386mach) 356 basic_machine=i386-mach 357 basic_os=mach 358 ;; 359 isi68 | isi) 360 basic_machine=m68k-isi 361 basic_os=sysv 362 ;; 363 m68knommu) 364 basic_machine=m68k-unknown 365 basic_os=linux 366 ;; 367 magnum | m3230) 368 basic_machine=mips-mips 369 basic_os=sysv 370 ;; 371 merlin) 372 basic_machine=ns32k-utek 373 basic_os=sysv 374 ;; 375 mingw64) 376 basic_machine=x86_64-pc 377 basic_os=mingw64 378 ;; 379 mingw32) 380 basic_machine=i686-pc 381 basic_os=mingw32 382 ;; 383 mingw32ce) 384 basic_machine=arm-unknown 385 basic_os=mingw32ce 386 ;; 387 monitor) 388 basic_machine=m68k-rom68k 389 basic_os=coff 390 ;; 391 morphos) 392 basic_machine=powerpc-unknown 393 basic_os=morphos 394 ;; 395 moxiebox) 396 basic_machine=moxie-unknown 397 basic_os=moxiebox 398 ;; 399 msdos) 400 basic_machine=i386-pc 401 basic_os=msdos 402 ;; 403 msys) 404 basic_machine=i686-pc 405 basic_os=msys 406 ;; 407 mvs) 408 basic_machine=i370-ibm 409 basic_os=mvs 410 ;; 411 nacl) 412 basic_machine=le32-unknown 413 basic_os=nacl 414 ;; 415 ncr3000) 416 basic_machine=i486-ncr 417 basic_os=sysv4 418 ;; 419 netbsd386) 420 basic_machine=i386-pc 421 basic_os=netbsd 422 ;; 423 netwinder) 424 basic_machine=armv4l-rebel 425 basic_os=linux 426 ;; 427 news | news700 | news800 | news900) 428 basic_machine=m68k-sony 429 basic_os=newsos 430 ;; 431 news1000) 432 basic_machine=m68030-sony 433 basic_os=newsos 434 ;; 435 necv70) 436 basic_machine=v70-nec 437 basic_os=sysv 438 ;; 439 nh3000) 440 basic_machine=m68k-harris 441 basic_os=cxux 442 ;; 443 nh[45]000) 444 basic_machine=m88k-harris 445 basic_os=cxux 446 ;; 447 nindy960) 448 basic_machine=i960-intel 449 basic_os=nindy 450 ;; 451 mon960) 452 basic_machine=i960-intel 453 basic_os=mon960 454 ;; 455 nonstopux) 456 basic_machine=mips-compaq 457 basic_os=nonstopux 458 ;; 459 os400) 460 basic_machine=powerpc-ibm 461 basic_os=os400 462 ;; 463 OSE68000 | ose68000) 464 basic_machine=m68000-ericsson 465 basic_os=ose 466 ;; 467 os68k) 468 basic_machine=m68k-none 469 basic_os=os68k 470 ;; 471 paragon) 472 basic_machine=i860-intel 473 basic_os=osf 474 ;; 475 parisc) 476 basic_machine=hppa-unknown 477 basic_os=linux 478 ;; 479 psp) 480 basic_machine=mipsallegrexel-sony 481 basic_os=psp 482 ;; 483 pw32) 484 basic_machine=i586-unknown 485 basic_os=pw32 486 ;; 487 rdos | rdos64) 488 basic_machine=x86_64-pc 489 basic_os=rdos 490 ;; 491 rdos32) 492 basic_machine=i386-pc 493 basic_os=rdos 494 ;; 495 rom68k) 496 basic_machine=m68k-rom68k 497 basic_os=coff 498 ;; 499 sa29200) 500 basic_machine=a29k-amd 501 basic_os=udi 502 ;; 503 sei) 504 basic_machine=mips-sei 505 basic_os=seiux 506 ;; 507 sequent) 508 basic_machine=i386-sequent 509 basic_os= 510 ;; 511 sps7) 512 basic_machine=m68k-bull 513 basic_os=sysv2 514 ;; 515 st2000) 516 basic_machine=m68k-tandem 517 basic_os= 518 ;; 519 stratus) 520 basic_machine=i860-stratus 521 basic_os=sysv4 522 ;; 523 sun2) 524 basic_machine=m68000-sun 525 basic_os= 526 ;; 527 sun2os3) 528 basic_machine=m68000-sun 529 basic_os=sunos3 530 ;; 531 sun2os4) 532 basic_machine=m68000-sun 533 basic_os=sunos4 534 ;; 535 sun3) 536 basic_machine=m68k-sun 537 basic_os= 538 ;; 539 sun3os3) 540 basic_machine=m68k-sun 541 basic_os=sunos3 542 ;; 543 sun3os4) 544 basic_machine=m68k-sun 545 basic_os=sunos4 546 ;; 547 sun4) 548 basic_machine=sparc-sun 549 basic_os= 550 ;; 551 sun4os3) 552 basic_machine=sparc-sun 553 basic_os=sunos3 554 ;; 555 sun4os4) 556 basic_machine=sparc-sun 557 basic_os=sunos4 558 ;; 559 sun4sol2) 560 basic_machine=sparc-sun 561 basic_os=solaris2 562 ;; 563 sun386 | sun386i | roadrunner) 564 basic_machine=i386-sun 565 basic_os= 566 ;; 567 sv1) 568 basic_machine=sv1-cray 569 basic_os=unicos 570 ;; 571 symmetry) 572 basic_machine=i386-sequent 573 basic_os=dynix 574 ;; 575 t3e) 576 basic_machine=alphaev5-cray 577 basic_os=unicos 578 ;; 579 t90) 580 basic_machine=t90-cray 581 basic_os=unicos 582 ;; 583 toad1) 584 basic_machine=pdp10-xkl 585 basic_os=tops20 586 ;; 587 tpf) 588 basic_machine=s390x-ibm 589 basic_os=tpf 590 ;; 591 udi29k) 592 basic_machine=a29k-amd 593 basic_os=udi 594 ;; 595 ultra3) 596 basic_machine=a29k-nyu 597 basic_os=sym1 598 ;; 599 v810 | necv810) 600 basic_machine=v810-nec 601 basic_os=none 602 ;; 603 vaxv) 604 basic_machine=vax-dec 605 basic_os=sysv 606 ;; 607 vms) 608 basic_machine=vax-dec 609 basic_os=vms 610 ;; 611 vsta) 612 basic_machine=i386-pc 613 basic_os=vsta 614 ;; 615 vxworks960) 616 basic_machine=i960-wrs 617 basic_os=vxworks 618 ;; 619 vxworks68) 620 basic_machine=m68k-wrs 621 basic_os=vxworks 622 ;; 623 vxworks29k) 624 basic_machine=a29k-wrs 625 basic_os=vxworks 626 ;; 627 xbox) 628 basic_machine=i686-pc 629 basic_os=mingw32 630 ;; 631 ymp) 632 basic_machine=ymp-cray 633 basic_os=unicos 634 ;; 635 *) 636 basic_machine=$1 637 basic_os= 638 ;; 639 esac 640 ;; 136 641 esac 137 642 138 ### Let's recognize common machines as not being operating systems so 139 ### that things like config.sub decstation-3100 work. We also 140 ### recognize some manufacturers as not being operating systems, so we 141 ### can provide default operating systems below. 142 case $os in 143 -sun*os*) 144 # Prevent following clause from handling this invalid input. 145 ;; 146 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 147 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 148 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 149 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 150 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 151 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 152 -apple | -axis | -knuth | -cray | -microblaze*) 153 os= 154 basic_machine=$1 155 ;; 156 -bluegene*) 157 os=-cnk 158 ;; 159 -sim | -cisco | -oki | -wec | -winbond) 160 os= 161 basic_machine=$1 162 ;; 163 -scout) 164 ;; 165 -wrs) 166 os=-vxworks 167 basic_machine=$1 168 ;; 169 -chorusos*) 170 os=-chorusos 171 basic_machine=$1 172 ;; 173 -chorusrdb) 174 os=-chorusrdb 175 basic_machine=$1 176 ;; 177 -hiux*) 178 os=-hiuxwe2 179 ;; 180 -sco6) 181 os=-sco5v6 182 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 183 ;; 184 -sco5) 185 os=-sco3.2v5 186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187 ;; 188 -sco4) 189 os=-sco3.2v4 190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 191 ;; 192 -sco3.2.[4-9]*) 193 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 195 ;; 196 -sco3.2v[4-9]*) 197 # Don't forget version if it is 3.2v4 or newer. 198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 199 ;; 200 -sco5v6*) 201 # Don't forget version if it is 3.2v4 or newer. 202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 203 ;; 204 -sco*) 205 os=-sco3.2v2 206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 207 ;; 208 -udk*) 209 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 210 ;; 211 -isc) 212 os=-isc2.2 213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 214 ;; 215 -clix*) 216 basic_machine=clipper-intergraph 217 ;; 218 -isc*) 219 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 220 ;; 221 -lynx*178) 222 os=-lynxos178 223 ;; 224 -lynx*5) 225 os=-lynxos5 226 ;; 227 -lynx*) 228 os=-lynxos 229 ;; 230 -ptx*) 231 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 232 ;; 233 -windowsnt*) 234 os=`echo $os | sed -e 's/windowsnt/winnt/'` 235 ;; 236 -psos*) 237 os=-psos 238 ;; 239 -mint | -mint[0-9]*) 240 basic_machine=m68k-atari 241 os=-mint 242 ;; 243 esac 244 245 # Decode aliases for certain CPU-COMPANY combinations. 643 # Decode 1-component or ad-hoc basic machines 246 644 case $basic_machine in 247 # Recognize the basic CPU types without company name. 248 # Some are omitted here because they have special meanings below. 249 1750a | 580 \ 250 | a29k \ 251 | aarch64 | aarch64_be \ 252 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 253 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 254 | am33_2.0 \ 255 | arc | arceb \ 256 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 257 | avr | avr32 \ 258 | be32 | be64 \ 259 | bfin \ 260 | c4x | c8051 | clipper \ 261 | d10v | d30v | dlx | dsp16xx \ 262 | e2k | epiphany \ 263 | fido | fr30 | frv | ft32 \ 264 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 265 | hexagon \ 266 | i370 | i860 | i960 | ia64 \ 267 | ip2k | iq2000 \ 268 | k1om \ 269 | le32 | le64 \ 270 | lm32 \ 271 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 272 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 273 | mips | mipsbe | mipseb | mipsel | mipsle \ 274 | mips16 \ 275 | mips64 | mips64el \ 276 | mips64octeon | mips64octeonel \ 277 | mips64orion | mips64orionel \ 278 | mips64r5900 | mips64r5900el \ 279 | mips64vr | mips64vrel \ 280 | mips64vr4100 | mips64vr4100el \ 281 | mips64vr4300 | mips64vr4300el \ 282 | mips64vr5000 | mips64vr5000el \ 283 | mips64vr5900 | mips64vr5900el \ 284 | mipsisa32 | mipsisa32el \ 285 | mipsisa32r2 | mipsisa32r2el \ 286 | mipsisa32r6 | mipsisa32r6el \ 287 | mipsisa64 | mipsisa64el \ 288 | mipsisa64r2 | mipsisa64r2el \ 289 | mipsisa64r6 | mipsisa64r6el \ 290 | mipsisa64sb1 | mipsisa64sb1el \ 291 | mipsisa64sr71k | mipsisa64sr71kel \ 292 | mipsr5900 | mipsr5900el \ 293 | mipstx39 | mipstx39el \ 294 | mn10200 | mn10300 \ 295 | moxie \ 296 | mt \ 297 | msp430 \ 298 | nds32 | nds32le | nds32be \ 299 | nios | nios2 | nios2eb | nios2el \ 300 | ns16k | ns32k \ 301 | open8 | or1k | or1knd | or32 \ 302 | pdp10 | pdp11 | pj | pjl \ 303 | powerpc | powerpc64 | powerpc64le | powerpcle \ 304 | pyramid \ 305 | riscv32 | riscv64 \ 306 | rl78 | rx \ 307 | score \ 308 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 309 | sh64 | sh64le \ 310 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 311 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 312 | spu \ 313 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 314 | ubicom32 \ 315 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 316 | visium \ 317 | we32k \ 318 | x86 | xc16x | xstormy16 | xtensa \ 319 | z8k | z80) 320 basic_machine=$basic_machine-unknown 321 ;; 322 c54x) 323 basic_machine=tic54x-unknown 324 ;; 325 c55x) 326 basic_machine=tic55x-unknown 327 ;; 328 c6x) 329 basic_machine=tic6x-unknown 645 # Here we handle the default manufacturer of certain CPU types. It is in 646 # some cases the only manufacturer, in others, it is the most popular. 647 w89k) 648 cpu=hppa1.1 649 vendor=winbond 650 ;; 651 op50n) 652 cpu=hppa1.1 653 vendor=oki 654 ;; 655 op60c) 656 cpu=hppa1.1 657 vendor=oki 658 ;; 659 ibm*) 660 cpu=i370 661 vendor=ibm 662 ;; 663 orion105) 664 cpu=clipper 665 vendor=highlevel 666 ;; 667 mac | mpw | mac-mpw) 668 cpu=m68k 669 vendor=apple 670 ;; 671 pmac | pmac-mpw) 672 cpu=powerpc 673 vendor=apple 674 ;; 675 676 # Recognize the various machine names and aliases which stand 677 # for a CPU type and a company and sometimes even an OS. 678 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 679 cpu=m68000 680 vendor=att 681 ;; 682 3b*) 683 cpu=we32k 684 vendor=att 685 ;; 686 bluegene*) 687 cpu=powerpc 688 vendor=ibm 689 basic_os=cnk 690 ;; 691 decsystem10* | dec10*) 692 cpu=pdp10 693 vendor=dec 694 basic_os=tops10 695 ;; 696 decsystem20* | dec20*) 697 cpu=pdp10 698 vendor=dec 699 basic_os=tops20 700 ;; 701 delta | 3300 | motorola-3300 | motorola-delta \ 702 | 3300-motorola | delta-motorola) 703 cpu=m68k 704 vendor=motorola 705 ;; 706 dpx2*) 707 cpu=m68k 708 vendor=bull 709 basic_os=sysv3 710 ;; 711 encore | umax | mmax) 712 cpu=ns32k 713 vendor=encore 714 ;; 715 elxsi) 716 cpu=elxsi 717 vendor=elxsi 718 basic_os=${basic_os:-bsd} 719 ;; 720 fx2800) 721 cpu=i860 722 vendor=alliant 723 ;; 724 genix) 725 cpu=ns32k 726 vendor=ns 727 ;; 728 h3050r* | hiux*) 729 cpu=hppa1.1 730 vendor=hitachi 731 basic_os=hiuxwe2 732 ;; 733 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 734 cpu=hppa1.0 735 vendor=hp 736 ;; 737 hp9k2[0-9][0-9] | hp9k31[0-9]) 738 cpu=m68000 739 vendor=hp 740 ;; 741 hp9k3[2-9][0-9]) 742 cpu=m68k 743 vendor=hp 744 ;; 745 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 746 cpu=hppa1.0 747 vendor=hp 748 ;; 749 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 750 cpu=hppa1.1 751 vendor=hp 752 ;; 753 hp9k78[0-9] | hp78[0-9]) 754 # FIXME: really hppa2.0-hp 755 cpu=hppa1.1 756 vendor=hp 757 ;; 758 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 759 # FIXME: really hppa2.0-hp 760 cpu=hppa1.1 761 vendor=hp 762 ;; 763 hp9k8[0-9][13679] | hp8[0-9][13679]) 764 cpu=hppa1.1 765 vendor=hp 766 ;; 767 hp9k8[0-9][0-9] | hp8[0-9][0-9]) 768 cpu=hppa1.0 769 vendor=hp 770 ;; 771 i*86v32) 772 cpu=$(echo "$1" | sed -e 's/86.*/86/') 773 vendor=pc 774 basic_os=sysv32 775 ;; 776 i*86v4*) 777 cpu=$(echo "$1" | sed -e 's/86.*/86/') 778 vendor=pc 779 basic_os=sysv4 780 ;; 781 i*86v) 782 cpu=$(echo "$1" | sed -e 's/86.*/86/') 783 vendor=pc 784 basic_os=sysv 785 ;; 786 i*86sol2) 787 cpu=$(echo "$1" | sed -e 's/86.*/86/') 788 vendor=pc 789 basic_os=solaris2 790 ;; 791 j90 | j90-cray) 792 cpu=j90 793 vendor=cray 794 basic_os=${basic_os:-unicos} 795 ;; 796 iris | iris4d) 797 cpu=mips 798 vendor=sgi 799 case $basic_os in 800 irix*) 801 ;; 802 *) 803 basic_os=irix4 804 ;; 805 esac 806 ;; 807 miniframe) 808 cpu=m68000 809 vendor=convergent 810 ;; 811 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) 812 cpu=m68k 813 vendor=atari 814 basic_os=mint 815 ;; 816 news-3600 | risc-news) 817 cpu=mips 818 vendor=sony 819 basic_os=newsos 820 ;; 821 next | m*-next) 822 cpu=m68k 823 vendor=next 824 case $basic_os in 825 openstep*) 826 ;; 827 nextstep*) 828 ;; 829 ns2*) 830 basic_os=nextstep2 831 ;; 832 *) 833 basic_os=nextstep3 834 ;; 835 esac 836 ;; 837 np1) 838 cpu=np1 839 vendor=gould 840 ;; 841 op50n-* | op60c-*) 842 cpu=hppa1.1 843 vendor=oki 844 basic_os=proelf 845 ;; 846 pa-hitachi) 847 cpu=hppa1.1 848 vendor=hitachi 849 basic_os=hiuxwe2 850 ;; 851 pbd) 852 cpu=sparc 853 vendor=tti 854 ;; 855 pbb) 856 cpu=m68k 857 vendor=tti 858 ;; 859 pc532) 860 cpu=ns32k 861 vendor=pc532 862 ;; 863 pn) 864 cpu=pn 865 vendor=gould 866 ;; 867 power) 868 cpu=power 869 vendor=ibm 870 ;; 871 ps2) 872 cpu=i386 873 vendor=ibm 874 ;; 875 rm[46]00) 876 cpu=mips 877 vendor=siemens 878 ;; 879 rtpc | rtpc-*) 880 cpu=romp 881 vendor=ibm 882 ;; 883 sde) 884 cpu=mipsisa32 885 vendor=sde 886 basic_os=${basic_os:-elf} 887 ;; 888 simso-wrs) 889 cpu=sparclite 890 vendor=wrs 891 basic_os=vxworks 892 ;; 893 tower | tower-32) 894 cpu=m68k 895 vendor=ncr 896 ;; 897 vpp*|vx|vx-*) 898 cpu=f301 899 vendor=fujitsu 900 ;; 901 w65) 902 cpu=w65 903 vendor=wdc 904 ;; 905 w89k-*) 906 cpu=hppa1.1 907 vendor=winbond 908 basic_os=proelf 909 ;; 910 none) 911 cpu=none 912 vendor=none 330 913 ;; 331 914 leon|leon[3-9]) 332 basic_machine=sparc-$basic_machine 333 ;; 334 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 335 basic_machine=$basic_machine-unknown 336 os=-none 337 ;; 338 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 339 ;; 340 ms1) 341 basic_machine=mt-unknown 342 ;; 343 344 strongarm | thumb | xscale) 345 basic_machine=arm-unknown 346 ;; 347 xgate) 348 basic_machine=$basic_machine-unknown 349 os=-none 350 ;; 351 xscaleeb) 352 basic_machine=armeb-unknown 353 ;; 354 355 xscaleel) 356 basic_machine=armel-unknown 357 ;; 358 915 cpu=sparc 916 vendor=$basic_machine 917 ;; 918 leon-*|leon[3-9]-*) 919 cpu=sparc 920 vendor=$(echo "$basic_machine" | sed 's/-.*//') 921 ;; 922 923 *-*) 924 # shellcheck disable=SC2162 925 IFS="-" read cpu vendor <<EOF 926 $basic_machine 927 EOF 928 ;; 359 929 # We use `pc' rather than `unknown' 360 930 # because (1) that's what they normally are, and 361 931 # (2) the word "unknown" tends to confuse beginning users. 362 932 i*86 | x86_64) 363 basic_machine=$basic_machine-pc 364 ;; 365 # Object if more than one company name word. 366 *-*-*) 367 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 368 exit 1 369 ;; 370 # Recognize the basic CPU types with company name. 371 580-* \ 372 | a29k-* \ 373 | aarch64-* | aarch64_be-* \ 374 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 375 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 376 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 377 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 378 | avr-* | avr32-* \ 379 | be32-* | be64-* \ 380 | bfin-* | bs2000-* \ 381 | c[123]* | c30-* | [cjt]90-* | c4x-* \ 382 | c8051-* | clipper-* | craynv-* | cydra-* \ 383 | d10v-* | d30v-* | dlx-* \ 384 | e2k-* | elxsi-* \ 385 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 386 | h8300-* | h8500-* \ 387 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 388 | hexagon-* \ 389 | i*86-* | i860-* | i960-* | ia64-* \ 390 | ip2k-* | iq2000-* \ 391 | k1om-* \ 392 | le32-* | le64-* \ 393 | lm32-* \ 394 | m32c-* | m32r-* | m32rle-* \ 395 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 396 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 397 | microblaze-* | microblazeel-* \ 398 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 399 | mips16-* \ 400 | mips64-* | mips64el-* \ 401 | mips64octeon-* | mips64octeonel-* \ 402 | mips64orion-* | mips64orionel-* \ 403 | mips64r5900-* | mips64r5900el-* \ 404 | mips64vr-* | mips64vrel-* \ 405 | mips64vr4100-* | mips64vr4100el-* \ 406 | mips64vr4300-* | mips64vr4300el-* \ 407 | mips64vr5000-* | mips64vr5000el-* \ 408 | mips64vr5900-* | mips64vr5900el-* \ 409 | mipsisa32-* | mipsisa32el-* \ 410 | mipsisa32r2-* | mipsisa32r2el-* \ 411 | mipsisa32r6-* | mipsisa32r6el-* \ 412 | mipsisa64-* | mipsisa64el-* \ 413 | mipsisa64r2-* | mipsisa64r2el-* \ 414 | mipsisa64r6-* | mipsisa64r6el-* \ 415 | mipsisa64sb1-* | mipsisa64sb1el-* \ 416 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 417 | mipsr5900-* | mipsr5900el-* \ 418 | mipstx39-* | mipstx39el-* \ 419 | mmix-* \ 420 | mt-* \ 421 | msp430-* \ 422 | nds32-* | nds32le-* | nds32be-* \ 423 | nios-* | nios2-* | nios2eb-* | nios2el-* \ 424 | none-* | np1-* | ns16k-* | ns32k-* \ 425 | open8-* \ 426 | or1k*-* \ 427 | orion-* \ 428 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 429 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 430 | pyramid-* \ 431 | rl78-* | romp-* | rs6000-* | rx-* \ 432 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 433 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 434 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 435 | sparclite-* \ 436 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 437 | tahoe-* \ 438 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 439 | tile*-* \ 440 | tron-* \ 441 | ubicom32-* \ 442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 443 | vax-* \ 444 | visium-* \ 445 | we32k-* \ 446 | x86-* | x86_64-* | xc16x-* | xps100-* \ 447 | xstormy16-* | xtensa*-* \ 448 | ymp-* \ 449 | z8k-* | z80-*) 450 ;; 451 # Recognize the basic CPU types without company name, with glob match. 452 xtensa*) 453 basic_machine=$basic_machine-unknown 454 ;; 455 # Recognize the various machine names and aliases which stand 456 # for a CPU type and a company and sometimes even an OS. 933 cpu=$basic_machine 934 vendor=pc 935 ;; 936 # These rules are duplicated from below for sake of the special case above; 937 # i.e. things that normalized to x86 arches should also default to "pc" 938 pc98) 939 cpu=i386 940 vendor=pc 941 ;; 942 x64 | amd64) 943 cpu=x86_64 944 vendor=pc 945 ;; 946 # Recognize the basic CPU types without company name. 947 *) 948 cpu=$basic_machine 949 vendor=unknown 950 ;; 951 esac 952 953 unset -v basic_machine 954 955 # Decode basic machines in the full and proper CPU-Company form. 956 case $cpu-$vendor in 957 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in 958 # some cases the only manufacturer, in others, it is the most popular. 959 craynv-unknown) 960 vendor=cray 961 basic_os=${basic_os:-unicosmp} 962 ;; 963 c90-unknown | c90-cray) 964 vendor=cray 965 basic_os=${Basic_os:-unicos} 966 ;; 967 fx80-unknown) 968 vendor=alliant 969 ;; 970 romp-unknown) 971 vendor=ibm 972 ;; 973 mmix-unknown) 974 vendor=knuth 975 ;; 976 microblaze-unknown | microblazeel-unknown) 977 vendor=xilinx 978 ;; 979 rs6000-unknown) 980 vendor=ibm 981 ;; 982 vax-unknown) 983 vendor=dec 984 ;; 985 pdp11-unknown) 986 vendor=dec 987 ;; 988 we32k-unknown) 989 vendor=att 990 ;; 991 cydra-unknown) 992 vendor=cydrome 993 ;; 994 i370-ibm*) 995 vendor=ibm 996 ;; 997 orion-unknown) 998 vendor=highlevel 999 ;; 1000 xps-unknown | xps100-unknown) 1001 cpu=xps100 1002 vendor=honeywell 1003 ;; 1004 1005 # Here we normalize CPU types with a missing or matching vendor 1006 dpx20-unknown | dpx20-bull) 1007 cpu=rs6000 1008 vendor=bull 1009 basic_os=${basic_os:-bosx} 1010 ;; 1011 1012 # Here we normalize CPU types irrespective of the vendor 1013 amd64-*) 1014 cpu=x86_64 1015 ;; 1016 blackfin-*) 1017 cpu=bfin 1018 basic_os=linux 1019 ;; 1020 c54x-*) 1021 cpu=tic54x 1022 ;; 1023 c55x-*) 1024 cpu=tic55x 1025 ;; 1026 c6x-*) 1027 cpu=tic6x 1028 ;; 1029 e500v[12]-*) 1030 cpu=powerpc 1031 basic_os=${basic_os}"spe" 1032 ;; 1033 mips3*-*) 1034 cpu=mips64 1035 ;; 1036 ms1-*) 1037 cpu=mt 1038 ;; 1039 m68knommu-*) 1040 cpu=m68k 1041 basic_os=linux 1042 ;; 1043 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) 1044 cpu=s12z 1045 ;; 1046 openrisc-*) 1047 cpu=or32 1048 ;; 1049 parisc-*) 1050 cpu=hppa 1051 basic_os=linux 1052 ;; 1053 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1054 cpu=i586 1055 ;; 1056 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) 1057 cpu=i686 1058 ;; 1059 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1060 cpu=i686 1061 ;; 1062 pentium4-*) 1063 cpu=i786 1064 ;; 1065 pc98-*) 1066 cpu=i386 1067 ;; 1068 ppc-* | ppcbe-*) 1069 cpu=powerpc 1070 ;; 1071 ppcle-* | powerpclittle-*) 1072 cpu=powerpcle 1073 ;; 1074 ppc64-*) 1075 cpu=powerpc64 1076 ;; 1077 ppc64le-* | powerpc64little-*) 1078 cpu=powerpc64le 1079 ;; 1080 sb1-*) 1081 cpu=mipsisa64sb1 1082 ;; 1083 sb1el-*) 1084 cpu=mipsisa64sb1el 1085 ;; 1086 sh5e[lb]-*) 1087 cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/') 1088 ;; 1089 spur-*) 1090 cpu=spur 1091 ;; 1092 strongarm-* | thumb-*) 1093 cpu=arm 1094 ;; 1095 tx39-*) 1096 cpu=mipstx39 1097 ;; 1098 tx39el-*) 1099 cpu=mipstx39el 1100 ;; 1101 x64-*) 1102 cpu=x86_64 1103 ;; 1104 xscale-* | xscalee[bl]-*) 1105 cpu=$(echo "$cpu" | sed 's/^xscale/arm/') 1106 ;; 1107 arm64-*) 1108 cpu=aarch64 1109 ;; 1110 1111 # Recognize the canonical CPU Types that limit and/or modify the 1112 # company names they are paired with. 1113 cr16-*) 1114 basic_os=${basic_os:-elf} 1115 ;; 1116 crisv32-* | etraxfs*-*) 1117 cpu=crisv32 1118 vendor=axis 1119 ;; 1120 cris-* | etrax*-*) 1121 cpu=cris 1122 vendor=axis 1123 ;; 1124 crx-*) 1125 basic_os=${basic_os:-elf} 1126 ;; 1127 neo-tandem) 1128 cpu=neo 1129 vendor=tandem 1130 ;; 1131 nse-tandem) 1132 cpu=nse 1133 vendor=tandem 1134 ;; 1135 nsr-tandem) 1136 cpu=nsr 1137 vendor=tandem 1138 ;; 1139 nsv-tandem) 1140 cpu=nsv 1141 vendor=tandem 1142 ;; 1143 nsx-tandem) 1144 cpu=nsx 1145 vendor=tandem 1146 ;; 1147 mipsallegrexel-sony) 1148 cpu=mipsallegrexel 1149 vendor=sony 1150 ;; 1151 tile*-*) 1152 basic_os=${basic_os:-linux-gnu} 1153 ;; 1154 1155 *) 1156 # Recognize the canonical CPU types that are allowed with any 1157 # company name. 1158 case $cpu in 1159 1750a | 580 \ 1160 | a29k \ 1161 | aarch64 | aarch64_be \ 1162 | abacus \ 1163 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ 1164 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ 1165 | alphapca5[67] | alpha64pca5[67] \ 1166 | am33_2.0 \ 1167 | amdgcn \ 1168 | arc | arceb | arc64 \ 1169 | arm | arm[lb]e | arme[lb] | armv* \ 1170 | avr | avr32 \ 1171 | asmjs \ 1172 | ba \ 1173 | be32 | be64 \ 1174 | bfin | bpf | bs2000 \ 1175 | c[123]* | c30 | [cjt]90 | c4x \ 1176 | c8051 | clipper | craynv | csky | cydra \ 1177 | d10v | d30v | dlx | dsp16xx \ 1178 | e2k | elxsi | epiphany \ 1179 | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ 1180 | h8300 | h8500 \ 1181 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 1182 | hexagon \ 1183 | i370 | i*86 | i860 | i960 | ia16 | ia64 \ 1184 | ip2k | iq2000 \ 1185 | k1om \ 1186 | le32 | le64 \ 1187 | lm32 \ 1188 | loongarch32 | loongarch64 | loongarchx32 \ 1189 | m32c | m32r | m32rle \ 1190 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ 1191 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ 1192 | m88110 | m88k | maxq | mb | mcore | mep | metag \ 1193 | microblaze | microblazeel \ 1194 | mips | mipsbe | mipseb | mipsel | mipsle \ 1195 | mips16 \ 1196 | mips64 | mips64eb | mips64el \ 1197 | mips64octeon | mips64octeonel \ 1198 | mips64orion | mips64orionel \ 1199 | mips64r5900 | mips64r5900el \ 1200 | mips64vr | mips64vrel \ 1201 | mips64vr4100 | mips64vr4100el \ 1202 | mips64vr4300 | mips64vr4300el \ 1203 | mips64vr5000 | mips64vr5000el \ 1204 | mips64vr5900 | mips64vr5900el \ 1205 | mipsisa32 | mipsisa32el \ 1206 | mipsisa32r2 | mipsisa32r2el \ 1207 | mipsisa32r3 | mipsisa32r3el \ 1208 | mipsisa32r5 | mipsisa32r5el \ 1209 | mipsisa32r6 | mipsisa32r6el \ 1210 | mipsisa64 | mipsisa64el \ 1211 | mipsisa64r2 | mipsisa64r2el \ 1212 | mipsisa64r3 | mipsisa64r3el \ 1213 | mipsisa64r5 | mipsisa64r5el \ 1214 | mipsisa64r6 | mipsisa64r6el \ 1215 | mipsisa64sb1 | mipsisa64sb1el \ 1216 | mipsisa64sr71k | mipsisa64sr71kel \ 1217 | mipsr5900 | mipsr5900el \ 1218 | mipstx39 | mipstx39el \ 1219 | mmix \ 1220 | mn10200 | mn10300 \ 1221 | moxie \ 1222 | mt \ 1223 | msp430 \ 1224 | nds32 | nds32le | nds32be \ 1225 | nfp \ 1226 | nios | nios2 | nios2eb | nios2el \ 1227 | none | np1 | ns16k | ns32k | nvptx \ 1228 | open8 \ 1229 | or1k* \ 1230 | or32 \ 1231 | orion \ 1232 | picochip \ 1233 | pdp10 | pdp11 | pj | pjl | pn | power \ 1234 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ 1235 | pru \ 1236 | pyramid \ 1237 | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ 1238 | rl78 | romp | rs6000 | rx \ 1239 | s390 | s390x \ 1240 | score \ 1241 | sh | shl \ 1242 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ 1243 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ 1244 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ 1245 | sparclite \ 1246 | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ 1247 | spu \ 1248 | tahoe \ 1249 | thumbv7* \ 1250 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ 1251 | tron \ 1252 | ubicom32 \ 1253 | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ 1254 | vax \ 1255 | visium \ 1256 | w65 \ 1257 | wasm32 | wasm64 \ 1258 | we32k \ 1259 | x86 | x86_64 | xc16x | xgate | xps100 \ 1260 | xstormy16 | xtensa* \ 1261 | ymp \ 1262 | z8k | z80) 1263 ;; 1264 1265 *) 1266 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 1267 exit 1 1268 ;; 1269 esac 1270 ;; 1271 esac 1272 1273 # Here we canonicalize certain aliases for manufacturers. 1274 case $vendor in 1275 digital*) 1276 vendor=dec 1277 ;; 1278 commodore*) 1279 vendor=cbm 1280 ;; 1281 *) 1282 ;; 1283 esac 1284 1285 # Decode manufacturer-specific aliases for certain operating systems. 1286 1287 if test x$basic_os != x 1288 then 1289 1290 # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just 1291 # set os. 1292 case $basic_os in 1293 gnu/linux*) 1294 kernel=linux 1295 os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') 1296 ;; 1297 os2-emx) 1298 kernel=os2 1299 os=$(echo $basic_os | sed -e 's|os2-emx|emx|') 1300 ;; 1301 nto-qnx*) 1302 kernel=nto 1303 os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') 1304 ;; 1305 *-*) 1306 # shellcheck disable=SC2162 1307 IFS="-" read kernel os <<EOF 1308 $basic_os 1309 EOF 1310 ;; 1311 # Default OS when just kernel was specified 1312 nto*) 1313 kernel=nto 1314 os=$(echo $basic_os | sed -e 's|nto|qnx|') 1315 ;; 1316 linux*) 1317 kernel=linux 1318 os=$(echo $basic_os | sed -e 's|linux|gnu|') 1319 ;; 1320 *) 1321 kernel= 1322 os=$basic_os 1323 ;; 1324 esac 1325 1326 # Now, normalize the OS (knowing we just have one component, it's not a kernel, 1327 # etc.) 1328 case $os in 1329 # First match some system type aliases that might get confused 1330 # with valid system types. 1331 # solaris* is a basic system type, with this one exception. 1332 auroraux) 1333 os=auroraux 1334 ;; 1335 bluegene*) 1336 os=cnk 1337 ;; 1338 solaris1 | solaris1.*) 1339 os=$(echo $os | sed -e 's|solaris1|sunos4|') 1340 ;; 1341 solaris) 1342 os=solaris2 1343 ;; 1344 unixware*) 1345 os=sysv4.2uw 1346 ;; 1347 # es1800 is here to avoid being matched by es* (a different OS) 1348 es1800*) 1349 os=ose 1350 ;; 1351 # Some version numbers need modification 1352 chorusos*) 1353 os=chorusos 1354 ;; 1355 isc) 1356 os=isc2.2 1357 ;; 1358 sco6) 1359 os=sco5v6 1360 ;; 1361 sco5) 1362 os=sco3.2v5 1363 ;; 1364 sco4) 1365 os=sco3.2v4 1366 ;; 1367 sco3.2.[4-9]*) 1368 os=$(echo $os | sed -e 's/sco3.2./sco3.2v/') 1369 ;; 1370 sco*v* | scout) 1371 # Don't match below 1372 ;; 1373 sco*) 1374 os=sco3.2v2 1375 ;; 1376 psos*) 1377 os=psos 1378 ;; 1379 qnx*) 1380 os=qnx 1381 ;; 1382 hiux*) 1383 os=hiuxwe2 1384 ;; 1385 lynx*178) 1386 os=lynxos178 1387 ;; 1388 lynx*5) 1389 os=lynxos5 1390 ;; 1391 lynxos*) 1392 # don't get caught up in next wildcard 1393 ;; 1394 lynx*) 1395 os=lynxos 1396 ;; 1397 mac[0-9]*) 1398 os=$(echo "$os" | sed -e 's|mac|macos|') 1399 ;; 1400 opened*) 1401 os=openedition 1402 ;; 1403 os400*) 1404 os=os400 1405 ;; 1406 sunos5*) 1407 os=$(echo "$os" | sed -e 's|sunos5|solaris2|') 1408 ;; 1409 sunos6*) 1410 os=$(echo "$os" | sed -e 's|sunos6|solaris3|') 1411 ;; 1412 wince*) 1413 os=wince 1414 ;; 1415 utek*) 1416 os=bsd 1417 ;; 1418 dynix*) 1419 os=bsd 1420 ;; 1421 acis*) 1422 os=aos 1423 ;; 1424 atheos*) 1425 os=atheos 1426 ;; 1427 syllable*) 1428 os=syllable 1429 ;; 457 1430 386bsd) 458 basic_machine=i386-unknown 459 os=-bsd 460 ;; 461 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 462 basic_machine=m68000-att 463 ;; 464 3b*) 465 basic_machine=we32k-att 466 ;; 467 a29khif) 468 basic_machine=a29k-amd 469 os=-udi 470 ;; 471 abacus) 472 basic_machine=abacus-unknown 473 ;; 474 adobe68k) 475 basic_machine=m68010-adobe 476 os=-scout 477 ;; 478 alliant | fx80) 479 basic_machine=fx80-alliant 480 ;; 481 altos | altos3068) 482 basic_machine=m68k-altos 483 ;; 484 am29k) 485 basic_machine=a29k-none 486 os=-bsd 487 ;; 488 amd64) 489 basic_machine=x86_64-pc 490 ;; 491 amd64-*) 492 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 493 ;; 494 amdahl) 495 basic_machine=580-amdahl 496 os=-sysv 497 ;; 498 amiga | amiga-*) 499 basic_machine=m68k-unknown 500 ;; 501 amigaos | amigados) 502 basic_machine=m68k-unknown 503 os=-amigaos 504 ;; 505 amigaunix | amix) 506 basic_machine=m68k-unknown 507 os=-sysv4 508 ;; 509 apollo68) 510 basic_machine=m68k-apollo 511 os=-sysv 512 ;; 513 apollo68bsd) 514 basic_machine=m68k-apollo 515 os=-bsd 516 ;; 517 aros) 518 basic_machine=i386-pc 519 os=-aros 520 ;; 521 asmjs) 522 basic_machine=asmjs-unknown 523 ;; 524 aux) 525 basic_machine=m68k-apple 526 os=-aux 527 ;; 528 balance) 529 basic_machine=ns32k-sequent 530 os=-dynix 531 ;; 532 blackfin) 533 basic_machine=bfin-unknown 534 os=-linux 535 ;; 536 blackfin-*) 537 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 538 os=-linux 539 ;; 540 bluegene*) 541 basic_machine=powerpc-ibm 542 os=-cnk 543 ;; 544 c54x-*) 545 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 546 ;; 547 c55x-*) 548 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 549 ;; 550 c6x-*) 551 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 552 ;; 553 c90) 554 basic_machine=c90-cray 555 os=-unicos 556 ;; 557 cegcc) 558 basic_machine=arm-unknown 559 os=-cegcc 560 ;; 561 convex-c1) 562 basic_machine=c1-convex 563 os=-bsd 564 ;; 565 convex-c2) 566 basic_machine=c2-convex 567 os=-bsd 568 ;; 569 convex-c32) 570 basic_machine=c32-convex 571 os=-bsd 572 ;; 573 convex-c34) 574 basic_machine=c34-convex 575 os=-bsd 576 ;; 577 convex-c38) 578 basic_machine=c38-convex 579 os=-bsd 580 ;; 581 cray | j90) 582 basic_machine=j90-cray 583 os=-unicos 584 ;; 585 craynv) 586 basic_machine=craynv-cray 587 os=-unicosmp 588 ;; 589 cr16 | cr16-*) 590 basic_machine=cr16-unknown 591 os=-elf 592 ;; 593 crds | unos) 594 basic_machine=m68k-crds 595 ;; 596 crisv32 | crisv32-* | etraxfs*) 597 basic_machine=crisv32-axis 598 ;; 599 cris | cris-* | etrax*) 600 basic_machine=cris-axis 601 ;; 602 crx) 603 basic_machine=crx-unknown 604 os=-elf 605 ;; 606 da30 | da30-*) 607 basic_machine=m68k-da30 608 ;; 609 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 610 basic_machine=mips-dec 611 ;; 612 decsystem10* | dec10*) 613 basic_machine=pdp10-dec 614 os=-tops10 615 ;; 616 decsystem20* | dec20*) 617 basic_machine=pdp10-dec 618 os=-tops20 619 ;; 620 delta | 3300 | motorola-3300 | motorola-delta \ 621 | 3300-motorola | delta-motorola) 622 basic_machine=m68k-motorola 623 ;; 624 delta88) 625 basic_machine=m88k-motorola 626 os=-sysv3 627 ;; 628 dicos) 629 basic_machine=i686-pc 630 os=-dicos 631 ;; 632 djgpp) 633 basic_machine=i586-pc 634 os=-msdosdjgpp 635 ;; 636 dpx20 | dpx20-*) 637 basic_machine=rs6000-bull 638 os=-bosx 639 ;; 640 dpx2* | dpx2*-bull) 641 basic_machine=m68k-bull 642 os=-sysv3 643 ;; 644 ebmon29k) 645 basic_machine=a29k-amd 646 os=-ebmon 647 ;; 648 elxsi) 649 basic_machine=elxsi-elxsi 650 os=-bsd 651 ;; 652 encore | umax | mmax) 653 basic_machine=ns32k-encore 654 ;; 655 es1800 | OSE68k | ose68k | ose | OSE) 656 basic_machine=m68k-ericsson 657 os=-ose 658 ;; 659 fx2800) 660 basic_machine=i860-alliant 661 ;; 662 genix) 663 basic_machine=ns32k-ns 664 ;; 665 gmicro) 666 basic_machine=tron-gmicro 667 os=-sysv 668 ;; 669 go32) 670 basic_machine=i386-pc 671 os=-go32 672 ;; 673 h3050r* | hiux*) 674 basic_machine=hppa1.1-hitachi 675 os=-hiuxwe2 676 ;; 677 h8300hms) 678 basic_machine=h8300-hitachi 679 os=-hms 680 ;; 681 h8300xray) 682 basic_machine=h8300-hitachi 683 os=-xray 684 ;; 685 h8500hms) 686 basic_machine=h8500-hitachi 687 os=-hms 688 ;; 689 harris) 690 basic_machine=m88k-harris 691 os=-sysv3 692 ;; 693 hp300-*) 694 basic_machine=m68k-hp 695 ;; 696 hp300bsd) 697 basic_machine=m68k-hp 698 os=-bsd 699 ;; 700 hp300hpux) 701 basic_machine=m68k-hp 702 os=-hpux 703 ;; 704 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 705 basic_machine=hppa1.0-hp 706 ;; 707 hp9k2[0-9][0-9] | hp9k31[0-9]) 708 basic_machine=m68000-hp 709 ;; 710 hp9k3[2-9][0-9]) 711 basic_machine=m68k-hp 712 ;; 713 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 714 basic_machine=hppa1.0-hp 715 ;; 716 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 717 basic_machine=hppa1.1-hp 718 ;; 719 hp9k78[0-9] | hp78[0-9]) 720 # FIXME: really hppa2.0-hp 721 basic_machine=hppa1.1-hp 722 ;; 723 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 724 # FIXME: really hppa2.0-hp 725 basic_machine=hppa1.1-hp 726 ;; 727 hp9k8[0-9][13679] | hp8[0-9][13679]) 728 basic_machine=hppa1.1-hp 729 ;; 730 hp9k8[0-9][0-9] | hp8[0-9][0-9]) 731 basic_machine=hppa1.0-hp 732 ;; 733 hppa-next) 734 os=-nextstep3 735 ;; 736 hppaosf) 737 basic_machine=hppa1.1-hp 738 os=-osf 739 ;; 740 hppro) 741 basic_machine=hppa1.1-hp 742 os=-proelf 743 ;; 744 i370-ibm* | ibm*) 745 basic_machine=i370-ibm 746 ;; 747 i*86v32) 748 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 749 os=-sysv32 750 ;; 751 i*86v4*) 752 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 753 os=-sysv4 754 ;; 755 i*86v) 756 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 757 os=-sysv 758 ;; 759 i*86sol2) 760 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 761 os=-solaris2 762 ;; 763 i386mach) 764 basic_machine=i386-mach 765 os=-mach 766 ;; 767 i386-vsta | vsta) 768 basic_machine=i386-unknown 769 os=-vsta 770 ;; 771 iris | iris4d) 772 basic_machine=mips-sgi 773 case $os in 774 -irix*) 1431 os=bsd 1432 ;; 1433 ctix* | uts*) 1434 os=sysv 1435 ;; 1436 nova*) 1437 os=rtmk-nova 1438 ;; 1439 ns2) 1440 os=nextstep2 1441 ;; 1442 # Preserve the version number of sinix5. 1443 sinix5.*) 1444 os=$(echo $os | sed -e 's|sinix|sysv|') 1445 ;; 1446 sinix*) 1447 os=sysv4 1448 ;; 1449 tpf*) 1450 os=tpf 1451 ;; 1452 triton*) 1453 os=sysv3 1454 ;; 1455 oss*) 1456 os=sysv3 1457 ;; 1458 svr4*) 1459 os=sysv4 1460 ;; 1461 svr3) 1462 os=sysv3 1463 ;; 1464 sysvr4) 1465 os=sysv4 1466 ;; 1467 ose*) 1468 os=ose 1469 ;; 1470 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) 1471 os=mint 1472 ;; 1473 dicos*) 1474 os=dicos 1475 ;; 1476 pikeos*) 1477 # Until real need of OS specific support for 1478 # particular features comes up, bare metal 1479 # configurations are quite functional. 1480 case $cpu in 1481 arm*) 1482 os=eabi 775 1483 ;; 776 1484 *) 777 os= -irix41485 os=elf 778 1486 ;; 779 1487 esac 780 1488 ;; 781 isi68 | isi)782 basic_machine=m68k-isi783 os=-sysv784 ;;785 leon-*|leon[3-9]-*)786 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`787 ;;788 m68knommu)789 basic_machine=m68k-unknown790 os=-linux791 ;;792 m68knommu-*)793 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`794 os=-linux795 ;;796 m88k-omron*)797 basic_machine=m88k-omron798 ;;799 magnum | m3230)800 basic_machine=mips-mips801 os=-sysv802 ;;803 merlin)804 basic_machine=ns32k-utek805 os=-sysv806 ;;807 microblaze*)808 basic_machine=microblaze-xilinx809 ;;810 mingw64)811 basic_machine=x86_64-pc812 os=-mingw64813 ;;814 mingw32)815 basic_machine=i686-pc816 os=-mingw32817 ;;818 mingw32ce)819 basic_machine=arm-unknown820 os=-mingw32ce821 ;;822 miniframe)823 basic_machine=m68000-convergent824 ;;825 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)826 basic_machine=m68k-atari827 os=-mint828 ;;829 mips3*-*)830 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`831 ;;832 mips3*)833 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown834 ;;835 monitor)836 basic_machine=m68k-rom68k837 os=-coff838 ;;839 morphos)840 basic_machine=powerpc-unknown841 os=-morphos842 ;;843 moxiebox)844 basic_machine=moxie-unknown845 os=-moxiebox846 ;;847 msdos)848 basic_machine=i386-pc849 os=-msdos850 ;;851 ms1-*)852 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`853 ;;854 msys)855 basic_machine=i686-pc856 os=-msys857 ;;858 mvs)859 basic_machine=i370-ibm860 os=-mvs861 ;;862 nacl)863 basic_machine=le32-unknown864 os=-nacl865 ;;866 ncr3000)867 basic_machine=i486-ncr868 os=-sysv4869 ;;870 netbsd386)871 basic_machine=i386-unknown872 os=-netbsd873 ;;874 netwinder)875 basic_machine=armv4l-rebel876 os=-linux877 ;;878 news | news700 | news800 | news900)879 basic_machine=m68k-sony880 os=-newsos881 ;;882 news1000)883 basic_machine=m68030-sony884 os=-newsos885 ;;886 news-3600 | risc-news)887 basic_machine=mips-sony888 os=-newsos889 ;;890 necv70)891 basic_machine=v70-nec892 os=-sysv893 ;;894 next | m*-next )895 basic_machine=m68k-next896 case $os in897 -nextstep* )898 ;;899 -ns2*)900 os=-nextstep2901 ;;902 *)903 os=-nextstep3904 ;;905 esac906 ;;907 nh3000)908 basic_machine=m68k-harris909 os=-cxux910 ;;911 nh[45]000)912 basic_machine=m88k-harris913 os=-cxux914 ;;915 nindy960)916 basic_machine=i960-intel917 os=-nindy918 ;;919 mon960)920 basic_machine=i960-intel921 os=-mon960922 ;;923 nonstopux)924 basic_machine=mips-compaq925 os=-nonstopux926 ;;927 np1)928 basic_machine=np1-gould929 ;;930 neo-tandem)931 basic_machine=neo-tandem932 ;;933 nse-tandem)934 basic_machine=nse-tandem935 ;;936 nsr-tandem)937 basic_machine=nsr-tandem938 ;;939 op50n-* | op60c-*)940 basic_machine=hppa1.1-oki941 os=-proelf942 ;;943 openrisc | openrisc-*)944 basic_machine=or32-unknown945 ;;946 os400)947 basic_machine=powerpc-ibm948 os=-os400949 ;;950 OSE68000 | ose68000)951 basic_machine=m68000-ericsson952 os=-ose953 ;;954 os68k)955 basic_machine=m68k-none956 os=-os68k957 ;;958 pa-hitachi)959 basic_machine=hppa1.1-hitachi960 os=-hiuxwe2961 ;;962 paragon)963 basic_machine=i860-intel964 os=-osf965 ;;966 parisc)967 basic_machine=hppa-unknown968 os=-linux969 ;;970 parisc-*)971 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`972 os=-linux973 ;;974 pbd)975 basic_machine=sparc-tti976 ;;977 pbb)978 basic_machine=m68k-tti979 ;;980 pc532 | pc532-*)981 basic_machine=ns32k-pc532982 ;;983 pc98)984 basic_machine=i386-pc985 ;;986 pc98-*)987 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`988 ;;989 pentium | p5 | k5 | k6 | nexgen | viac3)990 basic_machine=i586-pc991 ;;992 pentiumpro | p6 | 6x86 | athlon | athlon_*)993 basic_machine=i686-pc994 ;;995 pentiumii | pentium2 | pentiumiii | pentium3)996 basic_machine=i686-pc997 ;;998 pentium4)999 basic_machine=i786-pc1000 ;;1001 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)1002 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`1003 ;;1004 pentiumpro-* | p6-* | 6x86-* | athlon-*)1005 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`1006 ;;1007 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)1008 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`1009 ;;1010 pentium4-*)1011 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`1012 ;;1013 pn)1014 basic_machine=pn-gould1015 ;;1016 power) basic_machine=power-ibm1017 ;;1018 ppc | ppcbe) basic_machine=powerpc-unknown1019 ;;1020 ppc-* | ppcbe-*)1021 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`1022 ;;1023 ppcle | powerpclittle | ppc-le | powerpc-little)1024 basic_machine=powerpcle-unknown1025 ;;1026 ppcle-* | powerpclittle-*)1027 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`1028 ;;1029 ppc64) basic_machine=powerpc64-unknown1030 ;;1031 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`1032 ;;1033 ppc64le | powerpc64little | ppc64-le | powerpc64-little)1034 basic_machine=powerpc64le-unknown1035 ;;1036 ppc64le-* | powerpc64little-*)1037 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`1038 ;;1039 ps2)1040 basic_machine=i386-ibm1041 ;;1042 pw32)1043 basic_machine=i586-unknown1044 os=-pw321045 ;;1046 rdos | rdos64)1047 basic_machine=x86_64-pc1048 os=-rdos1049 ;;1050 rdos32)1051 basic_machine=i386-pc1052 os=-rdos1053 ;;1054 rom68k)1055 basic_machine=m68k-rom68k1056 os=-coff1057 ;;1058 rm[46]00)1059 basic_machine=mips-siemens1060 ;;1061 rtpc | rtpc-*)1062 basic_machine=romp-ibm1063 ;;1064 s390 | s390-*)1065 basic_machine=s390-ibm1066 ;;1067 s390x | s390x-*)1068 basic_machine=s390x-ibm1069 ;;1070 sa29200)1071 basic_machine=a29k-amd1072 os=-udi1073 ;;1074 sb1)1075 basic_machine=mipsisa64sb1-unknown1076 ;;1077 sb1el)1078 basic_machine=mipsisa64sb1el-unknown1079 ;;1080 sde)1081 basic_machine=mipsisa32-sde1082 os=-elf1083 ;;1084 sei)1085 basic_machine=mips-sei1086 os=-seiux1087 ;;1088 sequent)1089 basic_machine=i386-sequent1090 ;;1091 sh)1092 basic_machine=sh-hitachi1093 os=-hms1094 ;;1095 sh5el)1096 basic_machine=sh5le-unknown1097 ;;1098 sh64)1099 basic_machine=sh64-unknown1100 ;;1101 sparclite-wrs | simso-wrs)1102 basic_machine=sparclite-wrs1103 os=-vxworks1104 ;;1105 sps7)1106 basic_machine=m68k-bull1107 os=-sysv21108 ;;1109 spur)1110 basic_machine=spur-unknown1111 ;;1112 st2000)1113 basic_machine=m68k-tandem1114 ;;1115 stratus)1116 basic_machine=i860-stratus1117 os=-sysv41118 ;;1119 strongarm-* | thumb-*)1120 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`1121 ;;1122 sun2)1123 basic_machine=m68000-sun1124 ;;1125 sun2os3)1126 basic_machine=m68000-sun1127 os=-sunos31128 ;;1129 sun2os4)1130 basic_machine=m68000-sun1131 os=-sunos41132 ;;1133 sun3os3)1134 basic_machine=m68k-sun1135 os=-sunos31136 ;;1137 sun3os4)1138 basic_machine=m68k-sun1139 os=-sunos41140 ;;1141 sun4os3)1142 basic_machine=sparc-sun1143 os=-sunos31144 ;;1145 sun4os4)1146 basic_machine=sparc-sun1147 os=-sunos41148 ;;1149 sun4sol2)1150 basic_machine=sparc-sun1151 os=-solaris21152 ;;1153 sun3 | sun3-*)1154 basic_machine=m68k-sun1155 ;;1156 sun4)1157 basic_machine=sparc-sun1158 ;;1159 sun386 | sun386i | roadrunner)1160 basic_machine=i386-sun1161 ;;1162 sv1)1163 basic_machine=sv1-cray1164 os=-unicos1165 ;;1166 symmetry)1167 basic_machine=i386-sequent1168 os=-dynix1169 ;;1170 t3e)1171 basic_machine=alphaev5-cray1172 os=-unicos1173 ;;1174 t90)1175 basic_machine=t90-cray1176 os=-unicos1177 ;;1178 tile*)1179 basic_machine=$basic_machine-unknown1180 os=-linux-gnu1181 ;;1182 tx39)1183 basic_machine=mipstx39-unknown1184 ;;1185 tx39el)1186 basic_machine=mipstx39el-unknown1187 ;;1188 toad1)1189 basic_machine=pdp10-xkl1190 os=-tops201191 ;;1192 tower | tower-32)1193 basic_machine=m68k-ncr1194 ;;1195 tpf)1196 basic_machine=s390x-ibm1197 os=-tpf1198 ;;1199 udi29k)1200 basic_machine=a29k-amd1201 os=-udi1202 ;;1203 ultra3)1204 basic_machine=a29k-nyu1205 os=-sym11206 ;;1207 v810 | necv810)1208 basic_machine=v810-nec1209 os=-none1210 ;;1211 vaxv)1212 basic_machine=vax-dec1213 os=-sysv1214 ;;1215 vms)1216 basic_machine=vax-dec1217 os=-vms1218 ;;1219 vpp*|vx|vx-*)1220 basic_machine=f301-fujitsu1221 ;;1222 vxworks960)1223 basic_machine=i960-wrs1224 os=-vxworks1225 ;;1226 vxworks68)1227 basic_machine=m68k-wrs1228 os=-vxworks1229 ;;1230 vxworks29k)1231 basic_machine=a29k-wrs1232 os=-vxworks1233 ;;1234 w65*)1235 basic_machine=w65-wdc1236 os=-none1237 ;;1238 w89k-*)1239 basic_machine=hppa1.1-winbond1240 os=-proelf1241 ;;1242 xbox)1243 basic_machine=i686-pc1244 os=-mingw321245 ;;1246 xps | xps100)1247 basic_machine=xps100-honeywell1248 ;;1249 xscale-* | xscalee[bl]-*)1250 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`1251 ;;1252 ymp)1253 basic_machine=ymp-cray1254 os=-unicos1255 ;;1256 z8k-*-coff)1257 basic_machine=z8k-unknown1258 os=-sim1259 ;;1260 z80-*-coff)1261 basic_machine=z80-unknown1262 os=-sim1263 ;;1264 none)1265 basic_machine=none-none1266 os=-none1267 ;;1268 1269 # Here we handle the default manufacturer of certain CPU types. It is in1270 # some cases the only manufacturer, in others, it is the most popular.1271 w89k)1272 basic_machine=hppa1.1-winbond1273 ;;1274 op50n)1275 basic_machine=hppa1.1-oki1276 ;;1277 op60c)1278 basic_machine=hppa1.1-oki1279 ;;1280 romp)1281 basic_machine=romp-ibm1282 ;;1283 mmix)1284 basic_machine=mmix-knuth1285 ;;1286 rs6000)1287 basic_machine=rs6000-ibm1288 ;;1289 vax)1290 basic_machine=vax-dec1291 ;;1292 pdp10)1293 # there are many clones, so DEC is not a safe bet1294 basic_machine=pdp10-unknown1295 ;;1296 pdp11)1297 basic_machine=pdp11-dec1298 ;;1299 we32k)1300 basic_machine=we32k-att1301 ;;1302 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)1303 basic_machine=sh-unknown1304 ;;1305 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)1306 basic_machine=sparc-sun1307 ;;1308 cydra)1309 basic_machine=cydra-cydrome1310 ;;1311 orion)1312 basic_machine=orion-highlevel1313 ;;1314 orion105)1315 basic_machine=clipper-highlevel1316 ;;1317 mac | mpw | mac-mpw)1318 basic_machine=m68k-apple1319 ;;1320 pmac | pmac-mpw)1321 basic_machine=powerpc-apple1322 ;;1323 *-unknown)1324 # Make sure to match an already-canonicalized machine name.1325 ;;1326 1489 *) 1327 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1328 exit 1 1490 # No normalization, but not necessarily accepted, that comes below. 1329 1491 ;; 1330 1492 esac 1331 1493 1332 # Here we canonicalize certain aliases for manufacturers.1333 case $basic_machine in1334 *-digital*)1335 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`1336 ;;1337 *-commodore*)1338 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`1339 ;;1340 *)1341 ;;1342 esac1343 1344 # Decode manufacturer-specific aliases for certain operating systems.1345 1346 if [ x"$os" != x"" ]1347 then1348 case $os in1349 # First match some system type aliases1350 # that might get confused with valid system types.1351 # -solaris* is a basic system type, with this one exception.1352 -auroraux)1353 os=-auroraux1354 ;;1355 -solaris1 | -solaris1.*)1356 os=`echo $os | sed -e 's|solaris1|sunos4|'`1357 ;;1358 -solaris)1359 os=-solaris21360 ;;1361 -svr4*)1362 os=-sysv41363 ;;1364 -unixware*)1365 os=-sysv4.2uw1366 ;;1367 -gnu/linux*)1368 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`1369 ;;1370 # First accept the basic system types.1371 # The portable systems comes first.1372 # Each alternative MUST END IN A *, to match a version number.1373 # -sysv* is not here because it comes later, after sysvr4.1374 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \1375 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\1376 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \1377 | -sym* | -kopensolaris* | -plan9* \1378 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \1379 | -aos* | -aros* | -cloudabi* \1380 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \1381 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \1382 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \1383 | -bitrig* | -openbsd* | -solidbsd* \1384 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \1385 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \1386 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \1387 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \1388 | -chorusos* | -chorusrdb* | -cegcc* \1389 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \1390 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \1391 | -linux-newlib* | -linux-musl* | -linux-uclibc* \1392 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \1393 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \1394 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \1395 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \1396 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \1397 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \1398 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \1399 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)1400 # Remember, each alternative MUST END IN *, to match a version number.1401 ;;1402 -qnx*)1403 case $basic_machine in1404 x86-* | i*86-*)1405 ;;1406 *)1407 os=-nto$os1408 ;;1409 esac1410 ;;1411 -nto-qnx*)1412 ;;1413 -nto*)1414 os=`echo $os | sed -e 's|nto|nto-qnx|'`1415 ;;1416 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \1417 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \1418 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)1419 ;;1420 -mac*)1421 os=`echo $os | sed -e 's|mac|macos|'`1422 ;;1423 -linux-dietlibc)1424 os=-linux-dietlibc1425 ;;1426 -linux*)1427 os=`echo $os | sed -e 's|linux|linux-gnu|'`1428 ;;1429 -sunos5*)1430 os=`echo $os | sed -e 's|sunos5|solaris2|'`1431 ;;1432 -sunos6*)1433 os=`echo $os | sed -e 's|sunos6|solaris3|'`1434 ;;1435 -opened*)1436 os=-openedition1437 ;;1438 -os400*)1439 os=-os4001440 ;;1441 -wince*)1442 os=-wince1443 ;;1444 -osfrose*)1445 os=-osfrose1446 ;;1447 -osf*)1448 os=-osf1449 ;;1450 -utek*)1451 os=-bsd1452 ;;1453 -dynix*)1454 os=-bsd1455 ;;1456 -acis*)1457 os=-aos1458 ;;1459 -atheos*)1460 os=-atheos1461 ;;1462 -syllable*)1463 os=-syllable1464 ;;1465 -386bsd)1466 os=-bsd1467 ;;1468 -ctix* | -uts*)1469 os=-sysv1470 ;;1471 -nova*)1472 os=-rtmk-nova1473 ;;1474 -ns2 )1475 os=-nextstep21476 ;;1477 -nsk*)1478 os=-nsk1479 ;;1480 # Preserve the version number of sinix5.1481 -sinix5.*)1482 os=`echo $os | sed -e 's|sinix|sysv|'`1483 ;;1484 -sinix*)1485 os=-sysv41486 ;;1487 -tpf*)1488 os=-tpf1489 ;;1490 -triton*)1491 os=-sysv31492 ;;1493 -oss*)1494 os=-sysv31495 ;;1496 -svr4)1497 os=-sysv41498 ;;1499 -svr3)1500 os=-sysv31501 ;;1502 -sysvr4)1503 os=-sysv41504 ;;1505 # This must come after -sysvr4.1506 -sysv*)1507 ;;1508 -ose*)1509 os=-ose1510 ;;1511 -es1800*)1512 os=-ose1513 ;;1514 -xenix)1515 os=-xenix1516 ;;1517 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)1518 os=-mint1519 ;;1520 -aros*)1521 os=-aros1522 ;;1523 -zvmoe)1524 os=-zvmoe1525 ;;1526 -dicos*)1527 os=-dicos1528 ;;1529 -nacl*)1530 ;;1531 -none)1532 ;;1533 *)1534 # Get rid of the `-' at the beginning of $os.1535 os=`echo $os | sed 's/[^-]*-//'`1536 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&21537 exit 11538 ;;1539 esac1540 1494 else 1541 1495 … … 1550 1504 # system, and we'll never get to this point. 1551 1505 1552 case $basic_machine in 1506 kernel= 1507 case $cpu-$vendor in 1553 1508 score-*) 1554 os= -elf1509 os=elf 1555 1510 ;; 1556 1511 spu-*) 1557 os= -elf1512 os=elf 1558 1513 ;; 1559 1514 *-acorn) 1560 os= -riscix1.21515 os=riscix1.2 1561 1516 ;; 1562 1517 arm*-rebel) 1563 os=-linux 1518 kernel=linux 1519 os=gnu 1564 1520 ;; 1565 1521 arm*-semi) 1566 os= -aout1522 os=aout 1567 1523 ;; 1568 1524 c4x-* | tic4x-*) 1569 os= -coff1525 os=coff 1570 1526 ;; 1571 1527 c8051-*) 1572 os=-elf 1528 os=elf 1529 ;; 1530 clipper-intergraph) 1531 os=clix 1573 1532 ;; 1574 1533 hexagon-*) 1575 os= -elf1534 os=elf 1576 1535 ;; 1577 1536 tic54x-*) 1578 os= -coff1537 os=coff 1579 1538 ;; 1580 1539 tic55x-*) 1581 os= -coff1540 os=coff 1582 1541 ;; 1583 1542 tic6x-*) 1584 os= -coff1543 os=coff 1585 1544 ;; 1586 1545 # This must come before the *-dec entry. 1587 1546 pdp10-*) 1588 os= -tops201547 os=tops20 1589 1548 ;; 1590 1549 pdp11-*) 1591 os= -none1550 os=none 1592 1551 ;; 1593 1552 *-dec | vax-*) 1594 os= -ultrix4.21553 os=ultrix4.2 1595 1554 ;; 1596 1555 m68*-apollo) 1597 os= -domain1556 os=domain 1598 1557 ;; 1599 1558 i386-sun) 1600 os= -sunos4.0.21559 os=sunos4.0.2 1601 1560 ;; 1602 1561 m68000-sun) 1603 os= -sunos31562 os=sunos3 1604 1563 ;; 1605 1564 m68*-cisco) 1606 os= -aout1565 os=aout 1607 1566 ;; 1608 1567 mep-*) 1609 os= -elf1568 os=elf 1610 1569 ;; 1611 1570 mips*-cisco) 1612 os= -elf1571 os=elf 1613 1572 ;; 1614 1573 mips*-*) 1615 os= -elf1574 os=elf 1616 1575 ;; 1617 1576 or32-*) 1618 os= -coff1577 os=coff 1619 1578 ;; 1620 1579 *-tti) # must be before sparc entry or we get the wrong os. 1621 os= -sysv31580 os=sysv3 1622 1581 ;; 1623 1582 sparc-* | *-sun) 1624 os=-sunos4.1.1 1583 os=sunos4.1.1 1584 ;; 1585 pru-*) 1586 os=elf 1625 1587 ;; 1626 1588 *-be) 1627 os=-beos 1628 ;; 1629 *-haiku) 1630 os=-haiku 1589 os=beos 1631 1590 ;; 1632 1591 *-ibm) 1633 os= -aix1592 os=aix 1634 1593 ;; 1635 1594 *-knuth) 1636 os= -mmixware1595 os=mmixware 1637 1596 ;; 1638 1597 *-wec) 1639 os= -proelf1598 os=proelf 1640 1599 ;; 1641 1600 *-winbond) 1642 os= -proelf1601 os=proelf 1643 1602 ;; 1644 1603 *-oki) 1645 os= -proelf1604 os=proelf 1646 1605 ;; 1647 1606 *-hp) 1648 os= -hpux1607 os=hpux 1649 1608 ;; 1650 1609 *-hitachi) 1651 os= -hiux1610 os=hiux 1652 1611 ;; 1653 1612 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1654 os= -sysv1613 os=sysv 1655 1614 ;; 1656 1615 *-cbm) 1657 os= -amigaos1616 os=amigaos 1658 1617 ;; 1659 1618 *-dg) 1660 os= -dgux1619 os=dgux 1661 1620 ;; 1662 1621 *-dolphin) 1663 os= -sysv31622 os=sysv3 1664 1623 ;; 1665 1624 m68k-ccur) 1666 os= -rtu1625 os=rtu 1667 1626 ;; 1668 1627 m88k-omron*) 1669 os= -luna1670 ;; 1671 *-next 1672 os= -nextstep1628 os=luna 1629 ;; 1630 *-next) 1631 os=nextstep 1673 1632 ;; 1674 1633 *-sequent) 1675 os= -ptx1634 os=ptx 1676 1635 ;; 1677 1636 *-crds) 1678 os= -unos1637 os=unos 1679 1638 ;; 1680 1639 *-ns) 1681 os= -genix1640 os=genix 1682 1641 ;; 1683 1642 i370-*) 1684 os=-mvs 1685 ;; 1686 *-next) 1687 os=-nextstep3 1643 os=mvs 1688 1644 ;; 1689 1645 *-gould) 1690 os= -sysv1646 os=sysv 1691 1647 ;; 1692 1648 *-highlevel) 1693 os= -bsd1649 os=bsd 1694 1650 ;; 1695 1651 *-encore) 1696 os= -bsd1652 os=bsd 1697 1653 ;; 1698 1654 *-sgi) 1699 os= -irix1655 os=irix 1700 1656 ;; 1701 1657 *-siemens) 1702 os= -sysv41658 os=sysv4 1703 1659 ;; 1704 1660 *-masscomp) 1705 os= -rtu1661 os=rtu 1706 1662 ;; 1707 1663 f30[01]-fujitsu | f700-fujitsu) 1708 os= -uxpv1664 os=uxpv 1709 1665 ;; 1710 1666 *-rom68k) 1711 os= -coff1667 os=coff 1712 1668 ;; 1713 1669 *-*bug) 1714 os= -coff1670 os=coff 1715 1671 ;; 1716 1672 *-apple) 1717 os= -macos1673 os=macos 1718 1674 ;; 1719 1675 *-atari*) 1720 os=-mint 1676 os=mint 1677 ;; 1678 *-wrs) 1679 os=vxworks 1721 1680 ;; 1722 1681 *) 1723 os= -none1682 os=none 1724 1683 ;; 1725 1684 esac 1685 1726 1686 fi 1687 1688 # Now, validate our (potentially fixed-up) OS. 1689 case $os in 1690 # Sometimes we do "kernel-libc", so those need to count as OSes. 1691 musl* | newlib* | uclibc*) 1692 ;; 1693 # Likewise for "kernel-abi" 1694 eabi* | gnueabi*) 1695 ;; 1696 # VxWorks passes extra cpu info in the 4th filed. 1697 simlinux | simwindows | spe) 1698 ;; 1699 # Now accept the basic system types. 1700 # The portable systems comes first. 1701 # Each alternative MUST end in a * to match a version number. 1702 gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ 1703 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ 1704 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ 1705 | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ 1706 | hiux* | abug | nacl* | netware* | windows* \ 1707 | os9* | macos* | osx* | ios* \ 1708 | mpw* | magic* | mmixware* | mon960* | lnews* \ 1709 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ 1710 | aos* | aros* | cloudabi* | sortix* | twizzler* \ 1711 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ 1712 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ 1713 | mirbsd* | netbsd* | dicos* | openedition* | ose* \ 1714 | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ 1715 | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ 1716 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ 1717 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ 1718 | udi* | lites* | ieee* | go32* | aux* | hcos* \ 1719 | chorusrdb* | cegcc* | glidix* | serenity* \ 1720 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ 1721 | midipix* | mingw32* | mingw64* | mint* \ 1722 | uxpv* | beos* | mpeix* | udk* | moxiebox* \ 1723 | interix* | uwin* | mks* | rhapsody* | darwin* \ 1724 | openstep* | oskit* | conix* | pw32* | nonstopux* \ 1725 | storm-chaos* | tops10* | tenex* | tops20* | its* \ 1726 | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ 1727 | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ 1728 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ 1729 | skyos* | haiku* | rdos* | toppers* | drops* | es* \ 1730 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ 1731 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ 1732 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) 1733 ;; 1734 # This one is extra strict with allowed versions 1735 sco3.2v2 | sco3.2v[4-9]* | sco5v6*) 1736 # Don't forget version if it is 3.2v4 or newer. 1737 ;; 1738 none) 1739 ;; 1740 *) 1741 echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 1742 exit 1 1743 ;; 1744 esac 1745 1746 # As a final step for OS-related things, validate the OS-kernel combination 1747 # (given a valid OS), if there is a kernel. 1748 case $kernel-$os in 1749 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) 1750 ;; 1751 uclinux-uclibc* ) 1752 ;; 1753 -dietlibc* | -newlib* | -musl* | -uclibc* ) 1754 # These are just libc implementations, not actual OSes, and thus 1755 # require a kernel. 1756 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 1757 exit 1 1758 ;; 1759 kfreebsd*-gnu* | kopensolaris*-gnu*) 1760 ;; 1761 vxworks-simlinux | vxworks-simwindows | vxworks-spe) 1762 ;; 1763 nto-qnx*) 1764 ;; 1765 os2-emx) 1766 ;; 1767 *-eabi* | *-gnueabi*) 1768 ;; 1769 -*) 1770 # Blank kernel with real OS is always fine. 1771 ;; 1772 *-*) 1773 echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 1774 exit 1 1775 ;; 1776 esac 1727 1777 1728 1778 # Here we handle the case where we know the os, and the CPU type, but not the 1729 1779 # manufacturer. We pick the logical manufacturer. 1730 vendor=unknown 1731 case $basic_machine in 1732 *-unknown) 1733 case $os in 1734 -riscix*) 1780 case $vendor in 1781 unknown) 1782 case $cpu-$os in 1783 *-riscix*) 1735 1784 vendor=acorn 1736 1785 ;; 1737 -sunos*)1786 *-sunos*) 1738 1787 vendor=sun 1739 1788 ;; 1740 -cnk*|-aix*)1789 *-cnk* | *-aix*) 1741 1790 vendor=ibm 1742 1791 ;; 1743 -beos*)1792 *-beos*) 1744 1793 vendor=be 1745 1794 ;; 1746 -hpux*)1795 *-hpux*) 1747 1796 vendor=hp 1748 1797 ;; 1749 -mpeix*)1798 *-mpeix*) 1750 1799 vendor=hp 1751 1800 ;; 1752 -hiux*)1801 *-hiux*) 1753 1802 vendor=hitachi 1754 1803 ;; 1755 -unos*)1804 *-unos*) 1756 1805 vendor=crds 1757 1806 ;; 1758 -dgux*)1807 *-dgux*) 1759 1808 vendor=dg 1760 1809 ;; 1761 -luna*)1810 *-luna*) 1762 1811 vendor=omron 1763 1812 ;; 1764 -genix*)1813 *-genix*) 1765 1814 vendor=ns 1766 1815 ;; 1767 -mvs* | -opened*) 1816 *-clix*) 1817 vendor=intergraph 1818 ;; 1819 *-mvs* | *-opened*) 1768 1820 vendor=ibm 1769 1821 ;; 1770 -os400*)1822 *-os400*) 1771 1823 vendor=ibm 1772 1824 ;; 1773 -ptx*) 1825 s390-* | s390x-*) 1826 vendor=ibm 1827 ;; 1828 *-ptx*) 1774 1829 vendor=sequent 1775 1830 ;; 1776 -tpf*)1831 *-tpf*) 1777 1832 vendor=ibm 1778 1833 ;; 1779 -vxsim* | -vxworks* |-windiss*)1834 *-vxsim* | *-vxworks* | *-windiss*) 1780 1835 vendor=wrs 1781 1836 ;; 1782 -aux*)1837 *-aux*) 1783 1838 vendor=apple 1784 1839 ;; 1785 -hms*)1840 *-hms*) 1786 1841 vendor=hitachi 1787 1842 ;; 1788 -mpw* |-macos*)1843 *-mpw* | *-macos*) 1789 1844 vendor=apple 1790 1845 ;; 1791 -*mint | -mint[0-9]* | -*MiNT |-MiNT[0-9]*)1846 *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) 1792 1847 vendor=atari 1793 1848 ;; 1794 -vos*)1849 *-vos*) 1795 1850 vendor=stratus 1796 1851 ;; 1797 1852 esac 1798 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`1799 1853 ;; 1800 1854 esac 1801 1855 1802 echo $basic_machine$os1856 echo "$cpu-$vendor-${kernel:+$kernel-}$os" 1803 1857 exit 1804 1858 1805 1859 # Local variables: 1806 # eval: (add-hook ' write-file-hooks'time-stamp)1860 # eval: (add-hook 'before-save-hook 'time-stamp) 1807 1861 # time-stamp-start: "timestamp='" 1808 1862 # time-stamp-format: "%:y-%02m-%02d"
Note: See TracChangeset
for help on using the changeset viewer.