Blame build-aux/config.sub

Packit 130fc8
#! /bin/sh
Packit 130fc8
# Configuration validation subroutine script.
Packit Service 768a21
#   Copyright 1992-2018 Free Software Foundation, Inc.
Packit 130fc8
Packit Service 768a21
timestamp='2018-05-05'
Packit 130fc8
Packit 130fc8
# This file is free software; you can redistribute it and/or modify it
Packit 130fc8
# under the terms of the GNU General Public License as published by
Packit 130fc8
# the Free Software Foundation; either version 3 of the License, or
Packit 130fc8
# (at your option) any later version.
Packit 130fc8
#
Packit 130fc8
# This program is distributed in the hope that it will be useful, but
Packit 130fc8
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 130fc8
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 130fc8
# General Public License for more details.
Packit 130fc8
#
Packit 130fc8
# You should have received a copy of the GNU General Public License
Packit Service 768a21
# along with this program; if not, see <https://www.gnu.org/licenses/>.
Packit 130fc8
#
Packit 130fc8
# As a special exception to the GNU General Public License, if you
Packit 130fc8
# distribute this file as part of a program that contains a
Packit 130fc8
# configuration script generated by Autoconf, you may include it under
Packit 130fc8
# the same distribution terms that you use for the rest of that
Packit 130fc8
# program.  This Exception is an additional permission under section 7
Packit 130fc8
# of the GNU General Public License, version 3 ("GPLv3").
Packit 130fc8
Packit 130fc8
Packit 130fc8
# Please send patches to <config-patches@gnu.org>.
Packit 130fc8
#
Packit 130fc8
# Configuration subroutine to validate and canonicalize a configuration type.
Packit 130fc8
# Supply the specified configuration type as an argument.
Packit 130fc8
# If it is invalid, we print an error message on stderr and exit with code 1.
Packit 130fc8
# Otherwise, we print the canonical config type on stdout and succeed.
Packit 130fc8
Packit 130fc8
# You can get the latest version of this script from:
Packit Service 768a21
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
Packit 130fc8
Packit 130fc8
# This file is supposed to be the same for all GNU packages
Packit 130fc8
# and recognize all the CPU types, system types and aliases
Packit 130fc8
# that are meaningful with *any* GNU software.
Packit 130fc8
# Each package is responsible for reporting which valid configurations
Packit 130fc8
# it does not support.  The user should be able to distinguish
Packit 130fc8
# a failure to support a valid configuration from a meaningless
Packit 130fc8
# configuration.
Packit 130fc8
Packit 130fc8
# The goal of this file is to map all the various variations of a given
Packit 130fc8
# machine specification into a single specification in the form:
Packit 130fc8
#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
Packit 130fc8
# or in some cases, the newer four-part form:
Packit 130fc8
#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
Packit 130fc8
# It is wrong to echo any other type of specification.
Packit 130fc8
Packit 130fc8
me=`echo "$0" | sed -e 's,.*/,,'`
Packit 130fc8
Packit 130fc8
usage="\
Packit Service 768a21
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Packit 130fc8
Packit 130fc8
Canonicalize a configuration name.
Packit 130fc8
Packit Service 768a21
Options:
Packit 130fc8
  -h, --help         print this help, then exit
Packit 130fc8
  -t, --time-stamp   print date of last modification, then exit
Packit 130fc8
  -v, --version      print version number, then exit
Packit 130fc8
Packit 130fc8
Report bugs and patches to <config-patches@gnu.org>."
Packit 130fc8
Packit 130fc8
version="\
Packit 130fc8
GNU config.sub ($timestamp)
Packit 130fc8
Packit Service 768a21
Copyright 1992-2018 Free Software Foundation, Inc.
Packit 130fc8
Packit 130fc8
This is free software; see the source for copying conditions.  There is NO
Packit 130fc8
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Packit 130fc8
Packit 130fc8
help="
Packit 130fc8
Try \`$me --help' for more information."
Packit 130fc8
Packit 130fc8
# Parse command line
Packit 130fc8
while test $# -gt 0 ; do
Packit 130fc8
  case $1 in
Packit 130fc8
    --time-stamp | --time* | -t )
Packit 130fc8
       echo "$timestamp" ; exit ;;
Packit 130fc8
    --version | -v )
Packit 130fc8
       echo "$version" ; exit ;;
Packit 130fc8
    --help | --h* | -h )
Packit 130fc8
       echo "$usage"; exit ;;
Packit 130fc8
    -- )     # Stop option processing
Packit 130fc8
       shift; break ;;
Packit 130fc8
    - )	# Use stdin as input.
Packit 130fc8
       break ;;
Packit 130fc8
    -* )
Packit 130fc8
       echo "$me: invalid option $1$help"
Packit 130fc8
       exit 1 ;;
Packit 130fc8
Packit 130fc8
    *local*)
Packit 130fc8
       # First pass through any local machine types.
Packit Service 768a21
       echo "$1"
Packit 130fc8
       exit ;;
Packit 130fc8
Packit 130fc8
    * )
Packit 130fc8
       break ;;
Packit 130fc8
  esac
Packit 130fc8
done
Packit 130fc8
Packit 130fc8
case $# in
Packit 130fc8
 0) echo "$me: missing argument$help" >&2
Packit 130fc8
    exit 1;;
Packit 130fc8
 1) ;;
Packit 130fc8
 *) echo "$me: too many arguments$help" >&2
Packit 130fc8
    exit 1;;
Packit 130fc8
esac
Packit 130fc8
Packit Service 768a21
# Spilt fields of configuration type
Packit Service 768a21
IFS="-" read -r field1 field2 field3 field4 <
Packit Service 768a21
$1
Packit Service 768a21
EOF
Packit Service 768a21
Packit Service 768a21
# Separate into logical components for further validation
Packit Service 768a21
case $1 in
Packit Service 768a21
	*-*-*-*)
Packit Service 768a21
		basic_machine=$field1-$field2
Packit Service 768a21
		os=-$field3-$field4
Packit Service 768a21
		;;
Packit Service 768a21
	*-*-*)
Packit Service 768a21
		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
Packit Service 768a21
		# parts
Packit Service 768a21
		maybe_os=$field2-$field3
Packit Service 768a21
		case $maybe_os in
Packit Service 768a21
			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
Packit Service 768a21
			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
Packit Service 768a21
			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
Packit Service 768a21
			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
Packit Service 768a21
			| storm-chaos* | os2-emx* | rtmk-nova*)
Packit Service 768a21
				basic_machine=$field1
Packit Service 768a21
				os=-$maybe_os
Packit Service 768a21
				;;
Packit Service 768a21
			android-linux)
Packit Service 768a21
				basic_machine=$field1-unknown
Packit Service 768a21
				os=-linux-android
Packit Service 768a21
				;;
Packit Service 768a21
			*)
Packit Service 768a21
				basic_machine=$field1-$field2
Packit Service 768a21
				os=-$field3
Packit Service 768a21
				;;
Packit Service 768a21
		esac
Packit Service 768a21
		;;
Packit Service 768a21
	*-*)
Packit Service 768a21
		basic_machine=$field1
Packit Service 768a21
		os=-$field2
Packit Service 768a21
		;;
Packit Service 768a21
	*)
Packit Service 768a21
		basic_machine=$1
Packit Service 768a21
		os=
Packit Service 768a21
		;;
Packit 130fc8
esac
Packit 130fc8
Packit 130fc8
### Let's recognize common machines as not being operating systems so
Packit 130fc8
### that things like config.sub decstation-3100 work.  We also
Packit 130fc8
### recognize some manufacturers as not being operating systems, so we
Packit 130fc8
### can provide default operating systems below.
Packit 130fc8
case $os in
Packit 130fc8
	-sun*os*)
Packit 130fc8
		# Prevent following clause from handling this invalid input.
Packit 130fc8
		;;
Packit 130fc8
	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
Packit 130fc8
	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
Packit 130fc8
	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
Packit 130fc8
	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
Packit 130fc8
	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
Packit 130fc8
	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
Packit 130fc8
	-apple | -axis | -knuth | -cray | -microblaze*)
Packit 130fc8
		os=
Packit 130fc8
		basic_machine=$1
Packit 130fc8
		;;
Packit 130fc8
	-bluegene*)
Packit 130fc8
		os=-cnk
Packit 130fc8
		;;
Packit 130fc8
	-sim | -cisco | -oki | -wec | -winbond)
Packit 130fc8
		os=
Packit 130fc8
		basic_machine=$1
Packit 130fc8
		;;
Packit 130fc8
	-scout)
Packit 130fc8
		;;
Packit 130fc8
	-wrs)
Packit 130fc8
		os=-vxworks
Packit 130fc8
		basic_machine=$1
Packit 130fc8
		;;
Packit 130fc8
	-chorusos*)
Packit 130fc8
		os=-chorusos
Packit 130fc8
		basic_machine=$1
Packit 130fc8
		;;
Packit 130fc8
	-chorusrdb)
Packit 130fc8
		os=-chorusrdb
Packit 130fc8
		basic_machine=$1
Packit 130fc8
		;;
Packit 130fc8
	-hiux*)
Packit 130fc8
		os=-hiuxwe2
Packit 130fc8
		;;
Packit 130fc8
	-sco6)
Packit 130fc8
		os=-sco5v6
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-sco5)
Packit 130fc8
		os=-sco3.2v5
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-sco4)
Packit 130fc8
		os=-sco3.2v4
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-sco3.2.[4-9]*)
Packit 130fc8
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-sco3.2v[4-9]*)
Packit 130fc8
		# Don't forget version if it is 3.2v4 or newer.
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-sco5v6*)
Packit 130fc8
		# Don't forget version if it is 3.2v4 or newer.
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-sco*)
Packit 130fc8
		os=-sco3.2v2
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-udk*)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-isc)
Packit 130fc8
		os=-isc2.2
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-clix*)
Packit 130fc8
		basic_machine=clipper-intergraph
Packit 130fc8
		;;
Packit 130fc8
	-isc*)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
Packit 130fc8
		;;
Packit 130fc8
	-lynx*178)
Packit 130fc8
		os=-lynxos178
Packit 130fc8
		;;
Packit 130fc8
	-lynx*5)
Packit 130fc8
		os=-lynxos5
Packit 130fc8
		;;
Packit 130fc8
	-lynx*)
Packit 130fc8
		os=-lynxos
Packit 130fc8
		;;
Packit 130fc8
	-ptx*)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
Packit 130fc8
		;;
Packit 130fc8
	-psos*)
Packit 130fc8
		os=-psos
Packit 130fc8
		;;
Packit 130fc8
	-mint | -mint[0-9]*)
Packit 130fc8
		basic_machine=m68k-atari
Packit 130fc8
		os=-mint
Packit 130fc8
		;;
Packit 130fc8
esac
Packit 130fc8
Packit 130fc8
# Decode aliases for certain CPU-COMPANY combinations.
Packit 130fc8
case $basic_machine in
Packit 130fc8
	# Recognize the basic CPU types without company name.
Packit 130fc8
	# Some are omitted here because they have special meanings below.
Packit 130fc8
	1750a | 580 \
Packit 130fc8
	| a29k \
Packit 130fc8
	| aarch64 | aarch64_be \
Packit 130fc8
	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
Packit 130fc8
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
Packit 130fc8
	| am33_2.0 \
Packit 130fc8
	| arc | arceb \
Packit Service 768a21
	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
Packit 130fc8
	| avr | avr32 \
Packit 130fc8
	| ba \
Packit 130fc8
	| be32 | be64 \
Packit 130fc8
	| bfin \
Packit Service 768a21
	| c4x | c8051 | clipper | csky \
Packit 130fc8
	| d10v | d30v | dlx | dsp16xx \
Packit 130fc8
	| e2k | epiphany \
Packit 130fc8
	| fido | fr30 | frv | ft32 \
Packit 130fc8
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
Packit 130fc8
	| hexagon \
Packit Service 768a21
	| i370 | i860 | i960 | ia16 | ia64 \
Packit 130fc8
	| ip2k | iq2000 \
Packit 130fc8
	| k1om \
Packit 130fc8
	| le32 | le64 \
Packit 130fc8
	| lm32 \
Packit 130fc8
	| m32c | m32r | m32rle | m68000 | m68k | m88k \
Packit 130fc8
	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
Packit 130fc8
	| mips | mipsbe | mipseb | mipsel | mipsle \
Packit 130fc8
	| mips16 \
Packit 130fc8
	| mips64 | mips64el \
Packit 130fc8
	| mips64octeon | mips64octeonel \
Packit 130fc8
	| mips64orion | mips64orionel \
Packit 130fc8
	| mips64r5900 | mips64r5900el \
Packit 130fc8
	| mips64vr | mips64vrel \
Packit 130fc8
	| mips64vr4100 | mips64vr4100el \
Packit 130fc8
	| mips64vr4300 | mips64vr4300el \
Packit 130fc8
	| mips64vr5000 | mips64vr5000el \
Packit 130fc8
	| mips64vr5900 | mips64vr5900el \
Packit 130fc8
	| mipsisa32 | mipsisa32el \
Packit 130fc8
	| mipsisa32r2 | mipsisa32r2el \
Packit 130fc8
	| mipsisa32r6 | mipsisa32r6el \
Packit 130fc8
	| mipsisa64 | mipsisa64el \
Packit 130fc8
	| mipsisa64r2 | mipsisa64r2el \
Packit 130fc8
	| mipsisa64r6 | mipsisa64r6el \
Packit 130fc8
	| mipsisa64sb1 | mipsisa64sb1el \
Packit 130fc8
	| mipsisa64sr71k | mipsisa64sr71kel \
Packit 130fc8
	| mipsr5900 | mipsr5900el \
Packit 130fc8
	| mipstx39 | mipstx39el \
Packit 130fc8
	| mn10200 | mn10300 \
Packit 130fc8
	| moxie \
Packit 130fc8
	| mt \
Packit 130fc8
	| msp430 \
Packit 130fc8
	| nds32 | nds32le | nds32be \
Packit Service 768a21
	| nfp \
Packit 130fc8
	| nios | nios2 | nios2eb | nios2el \
Packit 130fc8
	| ns16k | ns32k \
Packit 130fc8
	| open8 | or1k | or1knd | or32 \
Packit Service 768a21
	| pdp10 | pj | pjl \
Packit 130fc8
	| powerpc | powerpc64 | powerpc64le | powerpcle \
Packit Service 768a21
	| pru \
Packit 130fc8
	| pyramid \
Packit 130fc8
	| riscv32 | riscv64 \
Packit 130fc8
	| rl78 | rx \
Packit 130fc8
	| score \
Packit 130fc8
	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
Packit 130fc8
	| sh64 | sh64le \
Packit 130fc8
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
Packit 130fc8
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
Packit 130fc8
	| spu \
Packit 130fc8
	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
Packit 130fc8
	| ubicom32 \
Packit 130fc8
	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
Packit 130fc8
	| visium \
Packit Service 768a21
	| wasm32 \
Packit 130fc8
	| x86 | xc16x | xstormy16 | xtensa \
Packit 130fc8
	| z8k | z80)
Packit 130fc8
		basic_machine=$basic_machine-unknown
Packit 130fc8
		;;
Packit 130fc8
	c54x)
Packit 130fc8
		basic_machine=tic54x-unknown
Packit 130fc8
		;;
Packit 130fc8
	c55x)
Packit 130fc8
		basic_machine=tic55x-unknown
Packit 130fc8
		;;
Packit 130fc8
	c6x)
Packit 130fc8
		basic_machine=tic6x-unknown
Packit 130fc8
		;;
Packit 130fc8
	leon|leon[3-9])
Packit 130fc8
		basic_machine=sparc-$basic_machine
Packit 130fc8
		;;
Packit 130fc8
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
Packit 130fc8
		basic_machine=$basic_machine-unknown
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit Service 768a21
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
Packit Service 768a21
		;;
Packit Service 768a21
	m9s12z | m68hcs12z | hcs12z | s12z)
Packit Service 768a21
		basic_machine=s12z-unknown
Packit Service 768a21
		os=-none
Packit 130fc8
		;;
Packit 130fc8
	ms1)
Packit 130fc8
		basic_machine=mt-unknown
Packit 130fc8
		;;
Packit 130fc8
Packit 130fc8
	strongarm | thumb | xscale)
Packit 130fc8
		basic_machine=arm-unknown
Packit 130fc8
		;;
Packit 130fc8
	xgate)
Packit 130fc8
		basic_machine=$basic_machine-unknown
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit 130fc8
	xscaleeb)
Packit 130fc8
		basic_machine=armeb-unknown
Packit 130fc8
		;;
Packit 130fc8
Packit 130fc8
	xscaleel)
Packit 130fc8
		basic_machine=armel-unknown
Packit 130fc8
		;;
Packit 130fc8
Packit 130fc8
	# We use `pc' rather than `unknown'
Packit 130fc8
	# because (1) that's what they normally are, and
Packit 130fc8
	# (2) the word "unknown" tends to confuse beginning users.
Packit 130fc8
	i*86 | x86_64)
Packit 130fc8
	  basic_machine=$basic_machine-pc
Packit 130fc8
	  ;;
Packit 130fc8
	# Object if more than one company name word.
Packit 130fc8
	*-*-*)
Packit Service 768a21
		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
Packit 130fc8
		exit 1
Packit 130fc8
		;;
Packit 130fc8
	# Recognize the basic CPU types with company name.
Packit 130fc8
	580-* \
Packit 130fc8
	| a29k-* \
Packit 130fc8
	| aarch64-* | aarch64_be-* \
Packit 130fc8
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
Packit 130fc8
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
Packit 130fc8
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
Packit 130fc8
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
Packit 130fc8
	| avr-* | avr32-* \
Packit 130fc8
	| ba-* \
Packit 130fc8
	| be32-* | be64-* \
Packit 130fc8
	| bfin-* | bs2000-* \
Packit 130fc8
	| c[123]* | c30-* | [cjt]90-* | c4x-* \
Packit Service 768a21
	| c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
Packit 130fc8
	| d10v-* | d30v-* | dlx-* \
Packit 130fc8
	| e2k-* | elxsi-* \
Packit 130fc8
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
Packit 130fc8
	| h8300-* | h8500-* \
Packit 130fc8
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
Packit 130fc8
	| hexagon-* \
Packit Service 768a21
	| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
Packit 130fc8
	| ip2k-* | iq2000-* \
Packit 130fc8
	| k1om-* \
Packit 130fc8
	| le32-* | le64-* \
Packit 130fc8
	| lm32-* \
Packit 130fc8
	| m32c-* | m32r-* | m32rle-* \
Packit 130fc8
	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
Packit 130fc8
	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
Packit 130fc8
	| microblaze-* | microblazeel-* \
Packit 130fc8
	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
Packit 130fc8
	| mips16-* \
Packit 130fc8
	| mips64-* | mips64el-* \
Packit 130fc8
	| mips64octeon-* | mips64octeonel-* \
Packit 130fc8
	| mips64orion-* | mips64orionel-* \
Packit 130fc8
	| mips64r5900-* | mips64r5900el-* \
Packit 130fc8
	| mips64vr-* | mips64vrel-* \
Packit 130fc8
	| mips64vr4100-* | mips64vr4100el-* \
Packit 130fc8
	| mips64vr4300-* | mips64vr4300el-* \
Packit 130fc8
	| mips64vr5000-* | mips64vr5000el-* \
Packit 130fc8
	| mips64vr5900-* | mips64vr5900el-* \
Packit 130fc8
	| mipsisa32-* | mipsisa32el-* \
Packit 130fc8
	| mipsisa32r2-* | mipsisa32r2el-* \
Packit 130fc8
	| mipsisa32r6-* | mipsisa32r6el-* \
Packit 130fc8
	| mipsisa64-* | mipsisa64el-* \
Packit 130fc8
	| mipsisa64r2-* | mipsisa64r2el-* \
Packit 130fc8
	| mipsisa64r6-* | mipsisa64r6el-* \
Packit 130fc8
	| mipsisa64sb1-* | mipsisa64sb1el-* \
Packit 130fc8
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
Packit 130fc8
	| mipsr5900-* | mipsr5900el-* \
Packit 130fc8
	| mipstx39-* | mipstx39el-* \
Packit 130fc8
	| mmix-* \
Packit 130fc8
	| mt-* \
Packit 130fc8
	| msp430-* \
Packit 130fc8
	| nds32-* | nds32le-* | nds32be-* \
Packit Service 768a21
	| nfp-* \
Packit 130fc8
	| nios-* | nios2-* | nios2eb-* | nios2el-* \
Packit 130fc8
	| none-* | np1-* | ns16k-* | ns32k-* \
Packit 130fc8
	| open8-* \
Packit 130fc8
	| or1k*-* \
Packit 130fc8
	| orion-* \
Packit 130fc8
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
Packit 130fc8
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
Packit Service 768a21
	| pru-* \
Packit 130fc8
	| pyramid-* \
Packit 130fc8
	| riscv32-* | riscv64-* \
Packit 130fc8
	| rl78-* | romp-* | rs6000-* | rx-* \
Packit 130fc8
	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
Packit 130fc8
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
Packit 130fc8
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
Packit 130fc8
	| sparclite-* \
Packit 130fc8
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
Packit 130fc8
	| tahoe-* \
Packit 130fc8
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
Packit 130fc8
	| tile*-* \
Packit 130fc8
	| tron-* \
Packit 130fc8
	| ubicom32-* \
Packit 130fc8
	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
Packit 130fc8
	| vax-* \
Packit 130fc8
	| visium-* \
Packit Service 768a21
	| wasm32-* \
Packit 130fc8
	| we32k-* \
Packit 130fc8
	| x86-* | x86_64-* | xc16x-* | xps100-* \
Packit 130fc8
	| xstormy16-* | xtensa*-* \
Packit 130fc8
	| ymp-* \
Packit 130fc8
	| z8k-* | z80-*)
Packit 130fc8
		;;
Packit 130fc8
	# Recognize the basic CPU types without company name, with glob match.
Packit 130fc8
	xtensa*)
Packit 130fc8
		basic_machine=$basic_machine-unknown
Packit 130fc8
		;;
Packit 130fc8
	# Recognize the various machine names and aliases which stand
Packit 130fc8
	# for a CPU type and a company and sometimes even an OS.
Packit 130fc8
	386bsd)
Packit Service 768a21
		basic_machine=i386-pc
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
Packit 130fc8
		basic_machine=m68000-att
Packit 130fc8
		;;
Packit 130fc8
	3b*)
Packit 130fc8
		basic_machine=we32k-att
Packit 130fc8
		;;
Packit 130fc8
	a29khif)
Packit 130fc8
		basic_machine=a29k-amd
Packit 130fc8
		os=-udi
Packit 130fc8
		;;
Packit 130fc8
	abacus)
Packit 130fc8
		basic_machine=abacus-unknown
Packit 130fc8
		;;
Packit 130fc8
	adobe68k)
Packit 130fc8
		basic_machine=m68010-adobe
Packit 130fc8
		os=-scout
Packit 130fc8
		;;
Packit 130fc8
	alliant | fx80)
Packit 130fc8
		basic_machine=fx80-alliant
Packit 130fc8
		;;
Packit 130fc8
	altos | altos3068)
Packit 130fc8
		basic_machine=m68k-altos
Packit 130fc8
		;;
Packit 130fc8
	am29k)
Packit 130fc8
		basic_machine=a29k-none
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	amd64)
Packit 130fc8
		basic_machine=x86_64-pc
Packit 130fc8
		;;
Packit 130fc8
	amd64-*)
Packit Service 768a21
		basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	amdahl)
Packit 130fc8
		basic_machine=580-amdahl
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	amiga | amiga-*)
Packit 130fc8
		basic_machine=m68k-unknown
Packit 130fc8
		;;
Packit 130fc8
	amigaos | amigados)
Packit 130fc8
		basic_machine=m68k-unknown
Packit 130fc8
		os=-amigaos
Packit 130fc8
		;;
Packit 130fc8
	amigaunix | amix)
Packit 130fc8
		basic_machine=m68k-unknown
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	apollo68)
Packit 130fc8
		basic_machine=m68k-apollo
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	apollo68bsd)
Packit 130fc8
		basic_machine=m68k-apollo
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	aros)
Packit 130fc8
		basic_machine=i386-pc
Packit 130fc8
		os=-aros
Packit 130fc8
		;;
Packit Service 768a21
	asmjs)
Packit 130fc8
		basic_machine=asmjs-unknown
Packit 130fc8
		;;
Packit 130fc8
	aux)
Packit 130fc8
		basic_machine=m68k-apple
Packit 130fc8
		os=-aux
Packit 130fc8
		;;
Packit 130fc8
	balance)
Packit 130fc8
		basic_machine=ns32k-sequent
Packit 130fc8
		os=-dynix
Packit 130fc8
		;;
Packit 130fc8
	blackfin)
Packit 130fc8
		basic_machine=bfin-unknown
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	blackfin-*)
Packit Service 768a21
		basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	bluegene*)
Packit 130fc8
		basic_machine=powerpc-ibm
Packit 130fc8
		os=-cnk
Packit 130fc8
		;;
Packit 130fc8
	c54x-*)
Packit Service 768a21
		basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	c55x-*)
Packit Service 768a21
		basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	c6x-*)
Packit Service 768a21
		basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	c90)
Packit 130fc8
		basic_machine=c90-cray
Packit 130fc8
		os=-unicos
Packit 130fc8
		;;
Packit 130fc8
	cegcc)
Packit 130fc8
		basic_machine=arm-unknown
Packit 130fc8
		os=-cegcc
Packit 130fc8
		;;
Packit 130fc8
	convex-c1)
Packit 130fc8
		basic_machine=c1-convex
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	convex-c2)
Packit 130fc8
		basic_machine=c2-convex
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	convex-c32)
Packit 130fc8
		basic_machine=c32-convex
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	convex-c34)
Packit 130fc8
		basic_machine=c34-convex
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	convex-c38)
Packit 130fc8
		basic_machine=c38-convex
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	cray | j90)
Packit 130fc8
		basic_machine=j90-cray
Packit 130fc8
		os=-unicos
Packit 130fc8
		;;
Packit 130fc8
	craynv)
Packit 130fc8
		basic_machine=craynv-cray
Packit 130fc8
		os=-unicosmp
Packit 130fc8
		;;
Packit 130fc8
	cr16 | cr16-*)
Packit 130fc8
		basic_machine=cr16-unknown
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	crds | unos)
Packit 130fc8
		basic_machine=m68k-crds
Packit 130fc8
		;;
Packit 130fc8
	crisv32 | crisv32-* | etraxfs*)
Packit 130fc8
		basic_machine=crisv32-axis
Packit 130fc8
		;;
Packit 130fc8
	cris | cris-* | etrax*)
Packit 130fc8
		basic_machine=cris-axis
Packit 130fc8
		;;
Packit 130fc8
	crx)
Packit 130fc8
		basic_machine=crx-unknown
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	da30 | da30-*)
Packit 130fc8
		basic_machine=m68k-da30
Packit 130fc8
		;;
Packit 130fc8
	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
Packit 130fc8
		basic_machine=mips-dec
Packit 130fc8
		;;
Packit 130fc8
	decsystem10* | dec10*)
Packit 130fc8
		basic_machine=pdp10-dec
Packit 130fc8
		os=-tops10
Packit 130fc8
		;;
Packit 130fc8
	decsystem20* | dec20*)
Packit 130fc8
		basic_machine=pdp10-dec
Packit 130fc8
		os=-tops20
Packit 130fc8
		;;
Packit 130fc8
	delta | 3300 | motorola-3300 | motorola-delta \
Packit 130fc8
	      | 3300-motorola | delta-motorola)
Packit 130fc8
		basic_machine=m68k-motorola
Packit 130fc8
		;;
Packit 130fc8
	delta88)
Packit 130fc8
		basic_machine=m88k-motorola
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit 130fc8
	dicos)
Packit 130fc8
		basic_machine=i686-pc
Packit 130fc8
		os=-dicos
Packit 130fc8
		;;
Packit 130fc8
	djgpp)
Packit 130fc8
		basic_machine=i586-pc
Packit 130fc8
		os=-msdosdjgpp
Packit 130fc8
		;;
Packit 130fc8
	dpx20 | dpx20-*)
Packit 130fc8
		basic_machine=rs6000-bull
Packit 130fc8
		os=-bosx
Packit 130fc8
		;;
Packit Service 768a21
	dpx2*)
Packit 130fc8
		basic_machine=m68k-bull
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit Service 768a21
	e500v[12])
Packit Service 768a21
		basic_machine=powerpc-unknown
Packit Service 768a21
		os=$os"spe"
Packit Service 768a21
		;;
Packit Service 768a21
	e500v[12]-*)
Packit Service 768a21
		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit Service 768a21
		os=$os"spe"
Packit Service 768a21
		;;
Packit 130fc8
	ebmon29k)
Packit 130fc8
		basic_machine=a29k-amd
Packit 130fc8
		os=-ebmon
Packit 130fc8
		;;
Packit 130fc8
	elxsi)
Packit 130fc8
		basic_machine=elxsi-elxsi
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	encore | umax | mmax)
Packit 130fc8
		basic_machine=ns32k-encore
Packit 130fc8
		;;
Packit 130fc8
	es1800 | OSE68k | ose68k | ose | OSE)
Packit 130fc8
		basic_machine=m68k-ericsson
Packit 130fc8
		os=-ose
Packit 130fc8
		;;
Packit 130fc8
	fx2800)
Packit 130fc8
		basic_machine=i860-alliant
Packit 130fc8
		;;
Packit 130fc8
	genix)
Packit 130fc8
		basic_machine=ns32k-ns
Packit 130fc8
		;;
Packit 130fc8
	gmicro)
Packit 130fc8
		basic_machine=tron-gmicro
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	go32)
Packit 130fc8
		basic_machine=i386-pc
Packit 130fc8
		os=-go32
Packit 130fc8
		;;
Packit 130fc8
	h3050r* | hiux*)
Packit 130fc8
		basic_machine=hppa1.1-hitachi
Packit 130fc8
		os=-hiuxwe2
Packit 130fc8
		;;
Packit 130fc8
	h8300hms)
Packit 130fc8
		basic_machine=h8300-hitachi
Packit 130fc8
		os=-hms
Packit 130fc8
		;;
Packit 130fc8
	h8300xray)
Packit 130fc8
		basic_machine=h8300-hitachi
Packit 130fc8
		os=-xray
Packit 130fc8
		;;
Packit 130fc8
	h8500hms)
Packit 130fc8
		basic_machine=h8500-hitachi
Packit 130fc8
		os=-hms
Packit 130fc8
		;;
Packit 130fc8
	harris)
Packit 130fc8
		basic_machine=m88k-harris
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit 130fc8
	hp300-*)
Packit 130fc8
		basic_machine=m68k-hp
Packit 130fc8
		;;
Packit 130fc8
	hp300bsd)
Packit 130fc8
		basic_machine=m68k-hp
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	hp300hpux)
Packit 130fc8
		basic_machine=m68k-hp
Packit 130fc8
		os=-hpux
Packit 130fc8
		;;
Packit 130fc8
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
Packit 130fc8
		basic_machine=hppa1.0-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k2[0-9][0-9] | hp9k31[0-9])
Packit 130fc8
		basic_machine=m68000-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k3[2-9][0-9])
Packit 130fc8
		basic_machine=m68k-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k6[0-9][0-9] | hp6[0-9][0-9])
Packit 130fc8
		basic_machine=hppa1.0-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k7[0-79][0-9] | hp7[0-79][0-9])
Packit 130fc8
		basic_machine=hppa1.1-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k78[0-9] | hp78[0-9])
Packit 130fc8
		# FIXME: really hppa2.0-hp
Packit 130fc8
		basic_machine=hppa1.1-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
Packit 130fc8
		# FIXME: really hppa2.0-hp
Packit 130fc8
		basic_machine=hppa1.1-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k8[0-9][13679] | hp8[0-9][13679])
Packit 130fc8
		basic_machine=hppa1.1-hp
Packit 130fc8
		;;
Packit 130fc8
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
Packit 130fc8
		basic_machine=hppa1.0-hp
Packit 130fc8
		;;
Packit 130fc8
	hppaosf)
Packit 130fc8
		basic_machine=hppa1.1-hp
Packit 130fc8
		os=-osf
Packit 130fc8
		;;
Packit 130fc8
	hppro)
Packit 130fc8
		basic_machine=hppa1.1-hp
Packit 130fc8
		os=-proelf
Packit 130fc8
		;;
Packit 130fc8
	i370-ibm* | ibm*)
Packit 130fc8
		basic_machine=i370-ibm
Packit 130fc8
		;;
Packit 130fc8
	i*86v32)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
Packit 130fc8
		os=-sysv32
Packit 130fc8
		;;
Packit 130fc8
	i*86v4*)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	i*86v)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	i*86sol2)
Packit Service 768a21
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
Packit 130fc8
		os=-solaris2
Packit 130fc8
		;;
Packit 130fc8
	i386mach)
Packit 130fc8
		basic_machine=i386-mach
Packit 130fc8
		os=-mach
Packit 130fc8
		;;
Packit Service 768a21
	vsta)
Packit 130fc8
		basic_machine=i386-unknown
Packit 130fc8
		os=-vsta
Packit 130fc8
		;;
Packit 130fc8
	iris | iris4d)
Packit 130fc8
		basic_machine=mips-sgi
Packit 130fc8
		case $os in
Packit 130fc8
		    -irix*)
Packit 130fc8
			;;
Packit 130fc8
		    *)
Packit 130fc8
			os=-irix4
Packit 130fc8
			;;
Packit 130fc8
		esac
Packit 130fc8
		;;
Packit 130fc8
	isi68 | isi)
Packit 130fc8
		basic_machine=m68k-isi
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	leon-*|leon[3-9]-*)
Packit Service 768a21
		basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
Packit 130fc8
		;;
Packit 130fc8
	m68knommu)
Packit 130fc8
		basic_machine=m68k-unknown
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	m68knommu-*)
Packit Service 768a21
		basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	magnum | m3230)
Packit 130fc8
		basic_machine=mips-mips
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	merlin)
Packit 130fc8
		basic_machine=ns32k-utek
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	microblaze*)
Packit 130fc8
		basic_machine=microblaze-xilinx
Packit 130fc8
		;;
Packit 130fc8
	mingw64)
Packit 130fc8
		basic_machine=x86_64-pc
Packit 130fc8
		os=-mingw64
Packit 130fc8
		;;
Packit 130fc8
	mingw32)
Packit 130fc8
		basic_machine=i686-pc
Packit 130fc8
		os=-mingw32
Packit 130fc8
		;;
Packit 130fc8
	mingw32ce)
Packit 130fc8
		basic_machine=arm-unknown
Packit 130fc8
		os=-mingw32ce
Packit 130fc8
		;;
Packit 130fc8
	miniframe)
Packit 130fc8
		basic_machine=m68000-convergent
Packit 130fc8
		;;
Packit 130fc8
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
Packit 130fc8
		basic_machine=m68k-atari
Packit 130fc8
		os=-mint
Packit 130fc8
		;;
Packit 130fc8
	mips3*-*)
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
Packit 130fc8
		;;
Packit 130fc8
	mips3*)
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
Packit 130fc8
		;;
Packit 130fc8
	monitor)
Packit 130fc8
		basic_machine=m68k-rom68k
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	morphos)
Packit 130fc8
		basic_machine=powerpc-unknown
Packit 130fc8
		os=-morphos
Packit 130fc8
		;;
Packit 130fc8
	moxiebox)
Packit 130fc8
		basic_machine=moxie-unknown
Packit 130fc8
		os=-moxiebox
Packit 130fc8
		;;
Packit 130fc8
	msdos)
Packit 130fc8
		basic_machine=i386-pc
Packit 130fc8
		os=-msdos
Packit 130fc8
		;;
Packit 130fc8
	ms1-*)
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
Packit 130fc8
		;;
Packit 130fc8
	msys)
Packit 130fc8
		basic_machine=i686-pc
Packit 130fc8
		os=-msys
Packit 130fc8
		;;
Packit 130fc8
	mvs)
Packit 130fc8
		basic_machine=i370-ibm
Packit 130fc8
		os=-mvs
Packit 130fc8
		;;
Packit 130fc8
	nacl)
Packit 130fc8
		basic_machine=le32-unknown
Packit 130fc8
		os=-nacl
Packit 130fc8
		;;
Packit 130fc8
	ncr3000)
Packit 130fc8
		basic_machine=i486-ncr
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	netbsd386)
Packit 130fc8
		basic_machine=i386-unknown
Packit 130fc8
		os=-netbsd
Packit 130fc8
		;;
Packit 130fc8
	netwinder)
Packit 130fc8
		basic_machine=armv4l-rebel
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	news | news700 | news800 | news900)
Packit 130fc8
		basic_machine=m68k-sony
Packit 130fc8
		os=-newsos
Packit 130fc8
		;;
Packit 130fc8
	news1000)
Packit 130fc8
		basic_machine=m68030-sony
Packit 130fc8
		os=-newsos
Packit 130fc8
		;;
Packit 130fc8
	news-3600 | risc-news)
Packit 130fc8
		basic_machine=mips-sony
Packit 130fc8
		os=-newsos
Packit 130fc8
		;;
Packit 130fc8
	necv70)
Packit 130fc8
		basic_machine=v70-nec
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit Service 768a21
	next | m*-next)
Packit 130fc8
		basic_machine=m68k-next
Packit 130fc8
		case $os in
Packit 130fc8
		    -nextstep* )
Packit 130fc8
			;;
Packit 130fc8
		    -ns2*)
Packit 130fc8
		      os=-nextstep2
Packit 130fc8
			;;
Packit 130fc8
		    *)
Packit 130fc8
		      os=-nextstep3
Packit 130fc8
			;;
Packit 130fc8
		esac
Packit 130fc8
		;;
Packit 130fc8
	nh3000)
Packit 130fc8
		basic_machine=m68k-harris
Packit 130fc8
		os=-cxux
Packit 130fc8
		;;
Packit 130fc8
	nh[45]000)
Packit 130fc8
		basic_machine=m88k-harris
Packit 130fc8
		os=-cxux
Packit 130fc8
		;;
Packit 130fc8
	nindy960)
Packit 130fc8
		basic_machine=i960-intel
Packit 130fc8
		os=-nindy
Packit 130fc8
		;;
Packit 130fc8
	mon960)
Packit 130fc8
		basic_machine=i960-intel
Packit 130fc8
		os=-mon960
Packit 130fc8
		;;
Packit 130fc8
	nonstopux)
Packit 130fc8
		basic_machine=mips-compaq
Packit 130fc8
		os=-nonstopux
Packit 130fc8
		;;
Packit 130fc8
	np1)
Packit 130fc8
		basic_machine=np1-gould
Packit 130fc8
		;;
Packit 130fc8
	neo-tandem)
Packit 130fc8
		basic_machine=neo-tandem
Packit 130fc8
		;;
Packit 130fc8
	nse-tandem)
Packit 130fc8
		basic_machine=nse-tandem
Packit 130fc8
		;;
Packit 130fc8
	nsr-tandem)
Packit 130fc8
		basic_machine=nsr-tandem
Packit 130fc8
		;;
Packit Service 768a21
	nsv-tandem)
Packit Service 768a21
		basic_machine=nsv-tandem
Packit Service 768a21
		;;
Packit Service 768a21
	nsx-tandem)
Packit Service 768a21
		basic_machine=nsx-tandem
Packit Service 768a21
		;;
Packit 130fc8
	op50n-* | op60c-*)
Packit 130fc8
		basic_machine=hppa1.1-oki
Packit 130fc8
		os=-proelf
Packit 130fc8
		;;
Packit 130fc8
	openrisc | openrisc-*)
Packit 130fc8
		basic_machine=or32-unknown
Packit 130fc8
		;;
Packit 130fc8
	os400)
Packit 130fc8
		basic_machine=powerpc-ibm
Packit 130fc8
		os=-os400
Packit 130fc8
		;;
Packit 130fc8
	OSE68000 | ose68000)
Packit 130fc8
		basic_machine=m68000-ericsson
Packit 130fc8
		os=-ose
Packit 130fc8
		;;
Packit 130fc8
	os68k)
Packit 130fc8
		basic_machine=m68k-none
Packit 130fc8
		os=-os68k
Packit 130fc8
		;;
Packit 130fc8
	pa-hitachi)
Packit 130fc8
		basic_machine=hppa1.1-hitachi
Packit 130fc8
		os=-hiuxwe2
Packit 130fc8
		;;
Packit 130fc8
	paragon)
Packit 130fc8
		basic_machine=i860-intel
Packit 130fc8
		os=-osf
Packit 130fc8
		;;
Packit 130fc8
	parisc)
Packit 130fc8
		basic_machine=hppa-unknown
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	parisc-*)
Packit Service 768a21
		basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	pbd)
Packit 130fc8
		basic_machine=sparc-tti
Packit 130fc8
		;;
Packit 130fc8
	pbb)
Packit 130fc8
		basic_machine=m68k-tti
Packit 130fc8
		;;
Packit 130fc8
	pc532 | pc532-*)
Packit 130fc8
		basic_machine=ns32k-pc532
Packit 130fc8
		;;
Packit 130fc8
	pc98)
Packit 130fc8
		basic_machine=i386-pc
Packit 130fc8
		;;
Packit 130fc8
	pc98-*)
Packit Service 768a21
		basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	pentium | p5 | k5 | k6 | nexgen | viac3)
Packit 130fc8
		basic_machine=i586-pc
Packit 130fc8
		;;
Packit 130fc8
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
Packit 130fc8
		basic_machine=i686-pc
Packit 130fc8
		;;
Packit 130fc8
	pentiumii | pentium2 | pentiumiii | pentium3)
Packit 130fc8
		basic_machine=i686-pc
Packit 130fc8
		;;
Packit 130fc8
	pentium4)
Packit 130fc8
		basic_machine=i786-pc
Packit 130fc8
		;;
Packit 130fc8
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
Packit Service 768a21
		basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
Packit Service 768a21
		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
Packit Service 768a21
		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	pentium4-*)
Packit Service 768a21
		basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	pn)
Packit 130fc8
		basic_machine=pn-gould
Packit 130fc8
		;;
Packit 130fc8
	power)	basic_machine=power-ibm
Packit 130fc8
		;;
Packit 130fc8
	ppc | ppcbe)	basic_machine=powerpc-unknown
Packit 130fc8
		;;
Packit 130fc8
	ppc-* | ppcbe-*)
Packit Service 768a21
		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit Service 768a21
	ppcle | powerpclittle)
Packit 130fc8
		basic_machine=powerpcle-unknown
Packit 130fc8
		;;
Packit 130fc8
	ppcle-* | powerpclittle-*)
Packit Service 768a21
		basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	ppc64)	basic_machine=powerpc64-unknown
Packit 130fc8
		;;
Packit Service 768a21
	ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit Service 768a21
	ppc64le | powerpc64little)
Packit 130fc8
		basic_machine=powerpc64le-unknown
Packit 130fc8
		;;
Packit 130fc8
	ppc64le-* | powerpc64little-*)
Packit Service 768a21
		basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	ps2)
Packit 130fc8
		basic_machine=i386-ibm
Packit 130fc8
		;;
Packit 130fc8
	pw32)
Packit 130fc8
		basic_machine=i586-unknown
Packit 130fc8
		os=-pw32
Packit 130fc8
		;;
Packit 130fc8
	rdos | rdos64)
Packit 130fc8
		basic_machine=x86_64-pc
Packit 130fc8
		os=-rdos
Packit 130fc8
		;;
Packit 130fc8
	rdos32)
Packit 130fc8
		basic_machine=i386-pc
Packit 130fc8
		os=-rdos
Packit 130fc8
		;;
Packit 130fc8
	rom68k)
Packit 130fc8
		basic_machine=m68k-rom68k
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	rm[46]00)
Packit 130fc8
		basic_machine=mips-siemens
Packit 130fc8
		;;
Packit 130fc8
	rtpc | rtpc-*)
Packit 130fc8
		basic_machine=romp-ibm
Packit 130fc8
		;;
Packit 130fc8
	s390 | s390-*)
Packit 130fc8
		basic_machine=s390-ibm
Packit 130fc8
		;;
Packit 130fc8
	s390x | s390x-*)
Packit 130fc8
		basic_machine=s390x-ibm
Packit 130fc8
		;;
Packit 130fc8
	sa29200)
Packit 130fc8
		basic_machine=a29k-amd
Packit 130fc8
		os=-udi
Packit 130fc8
		;;
Packit 130fc8
	sb1)
Packit 130fc8
		basic_machine=mipsisa64sb1-unknown
Packit 130fc8
		;;
Packit 130fc8
	sb1el)
Packit 130fc8
		basic_machine=mipsisa64sb1el-unknown
Packit 130fc8
		;;
Packit 130fc8
	sde)
Packit 130fc8
		basic_machine=mipsisa32-sde
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	sei)
Packit 130fc8
		basic_machine=mips-sei
Packit 130fc8
		os=-seiux
Packit 130fc8
		;;
Packit 130fc8
	sequent)
Packit 130fc8
		basic_machine=i386-sequent
Packit 130fc8
		;;
Packit 130fc8
	sh5el)
Packit 130fc8
		basic_machine=sh5le-unknown
Packit 130fc8
		;;
Packit Service 768a21
	simso-wrs)
Packit 130fc8
		basic_machine=sparclite-wrs
Packit 130fc8
		os=-vxworks
Packit 130fc8
		;;
Packit 130fc8
	sps7)
Packit 130fc8
		basic_machine=m68k-bull
Packit 130fc8
		os=-sysv2
Packit 130fc8
		;;
Packit 130fc8
	spur)
Packit 130fc8
		basic_machine=spur-unknown
Packit 130fc8
		;;
Packit 130fc8
	st2000)
Packit 130fc8
		basic_machine=m68k-tandem
Packit 130fc8
		;;
Packit 130fc8
	stratus)
Packit 130fc8
		basic_machine=i860-stratus
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	strongarm-* | thumb-*)
Packit Service 768a21
		basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
Packit 130fc8
		;;
Packit 130fc8
	sun2)
Packit 130fc8
		basic_machine=m68000-sun
Packit 130fc8
		;;
Packit 130fc8
	sun2os3)
Packit 130fc8
		basic_machine=m68000-sun
Packit 130fc8
		os=-sunos3
Packit 130fc8
		;;
Packit 130fc8
	sun2os4)
Packit 130fc8
		basic_machine=m68000-sun
Packit 130fc8
		os=-sunos4
Packit 130fc8
		;;
Packit 130fc8
	sun3os3)
Packit 130fc8
		basic_machine=m68k-sun
Packit 130fc8
		os=-sunos3
Packit 130fc8
		;;
Packit 130fc8
	sun3os4)
Packit 130fc8
		basic_machine=m68k-sun
Packit 130fc8
		os=-sunos4
Packit 130fc8
		;;
Packit 130fc8
	sun4os3)
Packit 130fc8
		basic_machine=sparc-sun
Packit 130fc8
		os=-sunos3
Packit 130fc8
		;;
Packit 130fc8
	sun4os4)
Packit 130fc8
		basic_machine=sparc-sun
Packit 130fc8
		os=-sunos4
Packit 130fc8
		;;
Packit 130fc8
	sun4sol2)
Packit 130fc8
		basic_machine=sparc-sun
Packit 130fc8
		os=-solaris2
Packit 130fc8
		;;
Packit 130fc8
	sun3 | sun3-*)
Packit 130fc8
		basic_machine=m68k-sun
Packit 130fc8
		;;
Packit 130fc8
	sun4)
Packit 130fc8
		basic_machine=sparc-sun
Packit 130fc8
		;;
Packit 130fc8
	sun386 | sun386i | roadrunner)
Packit 130fc8
		basic_machine=i386-sun
Packit 130fc8
		;;
Packit 130fc8
	sv1)
Packit 130fc8
		basic_machine=sv1-cray
Packit 130fc8
		os=-unicos
Packit 130fc8
		;;
Packit 130fc8
	symmetry)
Packit 130fc8
		basic_machine=i386-sequent
Packit 130fc8
		os=-dynix
Packit 130fc8
		;;
Packit 130fc8
	t3e)
Packit 130fc8
		basic_machine=alphaev5-cray
Packit 130fc8
		os=-unicos
Packit 130fc8
		;;
Packit 130fc8
	t90)
Packit 130fc8
		basic_machine=t90-cray
Packit 130fc8
		os=-unicos
Packit 130fc8
		;;
Packit 130fc8
	tile*)
Packit 130fc8
		basic_machine=$basic_machine-unknown
Packit 130fc8
		os=-linux-gnu
Packit 130fc8
		;;
Packit 130fc8
	tx39)
Packit 130fc8
		basic_machine=mipstx39-unknown
Packit 130fc8
		;;
Packit 130fc8
	tx39el)
Packit 130fc8
		basic_machine=mipstx39el-unknown
Packit 130fc8
		;;
Packit 130fc8
	toad1)
Packit 130fc8
		basic_machine=pdp10-xkl
Packit 130fc8
		os=-tops20
Packit 130fc8
		;;
Packit 130fc8
	tower | tower-32)
Packit 130fc8
		basic_machine=m68k-ncr
Packit 130fc8
		;;
Packit 130fc8
	tpf)
Packit 130fc8
		basic_machine=s390x-ibm
Packit 130fc8
		os=-tpf
Packit 130fc8
		;;
Packit 130fc8
	udi29k)
Packit 130fc8
		basic_machine=a29k-amd
Packit 130fc8
		os=-udi
Packit 130fc8
		;;
Packit 130fc8
	ultra3)
Packit 130fc8
		basic_machine=a29k-nyu
Packit 130fc8
		os=-sym1
Packit 130fc8
		;;
Packit 130fc8
	v810 | necv810)
Packit 130fc8
		basic_machine=v810-nec
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit 130fc8
	vaxv)
Packit 130fc8
		basic_machine=vax-dec
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	vms)
Packit 130fc8
		basic_machine=vax-dec
Packit 130fc8
		os=-vms
Packit 130fc8
		;;
Packit 130fc8
	vpp*|vx|vx-*)
Packit 130fc8
		basic_machine=f301-fujitsu
Packit 130fc8
		;;
Packit 130fc8
	vxworks960)
Packit 130fc8
		basic_machine=i960-wrs
Packit 130fc8
		os=-vxworks
Packit 130fc8
		;;
Packit 130fc8
	vxworks68)
Packit 130fc8
		basic_machine=m68k-wrs
Packit 130fc8
		os=-vxworks
Packit 130fc8
		;;
Packit 130fc8
	vxworks29k)
Packit 130fc8
		basic_machine=a29k-wrs
Packit 130fc8
		os=-vxworks
Packit 130fc8
		;;
Packit 130fc8
	w65*)
Packit 130fc8
		basic_machine=w65-wdc
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit 130fc8
	w89k-*)
Packit 130fc8
		basic_machine=hppa1.1-winbond
Packit 130fc8
		os=-proelf
Packit 130fc8
		;;
Packit Service 768a21
	x64)
Packit Service 768a21
		basic_machine=x86_64-pc
Packit Service 768a21
		;;
Packit 130fc8
	xbox)
Packit 130fc8
		basic_machine=i686-pc
Packit 130fc8
		os=-mingw32
Packit 130fc8
		;;
Packit 130fc8
	xps | xps100)
Packit 130fc8
		basic_machine=xps100-honeywell
Packit 130fc8
		;;
Packit 130fc8
	xscale-* | xscalee[bl]-*)
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
Packit 130fc8
		;;
Packit 130fc8
	ymp)
Packit 130fc8
		basic_machine=ymp-cray
Packit 130fc8
		os=-unicos
Packit 130fc8
		;;
Packit 130fc8
	none)
Packit 130fc8
		basic_machine=none-none
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit 130fc8
Packit 130fc8
# Here we handle the default manufacturer of certain CPU types.  It is in
Packit 130fc8
# some cases the only manufacturer, in others, it is the most popular.
Packit 130fc8
	w89k)
Packit 130fc8
		basic_machine=hppa1.1-winbond
Packit 130fc8
		;;
Packit 130fc8
	op50n)
Packit 130fc8
		basic_machine=hppa1.1-oki
Packit 130fc8
		;;
Packit 130fc8
	op60c)
Packit 130fc8
		basic_machine=hppa1.1-oki
Packit 130fc8
		;;
Packit 130fc8
	romp)
Packit 130fc8
		basic_machine=romp-ibm
Packit 130fc8
		;;
Packit 130fc8
	mmix)
Packit 130fc8
		basic_machine=mmix-knuth
Packit 130fc8
		;;
Packit 130fc8
	rs6000)
Packit 130fc8
		basic_machine=rs6000-ibm
Packit 130fc8
		;;
Packit 130fc8
	vax)
Packit 130fc8
		basic_machine=vax-dec
Packit 130fc8
		;;
Packit 130fc8
	pdp11)
Packit 130fc8
		basic_machine=pdp11-dec
Packit 130fc8
		;;
Packit 130fc8
	we32k)
Packit 130fc8
		basic_machine=we32k-att
Packit 130fc8
		;;
Packit 130fc8
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
Packit 130fc8
		basic_machine=sh-unknown
Packit 130fc8
		;;
Packit 130fc8
	cydra)
Packit 130fc8
		basic_machine=cydra-cydrome
Packit 130fc8
		;;
Packit 130fc8
	orion)
Packit 130fc8
		basic_machine=orion-highlevel
Packit 130fc8
		;;
Packit 130fc8
	orion105)
Packit 130fc8
		basic_machine=clipper-highlevel
Packit 130fc8
		;;
Packit 130fc8
	mac | mpw | mac-mpw)
Packit 130fc8
		basic_machine=m68k-apple
Packit 130fc8
		;;
Packit 130fc8
	pmac | pmac-mpw)
Packit 130fc8
		basic_machine=powerpc-apple
Packit 130fc8
		;;
Packit 130fc8
	*-unknown)
Packit 130fc8
		# Make sure to match an already-canonicalized machine name.
Packit 130fc8
		;;
Packit 130fc8
	*)
Packit Service 768a21
		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
Packit 130fc8
		exit 1
Packit 130fc8
		;;
Packit 130fc8
esac
Packit 130fc8
Packit 130fc8
# Here we canonicalize certain aliases for manufacturers.
Packit 130fc8
case $basic_machine in
Packit 130fc8
	*-digital*)
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
Packit 130fc8
		;;
Packit 130fc8
	*-commodore*)
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
Packit 130fc8
		;;
Packit 130fc8
	*)
Packit 130fc8
		;;
Packit 130fc8
esac
Packit 130fc8
Packit 130fc8
# Decode manufacturer-specific aliases for certain operating systems.
Packit 130fc8
Packit Service 768a21
if [ x$os != x ]
Packit 130fc8
then
Packit 130fc8
case $os in
Packit Service 768a21
	# First match some system type aliases that might get confused
Packit Service 768a21
	# with valid system types.
Packit 130fc8
	# -solaris* is a basic system type, with this one exception.
Packit 130fc8
	-auroraux)
Packit 130fc8
		os=-auroraux
Packit 130fc8
		;;
Packit 130fc8
	-solaris1 | -solaris1.*)
Packit 130fc8
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
Packit 130fc8
		;;
Packit 130fc8
	-solaris)
Packit 130fc8
		os=-solaris2
Packit 130fc8
		;;
Packit 130fc8
	-unixware*)
Packit 130fc8
		os=-sysv4.2uw
Packit 130fc8
		;;
Packit 130fc8
	-gnu/linux*)
Packit 130fc8
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
Packit 130fc8
		;;
Packit Service 768a21
	# es1800 is here to avoid being matched by es* (a different OS)
Packit Service 768a21
	-es1800*)
Packit Service 768a21
		os=-ose
Packit Service 768a21
		;;
Packit Service 768a21
	# Now accept the basic system types.
Packit 130fc8
	# The portable systems comes first.
Packit Service 768a21
	# Each alternative MUST end in a * to match a version number.
Packit 130fc8
	# -sysv* is not here because it comes later, after sysvr4.
Packit 130fc8
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
Packit 130fc8
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
Packit 130fc8
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
Packit 130fc8
	      | -sym* | -kopensolaris* | -plan9* \
Packit 130fc8
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
Packit 130fc8
	      | -aos* | -aros* | -cloudabi* | -sortix* \
Packit 130fc8
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
Packit 130fc8
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
Packit Service 768a21
	      | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
Packit Service 768a21
	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
Packit 130fc8
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
Packit 130fc8
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
Packit 130fc8
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
Packit Service 768a21
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
Packit Service 768a21
	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
Packit 130fc8
	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
Packit Service 768a21
	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
Packit 130fc8
	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
Packit 130fc8
	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
Packit Service 768a21
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
Packit 130fc8
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
Packit 130fc8
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
Packit 130fc8
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
Packit Service 768a21
	      | -morphos* | -superux* | -rtmk* | -windiss* \
Packit 130fc8
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
Packit Service 768a21
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
Packit Service 768a21
	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
Packit Service 768a21
	      | -midnightbsd*)
Packit 130fc8
	# Remember, each alternative MUST END IN *, to match a version number.
Packit 130fc8
		;;
Packit 130fc8
	-qnx*)
Packit 130fc8
		case $basic_machine in
Packit 130fc8
		    x86-* | i*86-*)
Packit 130fc8
			;;
Packit 130fc8
		    *)
Packit 130fc8
			os=-nto$os
Packit 130fc8
			;;
Packit 130fc8
		esac
Packit 130fc8
		;;
Packit 130fc8
	-nto-qnx*)
Packit 130fc8
		;;
Packit 130fc8
	-nto*)
Packit 130fc8
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
Packit 130fc8
		;;
Packit Service 768a21
	-sim | -xray | -os68k* | -v88r* \
Packit Service 768a21
	      | -windows* | -osx | -abug | -netware* | -os9* \
Packit 130fc8
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
Packit 130fc8
		;;
Packit 130fc8
	-mac*)
Packit Service 768a21
		os=`echo "$os" | sed -e 's|mac|macos|'`
Packit 130fc8
		;;
Packit 130fc8
	-linux-dietlibc)
Packit 130fc8
		os=-linux-dietlibc
Packit 130fc8
		;;
Packit 130fc8
	-linux*)
Packit 130fc8
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
Packit 130fc8
		;;
Packit 130fc8
	-sunos5*)
Packit Service 768a21
		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
Packit 130fc8
		;;
Packit 130fc8
	-sunos6*)
Packit Service 768a21
		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
Packit 130fc8
		;;
Packit 130fc8
	-opened*)
Packit 130fc8
		os=-openedition
Packit 130fc8
		;;
Packit 130fc8
	-os400*)
Packit 130fc8
		os=-os400
Packit 130fc8
		;;
Packit 130fc8
	-wince*)
Packit 130fc8
		os=-wince
Packit 130fc8
		;;
Packit 130fc8
	-utek*)
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	-dynix*)
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	-acis*)
Packit 130fc8
		os=-aos
Packit 130fc8
		;;
Packit 130fc8
	-atheos*)
Packit 130fc8
		os=-atheos
Packit 130fc8
		;;
Packit 130fc8
	-syllable*)
Packit 130fc8
		os=-syllable
Packit 130fc8
		;;
Packit 130fc8
	-386bsd)
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	-ctix* | -uts*)
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	-nova*)
Packit 130fc8
		os=-rtmk-nova
Packit 130fc8
		;;
Packit Service 768a21
	-ns2)
Packit 130fc8
		os=-nextstep2
Packit 130fc8
		;;
Packit 130fc8
	-nsk*)
Packit 130fc8
		os=-nsk
Packit 130fc8
		;;
Packit 130fc8
	# Preserve the version number of sinix5.
Packit 130fc8
	-sinix5.*)
Packit 130fc8
		os=`echo $os | sed -e 's|sinix|sysv|'`
Packit 130fc8
		;;
Packit 130fc8
	-sinix*)
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	-tpf*)
Packit 130fc8
		os=-tpf
Packit 130fc8
		;;
Packit 130fc8
	-triton*)
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit 130fc8
	-oss*)
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit Service 768a21
	-svr4*)
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	-svr3)
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit 130fc8
	-sysvr4)
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	# This must come after -sysvr4.
Packit 130fc8
	-sysv*)
Packit 130fc8
		;;
Packit 130fc8
	-ose*)
Packit 130fc8
		os=-ose
Packit 130fc8
		;;
Packit 130fc8
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
Packit 130fc8
		os=-mint
Packit 130fc8
		;;
Packit 130fc8
	-zvmoe)
Packit 130fc8
		os=-zvmoe
Packit 130fc8
		;;
Packit 130fc8
	-dicos*)
Packit 130fc8
		os=-dicos
Packit 130fc8
		;;
Packit Service 768a21
	-pikeos*)
Packit Service 768a21
		# Until real need of OS specific support for
Packit Service 768a21
		# particular features comes up, bare metal
Packit Service 768a21
		# configurations are quite functional.
Packit Service 768a21
		case $basic_machine in
Packit Service 768a21
		    arm*)
Packit Service 768a21
			os=-eabi
Packit Service 768a21
			;;
Packit Service 768a21
		    *)
Packit Service 768a21
			os=-elf
Packit Service 768a21
			;;
Packit Service 768a21
		esac
Packit Service 768a21
		;;
Packit 130fc8
	-nacl*)
Packit 130fc8
		;;
Packit Service 768a21
	-ios)
Packit Service 768a21
		;;
Packit 130fc8
	-none)
Packit 130fc8
		;;
Packit Service 768a21
	-*-eabi)
Packit Service 768a21
		case $basic_machine in
Packit Service 768a21
		    arm*)
Packit Service 768a21
			;;
Packit Service 768a21
		esac
Packit Service 768a21
		;;
Packit 130fc8
	*)
Packit 130fc8
		# Get rid of the `-' at the beginning of $os.
Packit 130fc8
		os=`echo $os | sed 's/[^-]*-//'`
Packit Service 768a21
		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
Packit 130fc8
		exit 1
Packit 130fc8
		;;
Packit 130fc8
esac
Packit 130fc8
else
Packit 130fc8
Packit 130fc8
# Here we handle the default operating systems that come with various machines.
Packit 130fc8
# The value should be what the vendor currently ships out the door with their
Packit 130fc8
# machine or put another way, the most popular os provided with the machine.
Packit 130fc8
Packit 130fc8
# Note that if you're going to try to match "-MANUFACTURER" here (say,
Packit 130fc8
# "-sun"), then you have to tell the case statement up towards the top
Packit 130fc8
# that MANUFACTURER isn't an operating system.  Otherwise, code above
Packit 130fc8
# will signal an error saying that MANUFACTURER isn't an operating
Packit 130fc8
# system, and we'll never get to this point.
Packit 130fc8
Packit 130fc8
case $basic_machine in
Packit 130fc8
	score-*)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	spu-*)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	*-acorn)
Packit 130fc8
		os=-riscix1.2
Packit 130fc8
		;;
Packit 130fc8
	arm*-rebel)
Packit 130fc8
		os=-linux
Packit 130fc8
		;;
Packit 130fc8
	arm*-semi)
Packit 130fc8
		os=-aout
Packit 130fc8
		;;
Packit 130fc8
	c4x-* | tic4x-*)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	c8051-*)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	hexagon-*)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	tic54x-*)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	tic55x-*)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	tic6x-*)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	# This must come before the *-dec entry.
Packit 130fc8
	pdp10-*)
Packit 130fc8
		os=-tops20
Packit 130fc8
		;;
Packit 130fc8
	pdp11-*)
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit 130fc8
	*-dec | vax-*)
Packit 130fc8
		os=-ultrix4.2
Packit 130fc8
		;;
Packit 130fc8
	m68*-apollo)
Packit 130fc8
		os=-domain
Packit 130fc8
		;;
Packit 130fc8
	i386-sun)
Packit 130fc8
		os=-sunos4.0.2
Packit 130fc8
		;;
Packit 130fc8
	m68000-sun)
Packit 130fc8
		os=-sunos3
Packit 130fc8
		;;
Packit 130fc8
	m68*-cisco)
Packit 130fc8
		os=-aout
Packit 130fc8
		;;
Packit 130fc8
	mep-*)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	mips*-cisco)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	mips*-*)
Packit 130fc8
		os=-elf
Packit 130fc8
		;;
Packit 130fc8
	or32-*)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	*-tti)	# must be before sparc entry or we get the wrong os.
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit 130fc8
	sparc-* | *-sun)
Packit 130fc8
		os=-sunos4.1.1
Packit 130fc8
		;;
Packit Service 768a21
	pru-*)
Packit Service 768a21
		os=-elf
Packit Service 768a21
		;;
Packit 130fc8
	*-be)
Packit 130fc8
		os=-beos
Packit 130fc8
		;;
Packit 130fc8
	*-ibm)
Packit 130fc8
		os=-aix
Packit 130fc8
		;;
Packit 130fc8
	*-knuth)
Packit 130fc8
		os=-mmixware
Packit 130fc8
		;;
Packit 130fc8
	*-wec)
Packit 130fc8
		os=-proelf
Packit 130fc8
		;;
Packit 130fc8
	*-winbond)
Packit 130fc8
		os=-proelf
Packit 130fc8
		;;
Packit 130fc8
	*-oki)
Packit 130fc8
		os=-proelf
Packit 130fc8
		;;
Packit 130fc8
	*-hp)
Packit 130fc8
		os=-hpux
Packit 130fc8
		;;
Packit 130fc8
	*-hitachi)
Packit 130fc8
		os=-hiux
Packit 130fc8
		;;
Packit 130fc8
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	*-cbm)
Packit 130fc8
		os=-amigaos
Packit 130fc8
		;;
Packit 130fc8
	*-dg)
Packit 130fc8
		os=-dgux
Packit 130fc8
		;;
Packit 130fc8
	*-dolphin)
Packit 130fc8
		os=-sysv3
Packit 130fc8
		;;
Packit 130fc8
	m68k-ccur)
Packit 130fc8
		os=-rtu
Packit 130fc8
		;;
Packit 130fc8
	m88k-omron*)
Packit 130fc8
		os=-luna
Packit 130fc8
		;;
Packit Service 768a21
	*-next)
Packit 130fc8
		os=-nextstep
Packit 130fc8
		;;
Packit 130fc8
	*-sequent)
Packit 130fc8
		os=-ptx
Packit 130fc8
		;;
Packit 130fc8
	*-crds)
Packit 130fc8
		os=-unos
Packit 130fc8
		;;
Packit 130fc8
	*-ns)
Packit 130fc8
		os=-genix
Packit 130fc8
		;;
Packit 130fc8
	i370-*)
Packit 130fc8
		os=-mvs
Packit 130fc8
		;;
Packit 130fc8
	*-gould)
Packit 130fc8
		os=-sysv
Packit 130fc8
		;;
Packit 130fc8
	*-highlevel)
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	*-encore)
Packit 130fc8
		os=-bsd
Packit 130fc8
		;;
Packit 130fc8
	*-sgi)
Packit 130fc8
		os=-irix
Packit 130fc8
		;;
Packit 130fc8
	*-siemens)
Packit 130fc8
		os=-sysv4
Packit 130fc8
		;;
Packit 130fc8
	*-masscomp)
Packit 130fc8
		os=-rtu
Packit 130fc8
		;;
Packit 130fc8
	f30[01]-fujitsu | f700-fujitsu)
Packit 130fc8
		os=-uxpv
Packit 130fc8
		;;
Packit 130fc8
	*-rom68k)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	*-*bug)
Packit 130fc8
		os=-coff
Packit 130fc8
		;;
Packit 130fc8
	*-apple)
Packit 130fc8
		os=-macos
Packit 130fc8
		;;
Packit 130fc8
	*-atari*)
Packit 130fc8
		os=-mint
Packit 130fc8
		;;
Packit 130fc8
	*)
Packit 130fc8
		os=-none
Packit 130fc8
		;;
Packit 130fc8
esac
Packit 130fc8
fi
Packit 130fc8
Packit 130fc8
# Here we handle the case where we know the os, and the CPU type, but not the
Packit 130fc8
# manufacturer.  We pick the logical manufacturer.
Packit 130fc8
vendor=unknown
Packit 130fc8
case $basic_machine in
Packit 130fc8
	*-unknown)
Packit 130fc8
		case $os in
Packit 130fc8
			-riscix*)
Packit 130fc8
				vendor=acorn
Packit 130fc8
				;;
Packit 130fc8
			-sunos*)
Packit 130fc8
				vendor=sun
Packit 130fc8
				;;
Packit 130fc8
			-cnk*|-aix*)
Packit 130fc8
				vendor=ibm
Packit 130fc8
				;;
Packit 130fc8
			-beos*)
Packit 130fc8
				vendor=be
Packit 130fc8
				;;
Packit 130fc8
			-hpux*)
Packit 130fc8
				vendor=hp
Packit 130fc8
				;;
Packit 130fc8
			-mpeix*)
Packit 130fc8
				vendor=hp
Packit 130fc8
				;;
Packit 130fc8
			-hiux*)
Packit 130fc8
				vendor=hitachi
Packit 130fc8
				;;
Packit 130fc8
			-unos*)
Packit 130fc8
				vendor=crds
Packit 130fc8
				;;
Packit 130fc8
			-dgux*)
Packit 130fc8
				vendor=dg
Packit 130fc8
				;;
Packit 130fc8
			-luna*)
Packit 130fc8
				vendor=omron
Packit 130fc8
				;;
Packit 130fc8
			-genix*)
Packit 130fc8
				vendor=ns
Packit 130fc8
				;;
Packit 130fc8
			-mvs* | -opened*)
Packit 130fc8
				vendor=ibm
Packit 130fc8
				;;
Packit 130fc8
			-os400*)
Packit 130fc8
				vendor=ibm
Packit 130fc8
				;;
Packit 130fc8
			-ptx*)
Packit 130fc8
				vendor=sequent
Packit 130fc8
				;;
Packit 130fc8
			-tpf*)
Packit 130fc8
				vendor=ibm
Packit 130fc8
				;;
Packit 130fc8
			-vxsim* | -vxworks* | -windiss*)
Packit 130fc8
				vendor=wrs
Packit 130fc8
				;;
Packit 130fc8
			-aux*)
Packit 130fc8
				vendor=apple
Packit 130fc8
				;;
Packit 130fc8
			-hms*)
Packit 130fc8
				vendor=hitachi
Packit 130fc8
				;;
Packit 130fc8
			-mpw* | -macos*)
Packit 130fc8
				vendor=apple
Packit 130fc8
				;;
Packit 130fc8
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
Packit 130fc8
				vendor=atari
Packit 130fc8
				;;
Packit 130fc8
			-vos*)
Packit 130fc8
				vendor=stratus
Packit 130fc8
				;;
Packit 130fc8
		esac
Packit Service 768a21
		basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
Packit 130fc8
		;;
Packit 130fc8
esac
Packit 130fc8
Packit Service 768a21
echo "$basic_machine$os"
Packit 130fc8
exit
Packit 130fc8
Packit 130fc8
# Local variables:
Packit Service 768a21
# eval: (add-hook 'before-save-hook 'time-stamp)
Packit 130fc8
# time-stamp-start: "timestamp='"
Packit 130fc8
# time-stamp-format: "%:y-%02m-%02d"
Packit 130fc8
# time-stamp-end: "'"
Packit 130fc8
# End: