xref: /aosp_15_r20/external/libcups/config.sub (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker#! /bin/sh
2*5e7646d2SAndroid Build Coastguard Worker# Configuration validation subroutine script.
3*5e7646d2SAndroid Build Coastguard Worker#   Copyright 1992-2013 Free Software Foundation, Inc.
4*5e7646d2SAndroid Build Coastguard Worker
5*5e7646d2SAndroid Build Coastguard Workertimestamp='2013-10-01'
6*5e7646d2SAndroid Build Coastguard Worker
7*5e7646d2SAndroid Build Coastguard Worker# This file is free software; you can redistribute it and/or modify it
8*5e7646d2SAndroid Build Coastguard Worker# under the terms of the GNU General Public License as published by
9*5e7646d2SAndroid Build Coastguard Worker# the Free Software Foundation; either version 3 of the License, or
10*5e7646d2SAndroid Build Coastguard Worker# (at your option) any later version.
11*5e7646d2SAndroid Build Coastguard Worker#
12*5e7646d2SAndroid Build Coastguard Worker# This program is distributed in the hope that it will be useful, but
13*5e7646d2SAndroid Build Coastguard Worker# WITHOUT ANY WARRANTY; without even the implied warranty of
14*5e7646d2SAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15*5e7646d2SAndroid Build Coastguard Worker# General Public License for more details.
16*5e7646d2SAndroid Build Coastguard Worker#
17*5e7646d2SAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License
18*5e7646d2SAndroid Build Coastguard Worker# along with this program; if not, see <http://www.gnu.org/licenses/>.
19*5e7646d2SAndroid Build Coastguard Worker#
20*5e7646d2SAndroid Build Coastguard Worker# As a special exception to the GNU General Public License, if you
21*5e7646d2SAndroid Build Coastguard Worker# distribute this file as part of a program that contains a
22*5e7646d2SAndroid Build Coastguard Worker# configuration script generated by Autoconf, you may include it under
23*5e7646d2SAndroid Build Coastguard Worker# the same distribution terms that you use for the rest of that
24*5e7646d2SAndroid Build Coastguard Worker# program.  This Exception is an additional permission under section 7
25*5e7646d2SAndroid Build Coastguard Worker# of the GNU General Public License, version 3 ("GPLv3").
26*5e7646d2SAndroid Build Coastguard Worker
27*5e7646d2SAndroid Build Coastguard Worker
28*5e7646d2SAndroid Build Coastguard Worker# Please send patches with a ChangeLog entry to [email protected].
29*5e7646d2SAndroid Build Coastguard Worker#
30*5e7646d2SAndroid Build Coastguard Worker# Configuration subroutine to validate and canonicalize a configuration type.
31*5e7646d2SAndroid Build Coastguard Worker# Supply the specified configuration type as an argument.
32*5e7646d2SAndroid Build Coastguard Worker# If it is invalid, we print an error message on stderr and exit with code 1.
33*5e7646d2SAndroid Build Coastguard Worker# Otherwise, we print the canonical config type on stdout and succeed.
34*5e7646d2SAndroid Build Coastguard Worker
35*5e7646d2SAndroid Build Coastguard Worker# You can get the latest version of this script from:
36*5e7646d2SAndroid Build Coastguard Worker# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
37*5e7646d2SAndroid Build Coastguard Worker
38*5e7646d2SAndroid Build Coastguard Worker# This file is supposed to be the same for all GNU packages
39*5e7646d2SAndroid Build Coastguard Worker# and recognize all the CPU types, system types and aliases
40*5e7646d2SAndroid Build Coastguard Worker# that are meaningful with *any* GNU software.
41*5e7646d2SAndroid Build Coastguard Worker# Each package is responsible for reporting which valid configurations
42*5e7646d2SAndroid Build Coastguard Worker# it does not support.  The user should be able to distinguish
43*5e7646d2SAndroid Build Coastguard Worker# a failure to support a valid configuration from a meaningless
44*5e7646d2SAndroid Build Coastguard Worker# configuration.
45*5e7646d2SAndroid Build Coastguard Worker
46*5e7646d2SAndroid Build Coastguard Worker# The goal of this file is to map all the various variations of a given
47*5e7646d2SAndroid Build Coastguard Worker# machine specification into a single specification in the form:
48*5e7646d2SAndroid Build Coastguard Worker#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49*5e7646d2SAndroid Build Coastguard Worker# or in some cases, the newer four-part form:
50*5e7646d2SAndroid Build Coastguard Worker#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51*5e7646d2SAndroid Build Coastguard Worker# It is wrong to echo any other type of specification.
52*5e7646d2SAndroid Build Coastguard Worker
53*5e7646d2SAndroid Build Coastguard Workerme=`echo "$0" | sed -e 's,.*/,,'`
54*5e7646d2SAndroid Build Coastguard Worker
55*5e7646d2SAndroid Build Coastguard Workerusage="\
56*5e7646d2SAndroid Build Coastguard WorkerUsage: $0 [OPTION] CPU-MFR-OPSYS
57*5e7646d2SAndroid Build Coastguard Worker       $0 [OPTION] ALIAS
58*5e7646d2SAndroid Build Coastguard Worker
59*5e7646d2SAndroid Build Coastguard WorkerCanonicalize a configuration name.
60*5e7646d2SAndroid Build Coastguard Worker
61*5e7646d2SAndroid Build Coastguard WorkerOperation modes:
62*5e7646d2SAndroid Build Coastguard Worker  -h, --help         print this help, then exit
63*5e7646d2SAndroid Build Coastguard Worker  -t, --time-stamp   print date of last modification, then exit
64*5e7646d2SAndroid Build Coastguard Worker  -v, --version      print version number, then exit
65*5e7646d2SAndroid Build Coastguard Worker
66*5e7646d2SAndroid Build Coastguard WorkerReport bugs and patches to <[email protected]>."
67*5e7646d2SAndroid Build Coastguard Worker
68*5e7646d2SAndroid Build Coastguard Workerversion="\
69*5e7646d2SAndroid Build Coastguard WorkerGNU config.sub ($timestamp)
70*5e7646d2SAndroid Build Coastguard Worker
71*5e7646d2SAndroid Build Coastguard WorkerCopyright 1992-2013 Free Software Foundation, Inc.
72*5e7646d2SAndroid Build Coastguard Worker
73*5e7646d2SAndroid Build Coastguard WorkerThis is free software; see the source for copying conditions.  There is NO
74*5e7646d2SAndroid Build Coastguard Workerwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
75*5e7646d2SAndroid Build Coastguard Worker
76*5e7646d2SAndroid Build Coastguard Workerhelp="
77*5e7646d2SAndroid Build Coastguard WorkerTry \`$me --help' for more information."
78*5e7646d2SAndroid Build Coastguard Worker
79*5e7646d2SAndroid Build Coastguard Worker# Parse command line
80*5e7646d2SAndroid Build Coastguard Workerwhile test $# -gt 0 ; do
81*5e7646d2SAndroid Build Coastguard Worker  case $1 in
82*5e7646d2SAndroid Build Coastguard Worker    --time-stamp | --time* | -t )
83*5e7646d2SAndroid Build Coastguard Worker       echo "$timestamp" ; exit ;;
84*5e7646d2SAndroid Build Coastguard Worker    --version | -v )
85*5e7646d2SAndroid Build Coastguard Worker       echo "$version" ; exit ;;
86*5e7646d2SAndroid Build Coastguard Worker    --help | --h* | -h )
87*5e7646d2SAndroid Build Coastguard Worker       echo "$usage"; exit ;;
88*5e7646d2SAndroid Build Coastguard Worker    -- )     # Stop option processing
89*5e7646d2SAndroid Build Coastguard Worker       shift; break ;;
90*5e7646d2SAndroid Build Coastguard Worker    - )	# Use stdin as input.
91*5e7646d2SAndroid Build Coastguard Worker       break ;;
92*5e7646d2SAndroid Build Coastguard Worker    -* )
93*5e7646d2SAndroid Build Coastguard Worker       echo "$me: invalid option $1$help"
94*5e7646d2SAndroid Build Coastguard Worker       exit 1 ;;
95*5e7646d2SAndroid Build Coastguard Worker
96*5e7646d2SAndroid Build Coastguard Worker    *local*)
97*5e7646d2SAndroid Build Coastguard Worker       # First pass through any local machine types.
98*5e7646d2SAndroid Build Coastguard Worker       echo $1
99*5e7646d2SAndroid Build Coastguard Worker       exit ;;
100*5e7646d2SAndroid Build Coastguard Worker
101*5e7646d2SAndroid Build Coastguard Worker    * )
102*5e7646d2SAndroid Build Coastguard Worker       break ;;
103*5e7646d2SAndroid Build Coastguard Worker  esac
104*5e7646d2SAndroid Build Coastguard Workerdone
105*5e7646d2SAndroid Build Coastguard Worker
106*5e7646d2SAndroid Build Coastguard Workercase $# in
107*5e7646d2SAndroid Build Coastguard Worker 0) echo "$me: missing argument$help" >&2
108*5e7646d2SAndroid Build Coastguard Worker    exit 1;;
109*5e7646d2SAndroid Build Coastguard Worker 1) ;;
110*5e7646d2SAndroid Build Coastguard Worker *) echo "$me: too many arguments$help" >&2
111*5e7646d2SAndroid Build Coastguard Worker    exit 1;;
112*5e7646d2SAndroid Build Coastguard Workeresac
113*5e7646d2SAndroid Build Coastguard Worker
114*5e7646d2SAndroid Build Coastguard Worker# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
115*5e7646d2SAndroid Build Coastguard Worker# Here we must recognize all the valid KERNEL-OS combinations.
116*5e7646d2SAndroid Build Coastguard Workermaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
117*5e7646d2SAndroid Build Coastguard Workercase $maybe_os in
118*5e7646d2SAndroid Build Coastguard Worker  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
119*5e7646d2SAndroid Build Coastguard Worker  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
120*5e7646d2SAndroid Build Coastguard Worker  knetbsd*-gnu* | netbsd*-gnu* | \
121*5e7646d2SAndroid Build Coastguard Worker  kopensolaris*-gnu* | \
122*5e7646d2SAndroid Build Coastguard Worker  storm-chaos* | os2-emx* | rtmk-nova*)
123*5e7646d2SAndroid Build Coastguard Worker    os=-$maybe_os
124*5e7646d2SAndroid Build Coastguard Worker    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125*5e7646d2SAndroid Build Coastguard Worker    ;;
126*5e7646d2SAndroid Build Coastguard Worker  android-linux)
127*5e7646d2SAndroid Build Coastguard Worker    os=-linux-android
128*5e7646d2SAndroid Build Coastguard Worker    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
129*5e7646d2SAndroid Build Coastguard Worker    ;;
130*5e7646d2SAndroid Build Coastguard Worker  *)
131*5e7646d2SAndroid Build Coastguard Worker    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132*5e7646d2SAndroid Build Coastguard Worker    if [ $basic_machine != $1 ]
133*5e7646d2SAndroid Build Coastguard Worker    then os=`echo $1 | sed 's/.*-/-/'`
134*5e7646d2SAndroid Build Coastguard Worker    else os=; fi
135*5e7646d2SAndroid Build Coastguard Worker    ;;
136*5e7646d2SAndroid Build Coastguard Workeresac
137*5e7646d2SAndroid Build Coastguard Worker
138*5e7646d2SAndroid Build Coastguard Worker### Let's recognize common machines as not being operating systems so
139*5e7646d2SAndroid Build Coastguard Worker### that things like config.sub decstation-3100 work.  We also
140*5e7646d2SAndroid Build Coastguard Worker### recognize some manufacturers as not being operating systems, so we
141*5e7646d2SAndroid Build Coastguard Worker### can provide default operating systems below.
142*5e7646d2SAndroid Build Coastguard Workercase $os in
143*5e7646d2SAndroid Build Coastguard Worker	-sun*os*)
144*5e7646d2SAndroid Build Coastguard Worker		# Prevent following clause from handling this invalid input.
145*5e7646d2SAndroid Build Coastguard Worker		;;
146*5e7646d2SAndroid Build Coastguard Worker	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
147*5e7646d2SAndroid Build Coastguard Worker	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
148*5e7646d2SAndroid Build Coastguard Worker	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
149*5e7646d2SAndroid Build Coastguard Worker	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150*5e7646d2SAndroid Build Coastguard Worker	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151*5e7646d2SAndroid Build Coastguard Worker	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152*5e7646d2SAndroid Build Coastguard Worker	-apple | -axis | -knuth | -cray | -microblaze*)
153*5e7646d2SAndroid Build Coastguard Worker		os=
154*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$1
155*5e7646d2SAndroid Build Coastguard Worker		;;
156*5e7646d2SAndroid Build Coastguard Worker	-bluegene*)
157*5e7646d2SAndroid Build Coastguard Worker		os=-cnk
158*5e7646d2SAndroid Build Coastguard Worker		;;
159*5e7646d2SAndroid Build Coastguard Worker	-sim | -cisco | -oki | -wec | -winbond)
160*5e7646d2SAndroid Build Coastguard Worker		os=
161*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$1
162*5e7646d2SAndroid Build Coastguard Worker		;;
163*5e7646d2SAndroid Build Coastguard Worker	-scout)
164*5e7646d2SAndroid Build Coastguard Worker		;;
165*5e7646d2SAndroid Build Coastguard Worker	-wrs)
166*5e7646d2SAndroid Build Coastguard Worker		os=-vxworks
167*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$1
168*5e7646d2SAndroid Build Coastguard Worker		;;
169*5e7646d2SAndroid Build Coastguard Worker	-chorusos*)
170*5e7646d2SAndroid Build Coastguard Worker		os=-chorusos
171*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$1
172*5e7646d2SAndroid Build Coastguard Worker		;;
173*5e7646d2SAndroid Build Coastguard Worker	-chorusrdb)
174*5e7646d2SAndroid Build Coastguard Worker		os=-chorusrdb
175*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$1
176*5e7646d2SAndroid Build Coastguard Worker		;;
177*5e7646d2SAndroid Build Coastguard Worker	-hiux*)
178*5e7646d2SAndroid Build Coastguard Worker		os=-hiuxwe2
179*5e7646d2SAndroid Build Coastguard Worker		;;
180*5e7646d2SAndroid Build Coastguard Worker	-sco6)
181*5e7646d2SAndroid Build Coastguard Worker		os=-sco5v6
182*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183*5e7646d2SAndroid Build Coastguard Worker		;;
184*5e7646d2SAndroid Build Coastguard Worker	-sco5)
185*5e7646d2SAndroid Build Coastguard Worker		os=-sco3.2v5
186*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187*5e7646d2SAndroid Build Coastguard Worker		;;
188*5e7646d2SAndroid Build Coastguard Worker	-sco4)
189*5e7646d2SAndroid Build Coastguard Worker		os=-sco3.2v4
190*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191*5e7646d2SAndroid Build Coastguard Worker		;;
192*5e7646d2SAndroid Build Coastguard Worker	-sco3.2.[4-9]*)
193*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
194*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195*5e7646d2SAndroid Build Coastguard Worker		;;
196*5e7646d2SAndroid Build Coastguard Worker	-sco3.2v[4-9]*)
197*5e7646d2SAndroid Build Coastguard Worker		# Don't forget version if it is 3.2v4 or newer.
198*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199*5e7646d2SAndroid Build Coastguard Worker		;;
200*5e7646d2SAndroid Build Coastguard Worker	-sco5v6*)
201*5e7646d2SAndroid Build Coastguard Worker		# Don't forget version if it is 3.2v4 or newer.
202*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203*5e7646d2SAndroid Build Coastguard Worker		;;
204*5e7646d2SAndroid Build Coastguard Worker	-sco*)
205*5e7646d2SAndroid Build Coastguard Worker		os=-sco3.2v2
206*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207*5e7646d2SAndroid Build Coastguard Worker		;;
208*5e7646d2SAndroid Build Coastguard Worker	-udk*)
209*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210*5e7646d2SAndroid Build Coastguard Worker		;;
211*5e7646d2SAndroid Build Coastguard Worker	-isc)
212*5e7646d2SAndroid Build Coastguard Worker		os=-isc2.2
213*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214*5e7646d2SAndroid Build Coastguard Worker		;;
215*5e7646d2SAndroid Build Coastguard Worker	-clix*)
216*5e7646d2SAndroid Build Coastguard Worker		basic_machine=clipper-intergraph
217*5e7646d2SAndroid Build Coastguard Worker		;;
218*5e7646d2SAndroid Build Coastguard Worker	-isc*)
219*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
220*5e7646d2SAndroid Build Coastguard Worker		;;
221*5e7646d2SAndroid Build Coastguard Worker	-lynx*178)
222*5e7646d2SAndroid Build Coastguard Worker		os=-lynxos178
223*5e7646d2SAndroid Build Coastguard Worker		;;
224*5e7646d2SAndroid Build Coastguard Worker	-lynx*5)
225*5e7646d2SAndroid Build Coastguard Worker		os=-lynxos5
226*5e7646d2SAndroid Build Coastguard Worker		;;
227*5e7646d2SAndroid Build Coastguard Worker	-lynx*)
228*5e7646d2SAndroid Build Coastguard Worker		os=-lynxos
229*5e7646d2SAndroid Build Coastguard Worker		;;
230*5e7646d2SAndroid Build Coastguard Worker	-ptx*)
231*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
232*5e7646d2SAndroid Build Coastguard Worker		;;
233*5e7646d2SAndroid Build Coastguard Worker	-windowsnt*)
234*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's/windowsnt/winnt/'`
235*5e7646d2SAndroid Build Coastguard Worker		;;
236*5e7646d2SAndroid Build Coastguard Worker	-psos*)
237*5e7646d2SAndroid Build Coastguard Worker		os=-psos
238*5e7646d2SAndroid Build Coastguard Worker		;;
239*5e7646d2SAndroid Build Coastguard Worker	-mint | -mint[0-9]*)
240*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-atari
241*5e7646d2SAndroid Build Coastguard Worker		os=-mint
242*5e7646d2SAndroid Build Coastguard Worker		;;
243*5e7646d2SAndroid Build Coastguard Workeresac
244*5e7646d2SAndroid Build Coastguard Worker
245*5e7646d2SAndroid Build Coastguard Worker# Decode aliases for certain CPU-COMPANY combinations.
246*5e7646d2SAndroid Build Coastguard Workercase $basic_machine in
247*5e7646d2SAndroid Build Coastguard Worker	# Recognize the basic CPU types without company name.
248*5e7646d2SAndroid Build Coastguard Worker	# Some are omitted here because they have special meanings below.
249*5e7646d2SAndroid Build Coastguard Worker	1750a | 580 \
250*5e7646d2SAndroid Build Coastguard Worker	| a29k \
251*5e7646d2SAndroid Build Coastguard Worker	| aarch64 | aarch64_be \
252*5e7646d2SAndroid Build Coastguard Worker	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
253*5e7646d2SAndroid Build Coastguard Worker	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
254*5e7646d2SAndroid Build Coastguard Worker	| am33_2.0 \
255*5e7646d2SAndroid Build Coastguard Worker	| arc | arceb \
256*5e7646d2SAndroid Build Coastguard Worker	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
257*5e7646d2SAndroid Build Coastguard Worker	| avr | avr32 \
258*5e7646d2SAndroid Build Coastguard Worker	| be32 | be64 \
259*5e7646d2SAndroid Build Coastguard Worker	| bfin \
260*5e7646d2SAndroid Build Coastguard Worker	| c4x | c8051 | clipper \
261*5e7646d2SAndroid Build Coastguard Worker	| d10v | d30v | dlx | dsp16xx \
262*5e7646d2SAndroid Build Coastguard Worker	| epiphany \
263*5e7646d2SAndroid Build Coastguard Worker	| fido | fr30 | frv \
264*5e7646d2SAndroid Build Coastguard Worker	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265*5e7646d2SAndroid Build Coastguard Worker	| hexagon \
266*5e7646d2SAndroid Build Coastguard Worker	| i370 | i860 | i960 | ia64 \
267*5e7646d2SAndroid Build Coastguard Worker	| ip2k | iq2000 \
268*5e7646d2SAndroid Build Coastguard Worker	| k1om \
269*5e7646d2SAndroid Build Coastguard Worker	| le32 | le64 \
270*5e7646d2SAndroid Build Coastguard Worker	| lm32 \
271*5e7646d2SAndroid Build Coastguard Worker	| m32c | m32r | m32rle | m68000 | m68k | m88k \
272*5e7646d2SAndroid Build Coastguard Worker	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
273*5e7646d2SAndroid Build Coastguard Worker	| mips | mipsbe | mipseb | mipsel | mipsle \
274*5e7646d2SAndroid Build Coastguard Worker	| mips16 \
275*5e7646d2SAndroid Build Coastguard Worker	| mips64 | mips64el \
276*5e7646d2SAndroid Build Coastguard Worker	| mips64octeon | mips64octeonel \
277*5e7646d2SAndroid Build Coastguard Worker	| mips64orion | mips64orionel \
278*5e7646d2SAndroid Build Coastguard Worker	| mips64r5900 | mips64r5900el \
279*5e7646d2SAndroid Build Coastguard Worker	| mips64vr | mips64vrel \
280*5e7646d2SAndroid Build Coastguard Worker	| mips64vr4100 | mips64vr4100el \
281*5e7646d2SAndroid Build Coastguard Worker	| mips64vr4300 | mips64vr4300el \
282*5e7646d2SAndroid Build Coastguard Worker	| mips64vr5000 | mips64vr5000el \
283*5e7646d2SAndroid Build Coastguard Worker	| mips64vr5900 | mips64vr5900el \
284*5e7646d2SAndroid Build Coastguard Worker	| mipsisa32 | mipsisa32el \
285*5e7646d2SAndroid Build Coastguard Worker	| mipsisa32r2 | mipsisa32r2el \
286*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64 | mipsisa64el \
287*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64r2 | mipsisa64r2el \
288*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64sb1 | mipsisa64sb1el \
289*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64sr71k | mipsisa64sr71kel \
290*5e7646d2SAndroid Build Coastguard Worker	| mipsr5900 | mipsr5900el \
291*5e7646d2SAndroid Build Coastguard Worker	| mipstx39 | mipstx39el \
292*5e7646d2SAndroid Build Coastguard Worker	| mn10200 | mn10300 \
293*5e7646d2SAndroid Build Coastguard Worker	| moxie \
294*5e7646d2SAndroid Build Coastguard Worker	| mt \
295*5e7646d2SAndroid Build Coastguard Worker	| msp430 \
296*5e7646d2SAndroid Build Coastguard Worker	| nds32 | nds32le | nds32be \
297*5e7646d2SAndroid Build Coastguard Worker	| nios | nios2 | nios2eb | nios2el \
298*5e7646d2SAndroid Build Coastguard Worker	| ns16k | ns32k \
299*5e7646d2SAndroid Build Coastguard Worker	| open8 \
300*5e7646d2SAndroid Build Coastguard Worker	| or1k | or32 \
301*5e7646d2SAndroid Build Coastguard Worker	| pdp10 | pdp11 | pj | pjl \
302*5e7646d2SAndroid Build Coastguard Worker	| powerpc | powerpc64 | powerpc64le | powerpcle \
303*5e7646d2SAndroid Build Coastguard Worker	| pyramid \
304*5e7646d2SAndroid Build Coastguard Worker	| rl78 | rx \
305*5e7646d2SAndroid Build Coastguard Worker	| score \
306*5e7646d2SAndroid Build Coastguard Worker	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
307*5e7646d2SAndroid Build Coastguard Worker	| sh64 | sh64le \
308*5e7646d2SAndroid Build Coastguard Worker	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
309*5e7646d2SAndroid Build Coastguard Worker	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
310*5e7646d2SAndroid Build Coastguard Worker	| spu \
311*5e7646d2SAndroid Build Coastguard Worker	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
312*5e7646d2SAndroid Build Coastguard Worker	| ubicom32 \
313*5e7646d2SAndroid Build Coastguard Worker	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
314*5e7646d2SAndroid Build Coastguard Worker	| we32k \
315*5e7646d2SAndroid Build Coastguard Worker	| x86 | xc16x | xstormy16 | xtensa \
316*5e7646d2SAndroid Build Coastguard Worker	| z8k | z80)
317*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$basic_machine-unknown
318*5e7646d2SAndroid Build Coastguard Worker		;;
319*5e7646d2SAndroid Build Coastguard Worker	c54x)
320*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tic54x-unknown
321*5e7646d2SAndroid Build Coastguard Worker		;;
322*5e7646d2SAndroid Build Coastguard Worker	c55x)
323*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tic55x-unknown
324*5e7646d2SAndroid Build Coastguard Worker		;;
325*5e7646d2SAndroid Build Coastguard Worker	c6x)
326*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tic6x-unknown
327*5e7646d2SAndroid Build Coastguard Worker		;;
328*5e7646d2SAndroid Build Coastguard Worker	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
329*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$basic_machine-unknown
330*5e7646d2SAndroid Build Coastguard Worker		os=-none
331*5e7646d2SAndroid Build Coastguard Worker		;;
332*5e7646d2SAndroid Build Coastguard Worker	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
333*5e7646d2SAndroid Build Coastguard Worker		;;
334*5e7646d2SAndroid Build Coastguard Worker	ms1)
335*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mt-unknown
336*5e7646d2SAndroid Build Coastguard Worker		;;
337*5e7646d2SAndroid Build Coastguard Worker
338*5e7646d2SAndroid Build Coastguard Worker	strongarm | thumb | xscale)
339*5e7646d2SAndroid Build Coastguard Worker		basic_machine=arm-unknown
340*5e7646d2SAndroid Build Coastguard Worker		;;
341*5e7646d2SAndroid Build Coastguard Worker	xgate)
342*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$basic_machine-unknown
343*5e7646d2SAndroid Build Coastguard Worker		os=-none
344*5e7646d2SAndroid Build Coastguard Worker		;;
345*5e7646d2SAndroid Build Coastguard Worker	xscaleeb)
346*5e7646d2SAndroid Build Coastguard Worker		basic_machine=armeb-unknown
347*5e7646d2SAndroid Build Coastguard Worker		;;
348*5e7646d2SAndroid Build Coastguard Worker
349*5e7646d2SAndroid Build Coastguard Worker	xscaleel)
350*5e7646d2SAndroid Build Coastguard Worker		basic_machine=armel-unknown
351*5e7646d2SAndroid Build Coastguard Worker		;;
352*5e7646d2SAndroid Build Coastguard Worker
353*5e7646d2SAndroid Build Coastguard Worker	# We use `pc' rather than `unknown'
354*5e7646d2SAndroid Build Coastguard Worker	# because (1) that's what they normally are, and
355*5e7646d2SAndroid Build Coastguard Worker	# (2) the word "unknown" tends to confuse beginning users.
356*5e7646d2SAndroid Build Coastguard Worker	i*86 | x86_64)
357*5e7646d2SAndroid Build Coastguard Worker	  basic_machine=$basic_machine-pc
358*5e7646d2SAndroid Build Coastguard Worker	  ;;
359*5e7646d2SAndroid Build Coastguard Worker	# Object if more than one company name word.
360*5e7646d2SAndroid Build Coastguard Worker	*-*-*)
361*5e7646d2SAndroid Build Coastguard Worker		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
362*5e7646d2SAndroid Build Coastguard Worker		exit 1
363*5e7646d2SAndroid Build Coastguard Worker		;;
364*5e7646d2SAndroid Build Coastguard Worker	# Recognize the basic CPU types with company name.
365*5e7646d2SAndroid Build Coastguard Worker	580-* \
366*5e7646d2SAndroid Build Coastguard Worker	| a29k-* \
367*5e7646d2SAndroid Build Coastguard Worker	| aarch64-* | aarch64_be-* \
368*5e7646d2SAndroid Build Coastguard Worker	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
369*5e7646d2SAndroid Build Coastguard Worker	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
370*5e7646d2SAndroid Build Coastguard Worker	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
371*5e7646d2SAndroid Build Coastguard Worker	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
372*5e7646d2SAndroid Build Coastguard Worker	| avr-* | avr32-* \
373*5e7646d2SAndroid Build Coastguard Worker	| be32-* | be64-* \
374*5e7646d2SAndroid Build Coastguard Worker	| bfin-* | bs2000-* \
375*5e7646d2SAndroid Build Coastguard Worker	| c[123]* | c30-* | [cjt]90-* | c4x-* \
376*5e7646d2SAndroid Build Coastguard Worker	| c8051-* | clipper-* | craynv-* | cydra-* \
377*5e7646d2SAndroid Build Coastguard Worker	| d10v-* | d30v-* | dlx-* \
378*5e7646d2SAndroid Build Coastguard Worker	| elxsi-* \
379*5e7646d2SAndroid Build Coastguard Worker	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
380*5e7646d2SAndroid Build Coastguard Worker	| h8300-* | h8500-* \
381*5e7646d2SAndroid Build Coastguard Worker	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
382*5e7646d2SAndroid Build Coastguard Worker	| hexagon-* \
383*5e7646d2SAndroid Build Coastguard Worker	| i*86-* | i860-* | i960-* | ia64-* \
384*5e7646d2SAndroid Build Coastguard Worker	| ip2k-* | iq2000-* \
385*5e7646d2SAndroid Build Coastguard Worker	| k1om-* \
386*5e7646d2SAndroid Build Coastguard Worker	| le32-* | le64-* \
387*5e7646d2SAndroid Build Coastguard Worker	| lm32-* \
388*5e7646d2SAndroid Build Coastguard Worker	| m32c-* | m32r-* | m32rle-* \
389*5e7646d2SAndroid Build Coastguard Worker	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
390*5e7646d2SAndroid Build Coastguard Worker	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
391*5e7646d2SAndroid Build Coastguard Worker	| microblaze-* | microblazeel-* \
392*5e7646d2SAndroid Build Coastguard Worker	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
393*5e7646d2SAndroid Build Coastguard Worker	| mips16-* \
394*5e7646d2SAndroid Build Coastguard Worker	| mips64-* | mips64el-* \
395*5e7646d2SAndroid Build Coastguard Worker	| mips64octeon-* | mips64octeonel-* \
396*5e7646d2SAndroid Build Coastguard Worker	| mips64orion-* | mips64orionel-* \
397*5e7646d2SAndroid Build Coastguard Worker	| mips64r5900-* | mips64r5900el-* \
398*5e7646d2SAndroid Build Coastguard Worker	| mips64vr-* | mips64vrel-* \
399*5e7646d2SAndroid Build Coastguard Worker	| mips64vr4100-* | mips64vr4100el-* \
400*5e7646d2SAndroid Build Coastguard Worker	| mips64vr4300-* | mips64vr4300el-* \
401*5e7646d2SAndroid Build Coastguard Worker	| mips64vr5000-* | mips64vr5000el-* \
402*5e7646d2SAndroid Build Coastguard Worker	| mips64vr5900-* | mips64vr5900el-* \
403*5e7646d2SAndroid Build Coastguard Worker	| mipsisa32-* | mipsisa32el-* \
404*5e7646d2SAndroid Build Coastguard Worker	| mipsisa32r2-* | mipsisa32r2el-* \
405*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64-* | mipsisa64el-* \
406*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64r2-* | mipsisa64r2el-* \
407*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64sb1-* | mipsisa64sb1el-* \
408*5e7646d2SAndroid Build Coastguard Worker	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
409*5e7646d2SAndroid Build Coastguard Worker	| mipsr5900-* | mipsr5900el-* \
410*5e7646d2SAndroid Build Coastguard Worker	| mipstx39-* | mipstx39el-* \
411*5e7646d2SAndroid Build Coastguard Worker	| mmix-* \
412*5e7646d2SAndroid Build Coastguard Worker	| mt-* \
413*5e7646d2SAndroid Build Coastguard Worker	| msp430-* \
414*5e7646d2SAndroid Build Coastguard Worker	| nds32-* | nds32le-* | nds32be-* \
415*5e7646d2SAndroid Build Coastguard Worker	| nios-* | nios2-* | nios2eb-* | nios2el-* \
416*5e7646d2SAndroid Build Coastguard Worker	| none-* | np1-* | ns16k-* | ns32k-* \
417*5e7646d2SAndroid Build Coastguard Worker	| open8-* \
418*5e7646d2SAndroid Build Coastguard Worker	| orion-* \
419*5e7646d2SAndroid Build Coastguard Worker	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
420*5e7646d2SAndroid Build Coastguard Worker	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
421*5e7646d2SAndroid Build Coastguard Worker	| pyramid-* \
422*5e7646d2SAndroid Build Coastguard Worker	| rl78-* | romp-* | rs6000-* | rx-* \
423*5e7646d2SAndroid Build Coastguard Worker	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
424*5e7646d2SAndroid Build Coastguard Worker	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
425*5e7646d2SAndroid Build Coastguard Worker	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
426*5e7646d2SAndroid Build Coastguard Worker	| sparclite-* \
427*5e7646d2SAndroid Build Coastguard Worker	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
428*5e7646d2SAndroid Build Coastguard Worker	| tahoe-* \
429*5e7646d2SAndroid Build Coastguard Worker	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
430*5e7646d2SAndroid Build Coastguard Worker	| tile*-* \
431*5e7646d2SAndroid Build Coastguard Worker	| tron-* \
432*5e7646d2SAndroid Build Coastguard Worker	| ubicom32-* \
433*5e7646d2SAndroid Build Coastguard Worker	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
434*5e7646d2SAndroid Build Coastguard Worker	| vax-* \
435*5e7646d2SAndroid Build Coastguard Worker	| we32k-* \
436*5e7646d2SAndroid Build Coastguard Worker	| x86-* | x86_64-* | xc16x-* | xps100-* \
437*5e7646d2SAndroid Build Coastguard Worker	| xstormy16-* | xtensa*-* \
438*5e7646d2SAndroid Build Coastguard Worker	| ymp-* \
439*5e7646d2SAndroid Build Coastguard Worker	| z8k-* | z80-*)
440*5e7646d2SAndroid Build Coastguard Worker		;;
441*5e7646d2SAndroid Build Coastguard Worker	# Recognize the basic CPU types without company name, with glob match.
442*5e7646d2SAndroid Build Coastguard Worker	xtensa*)
443*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$basic_machine-unknown
444*5e7646d2SAndroid Build Coastguard Worker		;;
445*5e7646d2SAndroid Build Coastguard Worker	# Recognize the various machine names and aliases which stand
446*5e7646d2SAndroid Build Coastguard Worker	# for a CPU type and a company and sometimes even an OS.
447*5e7646d2SAndroid Build Coastguard Worker	386bsd)
448*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-unknown
449*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
450*5e7646d2SAndroid Build Coastguard Worker		;;
451*5e7646d2SAndroid Build Coastguard Worker	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
452*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-att
453*5e7646d2SAndroid Build Coastguard Worker		;;
454*5e7646d2SAndroid Build Coastguard Worker	3b*)
455*5e7646d2SAndroid Build Coastguard Worker		basic_machine=we32k-att
456*5e7646d2SAndroid Build Coastguard Worker		;;
457*5e7646d2SAndroid Build Coastguard Worker	a29khif)
458*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-amd
459*5e7646d2SAndroid Build Coastguard Worker		os=-udi
460*5e7646d2SAndroid Build Coastguard Worker		;;
461*5e7646d2SAndroid Build Coastguard Worker	abacus)
462*5e7646d2SAndroid Build Coastguard Worker		basic_machine=abacus-unknown
463*5e7646d2SAndroid Build Coastguard Worker		;;
464*5e7646d2SAndroid Build Coastguard Worker	adobe68k)
465*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68010-adobe
466*5e7646d2SAndroid Build Coastguard Worker		os=-scout
467*5e7646d2SAndroid Build Coastguard Worker		;;
468*5e7646d2SAndroid Build Coastguard Worker	alliant | fx80)
469*5e7646d2SAndroid Build Coastguard Worker		basic_machine=fx80-alliant
470*5e7646d2SAndroid Build Coastguard Worker		;;
471*5e7646d2SAndroid Build Coastguard Worker	altos | altos3068)
472*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-altos
473*5e7646d2SAndroid Build Coastguard Worker		;;
474*5e7646d2SAndroid Build Coastguard Worker	am29k)
475*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-none
476*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
477*5e7646d2SAndroid Build Coastguard Worker		;;
478*5e7646d2SAndroid Build Coastguard Worker	amd64)
479*5e7646d2SAndroid Build Coastguard Worker		basic_machine=x86_64-pc
480*5e7646d2SAndroid Build Coastguard Worker		;;
481*5e7646d2SAndroid Build Coastguard Worker	amd64-*)
482*5e7646d2SAndroid Build Coastguard Worker		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
483*5e7646d2SAndroid Build Coastguard Worker		;;
484*5e7646d2SAndroid Build Coastguard Worker	amdahl)
485*5e7646d2SAndroid Build Coastguard Worker		basic_machine=580-amdahl
486*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
487*5e7646d2SAndroid Build Coastguard Worker		;;
488*5e7646d2SAndroid Build Coastguard Worker	amiga | amiga-*)
489*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-unknown
490*5e7646d2SAndroid Build Coastguard Worker		;;
491*5e7646d2SAndroid Build Coastguard Worker	amigaos | amigados)
492*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-unknown
493*5e7646d2SAndroid Build Coastguard Worker		os=-amigaos
494*5e7646d2SAndroid Build Coastguard Worker		;;
495*5e7646d2SAndroid Build Coastguard Worker	amigaunix | amix)
496*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-unknown
497*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
498*5e7646d2SAndroid Build Coastguard Worker		;;
499*5e7646d2SAndroid Build Coastguard Worker	apollo68)
500*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-apollo
501*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
502*5e7646d2SAndroid Build Coastguard Worker		;;
503*5e7646d2SAndroid Build Coastguard Worker	apollo68bsd)
504*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-apollo
505*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
506*5e7646d2SAndroid Build Coastguard Worker		;;
507*5e7646d2SAndroid Build Coastguard Worker	aros)
508*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-pc
509*5e7646d2SAndroid Build Coastguard Worker		os=-aros
510*5e7646d2SAndroid Build Coastguard Worker		;;
511*5e7646d2SAndroid Build Coastguard Worker	aux)
512*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-apple
513*5e7646d2SAndroid Build Coastguard Worker		os=-aux
514*5e7646d2SAndroid Build Coastguard Worker		;;
515*5e7646d2SAndroid Build Coastguard Worker	balance)
516*5e7646d2SAndroid Build Coastguard Worker		basic_machine=ns32k-sequent
517*5e7646d2SAndroid Build Coastguard Worker		os=-dynix
518*5e7646d2SAndroid Build Coastguard Worker		;;
519*5e7646d2SAndroid Build Coastguard Worker	blackfin)
520*5e7646d2SAndroid Build Coastguard Worker		basic_machine=bfin-unknown
521*5e7646d2SAndroid Build Coastguard Worker		os=-linux
522*5e7646d2SAndroid Build Coastguard Worker		;;
523*5e7646d2SAndroid Build Coastguard Worker	blackfin-*)
524*5e7646d2SAndroid Build Coastguard Worker		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
525*5e7646d2SAndroid Build Coastguard Worker		os=-linux
526*5e7646d2SAndroid Build Coastguard Worker		;;
527*5e7646d2SAndroid Build Coastguard Worker	bluegene*)
528*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc-ibm
529*5e7646d2SAndroid Build Coastguard Worker		os=-cnk
530*5e7646d2SAndroid Build Coastguard Worker		;;
531*5e7646d2SAndroid Build Coastguard Worker	c54x-*)
532*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
533*5e7646d2SAndroid Build Coastguard Worker		;;
534*5e7646d2SAndroid Build Coastguard Worker	c55x-*)
535*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
536*5e7646d2SAndroid Build Coastguard Worker		;;
537*5e7646d2SAndroid Build Coastguard Worker	c6x-*)
538*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
539*5e7646d2SAndroid Build Coastguard Worker		;;
540*5e7646d2SAndroid Build Coastguard Worker	c90)
541*5e7646d2SAndroid Build Coastguard Worker		basic_machine=c90-cray
542*5e7646d2SAndroid Build Coastguard Worker		os=-unicos
543*5e7646d2SAndroid Build Coastguard Worker		;;
544*5e7646d2SAndroid Build Coastguard Worker	cegcc)
545*5e7646d2SAndroid Build Coastguard Worker		basic_machine=arm-unknown
546*5e7646d2SAndroid Build Coastguard Worker		os=-cegcc
547*5e7646d2SAndroid Build Coastguard Worker		;;
548*5e7646d2SAndroid Build Coastguard Worker	convex-c1)
549*5e7646d2SAndroid Build Coastguard Worker		basic_machine=c1-convex
550*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
551*5e7646d2SAndroid Build Coastguard Worker		;;
552*5e7646d2SAndroid Build Coastguard Worker	convex-c2)
553*5e7646d2SAndroid Build Coastguard Worker		basic_machine=c2-convex
554*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
555*5e7646d2SAndroid Build Coastguard Worker		;;
556*5e7646d2SAndroid Build Coastguard Worker	convex-c32)
557*5e7646d2SAndroid Build Coastguard Worker		basic_machine=c32-convex
558*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
559*5e7646d2SAndroid Build Coastguard Worker		;;
560*5e7646d2SAndroid Build Coastguard Worker	convex-c34)
561*5e7646d2SAndroid Build Coastguard Worker		basic_machine=c34-convex
562*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
563*5e7646d2SAndroid Build Coastguard Worker		;;
564*5e7646d2SAndroid Build Coastguard Worker	convex-c38)
565*5e7646d2SAndroid Build Coastguard Worker		basic_machine=c38-convex
566*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
567*5e7646d2SAndroid Build Coastguard Worker		;;
568*5e7646d2SAndroid Build Coastguard Worker	cray | j90)
569*5e7646d2SAndroid Build Coastguard Worker		basic_machine=j90-cray
570*5e7646d2SAndroid Build Coastguard Worker		os=-unicos
571*5e7646d2SAndroid Build Coastguard Worker		;;
572*5e7646d2SAndroid Build Coastguard Worker	craynv)
573*5e7646d2SAndroid Build Coastguard Worker		basic_machine=craynv-cray
574*5e7646d2SAndroid Build Coastguard Worker		os=-unicosmp
575*5e7646d2SAndroid Build Coastguard Worker		;;
576*5e7646d2SAndroid Build Coastguard Worker	cr16 | cr16-*)
577*5e7646d2SAndroid Build Coastguard Worker		basic_machine=cr16-unknown
578*5e7646d2SAndroid Build Coastguard Worker		os=-elf
579*5e7646d2SAndroid Build Coastguard Worker		;;
580*5e7646d2SAndroid Build Coastguard Worker	crds | unos)
581*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-crds
582*5e7646d2SAndroid Build Coastguard Worker		;;
583*5e7646d2SAndroid Build Coastguard Worker	crisv32 | crisv32-* | etraxfs*)
584*5e7646d2SAndroid Build Coastguard Worker		basic_machine=crisv32-axis
585*5e7646d2SAndroid Build Coastguard Worker		;;
586*5e7646d2SAndroid Build Coastguard Worker	cris | cris-* | etrax*)
587*5e7646d2SAndroid Build Coastguard Worker		basic_machine=cris-axis
588*5e7646d2SAndroid Build Coastguard Worker		;;
589*5e7646d2SAndroid Build Coastguard Worker	crx)
590*5e7646d2SAndroid Build Coastguard Worker		basic_machine=crx-unknown
591*5e7646d2SAndroid Build Coastguard Worker		os=-elf
592*5e7646d2SAndroid Build Coastguard Worker		;;
593*5e7646d2SAndroid Build Coastguard Worker	da30 | da30-*)
594*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-da30
595*5e7646d2SAndroid Build Coastguard Worker		;;
596*5e7646d2SAndroid Build Coastguard Worker	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
597*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-dec
598*5e7646d2SAndroid Build Coastguard Worker		;;
599*5e7646d2SAndroid Build Coastguard Worker	decsystem10* | dec10*)
600*5e7646d2SAndroid Build Coastguard Worker		basic_machine=pdp10-dec
601*5e7646d2SAndroid Build Coastguard Worker		os=-tops10
602*5e7646d2SAndroid Build Coastguard Worker		;;
603*5e7646d2SAndroid Build Coastguard Worker	decsystem20* | dec20*)
604*5e7646d2SAndroid Build Coastguard Worker		basic_machine=pdp10-dec
605*5e7646d2SAndroid Build Coastguard Worker		os=-tops20
606*5e7646d2SAndroid Build Coastguard Worker		;;
607*5e7646d2SAndroid Build Coastguard Worker	delta | 3300 | motorola-3300 | motorola-delta \
608*5e7646d2SAndroid Build Coastguard Worker	      | 3300-motorola | delta-motorola)
609*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-motorola
610*5e7646d2SAndroid Build Coastguard Worker		;;
611*5e7646d2SAndroid Build Coastguard Worker	delta88)
612*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m88k-motorola
613*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
614*5e7646d2SAndroid Build Coastguard Worker		;;
615*5e7646d2SAndroid Build Coastguard Worker	dicos)
616*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-pc
617*5e7646d2SAndroid Build Coastguard Worker		os=-dicos
618*5e7646d2SAndroid Build Coastguard Worker		;;
619*5e7646d2SAndroid Build Coastguard Worker	djgpp)
620*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i586-pc
621*5e7646d2SAndroid Build Coastguard Worker		os=-msdosdjgpp
622*5e7646d2SAndroid Build Coastguard Worker		;;
623*5e7646d2SAndroid Build Coastguard Worker	dpx20 | dpx20-*)
624*5e7646d2SAndroid Build Coastguard Worker		basic_machine=rs6000-bull
625*5e7646d2SAndroid Build Coastguard Worker		os=-bosx
626*5e7646d2SAndroid Build Coastguard Worker		;;
627*5e7646d2SAndroid Build Coastguard Worker	dpx2* | dpx2*-bull)
628*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-bull
629*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
630*5e7646d2SAndroid Build Coastguard Worker		;;
631*5e7646d2SAndroid Build Coastguard Worker	ebmon29k)
632*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-amd
633*5e7646d2SAndroid Build Coastguard Worker		os=-ebmon
634*5e7646d2SAndroid Build Coastguard Worker		;;
635*5e7646d2SAndroid Build Coastguard Worker	elxsi)
636*5e7646d2SAndroid Build Coastguard Worker		basic_machine=elxsi-elxsi
637*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
638*5e7646d2SAndroid Build Coastguard Worker		;;
639*5e7646d2SAndroid Build Coastguard Worker	encore | umax | mmax)
640*5e7646d2SAndroid Build Coastguard Worker		basic_machine=ns32k-encore
641*5e7646d2SAndroid Build Coastguard Worker		;;
642*5e7646d2SAndroid Build Coastguard Worker	es1800 | OSE68k | ose68k | ose | OSE)
643*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-ericsson
644*5e7646d2SAndroid Build Coastguard Worker		os=-ose
645*5e7646d2SAndroid Build Coastguard Worker		;;
646*5e7646d2SAndroid Build Coastguard Worker	fx2800)
647*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i860-alliant
648*5e7646d2SAndroid Build Coastguard Worker		;;
649*5e7646d2SAndroid Build Coastguard Worker	genix)
650*5e7646d2SAndroid Build Coastguard Worker		basic_machine=ns32k-ns
651*5e7646d2SAndroid Build Coastguard Worker		;;
652*5e7646d2SAndroid Build Coastguard Worker	gmicro)
653*5e7646d2SAndroid Build Coastguard Worker		basic_machine=tron-gmicro
654*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
655*5e7646d2SAndroid Build Coastguard Worker		;;
656*5e7646d2SAndroid Build Coastguard Worker	go32)
657*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-pc
658*5e7646d2SAndroid Build Coastguard Worker		os=-go32
659*5e7646d2SAndroid Build Coastguard Worker		;;
660*5e7646d2SAndroid Build Coastguard Worker	h3050r* | hiux*)
661*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hitachi
662*5e7646d2SAndroid Build Coastguard Worker		os=-hiuxwe2
663*5e7646d2SAndroid Build Coastguard Worker		;;
664*5e7646d2SAndroid Build Coastguard Worker	h8300hms)
665*5e7646d2SAndroid Build Coastguard Worker		basic_machine=h8300-hitachi
666*5e7646d2SAndroid Build Coastguard Worker		os=-hms
667*5e7646d2SAndroid Build Coastguard Worker		;;
668*5e7646d2SAndroid Build Coastguard Worker	h8300xray)
669*5e7646d2SAndroid Build Coastguard Worker		basic_machine=h8300-hitachi
670*5e7646d2SAndroid Build Coastguard Worker		os=-xray
671*5e7646d2SAndroid Build Coastguard Worker		;;
672*5e7646d2SAndroid Build Coastguard Worker	h8500hms)
673*5e7646d2SAndroid Build Coastguard Worker		basic_machine=h8500-hitachi
674*5e7646d2SAndroid Build Coastguard Worker		os=-hms
675*5e7646d2SAndroid Build Coastguard Worker		;;
676*5e7646d2SAndroid Build Coastguard Worker	harris)
677*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m88k-harris
678*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
679*5e7646d2SAndroid Build Coastguard Worker		;;
680*5e7646d2SAndroid Build Coastguard Worker	hp300-*)
681*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-hp
682*5e7646d2SAndroid Build Coastguard Worker		;;
683*5e7646d2SAndroid Build Coastguard Worker	hp300bsd)
684*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-hp
685*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
686*5e7646d2SAndroid Build Coastguard Worker		;;
687*5e7646d2SAndroid Build Coastguard Worker	hp300hpux)
688*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-hp
689*5e7646d2SAndroid Build Coastguard Worker		os=-hpux
690*5e7646d2SAndroid Build Coastguard Worker		;;
691*5e7646d2SAndroid Build Coastguard Worker	hp3k9[0-9][0-9] | hp9[0-9][0-9])
692*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.0-hp
693*5e7646d2SAndroid Build Coastguard Worker		;;
694*5e7646d2SAndroid Build Coastguard Worker	hp9k2[0-9][0-9] | hp9k31[0-9])
695*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-hp
696*5e7646d2SAndroid Build Coastguard Worker		;;
697*5e7646d2SAndroid Build Coastguard Worker	hp9k3[2-9][0-9])
698*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-hp
699*5e7646d2SAndroid Build Coastguard Worker		;;
700*5e7646d2SAndroid Build Coastguard Worker	hp9k6[0-9][0-9] | hp6[0-9][0-9])
701*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.0-hp
702*5e7646d2SAndroid Build Coastguard Worker		;;
703*5e7646d2SAndroid Build Coastguard Worker	hp9k7[0-79][0-9] | hp7[0-79][0-9])
704*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hp
705*5e7646d2SAndroid Build Coastguard Worker		;;
706*5e7646d2SAndroid Build Coastguard Worker	hp9k78[0-9] | hp78[0-9])
707*5e7646d2SAndroid Build Coastguard Worker		# FIXME: really hppa2.0-hp
708*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hp
709*5e7646d2SAndroid Build Coastguard Worker		;;
710*5e7646d2SAndroid Build Coastguard Worker	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
711*5e7646d2SAndroid Build Coastguard Worker		# FIXME: really hppa2.0-hp
712*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hp
713*5e7646d2SAndroid Build Coastguard Worker		;;
714*5e7646d2SAndroid Build Coastguard Worker	hp9k8[0-9][13679] | hp8[0-9][13679])
715*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hp
716*5e7646d2SAndroid Build Coastguard Worker		;;
717*5e7646d2SAndroid Build Coastguard Worker	hp9k8[0-9][0-9] | hp8[0-9][0-9])
718*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.0-hp
719*5e7646d2SAndroid Build Coastguard Worker		;;
720*5e7646d2SAndroid Build Coastguard Worker	hppa-next)
721*5e7646d2SAndroid Build Coastguard Worker		os=-nextstep3
722*5e7646d2SAndroid Build Coastguard Worker		;;
723*5e7646d2SAndroid Build Coastguard Worker	hppaosf)
724*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hp
725*5e7646d2SAndroid Build Coastguard Worker		os=-osf
726*5e7646d2SAndroid Build Coastguard Worker		;;
727*5e7646d2SAndroid Build Coastguard Worker	hppro)
728*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hp
729*5e7646d2SAndroid Build Coastguard Worker		os=-proelf
730*5e7646d2SAndroid Build Coastguard Worker		;;
731*5e7646d2SAndroid Build Coastguard Worker	i370-ibm* | ibm*)
732*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i370-ibm
733*5e7646d2SAndroid Build Coastguard Worker		;;
734*5e7646d2SAndroid Build Coastguard Worker	i*86v32)
735*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
736*5e7646d2SAndroid Build Coastguard Worker		os=-sysv32
737*5e7646d2SAndroid Build Coastguard Worker		;;
738*5e7646d2SAndroid Build Coastguard Worker	i*86v4*)
739*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
740*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
741*5e7646d2SAndroid Build Coastguard Worker		;;
742*5e7646d2SAndroid Build Coastguard Worker	i*86v)
743*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
744*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
745*5e7646d2SAndroid Build Coastguard Worker		;;
746*5e7646d2SAndroid Build Coastguard Worker	i*86sol2)
747*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
748*5e7646d2SAndroid Build Coastguard Worker		os=-solaris2
749*5e7646d2SAndroid Build Coastguard Worker		;;
750*5e7646d2SAndroid Build Coastguard Worker	i386mach)
751*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-mach
752*5e7646d2SAndroid Build Coastguard Worker		os=-mach
753*5e7646d2SAndroid Build Coastguard Worker		;;
754*5e7646d2SAndroid Build Coastguard Worker	i386-vsta | vsta)
755*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-unknown
756*5e7646d2SAndroid Build Coastguard Worker		os=-vsta
757*5e7646d2SAndroid Build Coastguard Worker		;;
758*5e7646d2SAndroid Build Coastguard Worker	iris | iris4d)
759*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-sgi
760*5e7646d2SAndroid Build Coastguard Worker		case $os in
761*5e7646d2SAndroid Build Coastguard Worker		    -irix*)
762*5e7646d2SAndroid Build Coastguard Worker			;;
763*5e7646d2SAndroid Build Coastguard Worker		    *)
764*5e7646d2SAndroid Build Coastguard Worker			os=-irix4
765*5e7646d2SAndroid Build Coastguard Worker			;;
766*5e7646d2SAndroid Build Coastguard Worker		esac
767*5e7646d2SAndroid Build Coastguard Worker		;;
768*5e7646d2SAndroid Build Coastguard Worker	isi68 | isi)
769*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-isi
770*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
771*5e7646d2SAndroid Build Coastguard Worker		;;
772*5e7646d2SAndroid Build Coastguard Worker	m68knommu)
773*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-unknown
774*5e7646d2SAndroid Build Coastguard Worker		os=-linux
775*5e7646d2SAndroid Build Coastguard Worker		;;
776*5e7646d2SAndroid Build Coastguard Worker	m68knommu-*)
777*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
778*5e7646d2SAndroid Build Coastguard Worker		os=-linux
779*5e7646d2SAndroid Build Coastguard Worker		;;
780*5e7646d2SAndroid Build Coastguard Worker	m88k-omron*)
781*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m88k-omron
782*5e7646d2SAndroid Build Coastguard Worker		;;
783*5e7646d2SAndroid Build Coastguard Worker	magnum | m3230)
784*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-mips
785*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
786*5e7646d2SAndroid Build Coastguard Worker		;;
787*5e7646d2SAndroid Build Coastguard Worker	merlin)
788*5e7646d2SAndroid Build Coastguard Worker		basic_machine=ns32k-utek
789*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
790*5e7646d2SAndroid Build Coastguard Worker		;;
791*5e7646d2SAndroid Build Coastguard Worker	microblaze*)
792*5e7646d2SAndroid Build Coastguard Worker		basic_machine=microblaze-xilinx
793*5e7646d2SAndroid Build Coastguard Worker		;;
794*5e7646d2SAndroid Build Coastguard Worker	mingw64)
795*5e7646d2SAndroid Build Coastguard Worker		basic_machine=x86_64-pc
796*5e7646d2SAndroid Build Coastguard Worker		os=-mingw64
797*5e7646d2SAndroid Build Coastguard Worker		;;
798*5e7646d2SAndroid Build Coastguard Worker	mingw32)
799*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-pc
800*5e7646d2SAndroid Build Coastguard Worker		os=-mingw32
801*5e7646d2SAndroid Build Coastguard Worker		;;
802*5e7646d2SAndroid Build Coastguard Worker	mingw32ce)
803*5e7646d2SAndroid Build Coastguard Worker		basic_machine=arm-unknown
804*5e7646d2SAndroid Build Coastguard Worker		os=-mingw32ce
805*5e7646d2SAndroid Build Coastguard Worker		;;
806*5e7646d2SAndroid Build Coastguard Worker	miniframe)
807*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-convergent
808*5e7646d2SAndroid Build Coastguard Worker		;;
809*5e7646d2SAndroid Build Coastguard Worker	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
810*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-atari
811*5e7646d2SAndroid Build Coastguard Worker		os=-mint
812*5e7646d2SAndroid Build Coastguard Worker		;;
813*5e7646d2SAndroid Build Coastguard Worker	mips3*-*)
814*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
815*5e7646d2SAndroid Build Coastguard Worker		;;
816*5e7646d2SAndroid Build Coastguard Worker	mips3*)
817*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
818*5e7646d2SAndroid Build Coastguard Worker		;;
819*5e7646d2SAndroid Build Coastguard Worker	monitor)
820*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-rom68k
821*5e7646d2SAndroid Build Coastguard Worker		os=-coff
822*5e7646d2SAndroid Build Coastguard Worker		;;
823*5e7646d2SAndroid Build Coastguard Worker	morphos)
824*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc-unknown
825*5e7646d2SAndroid Build Coastguard Worker		os=-morphos
826*5e7646d2SAndroid Build Coastguard Worker		;;
827*5e7646d2SAndroid Build Coastguard Worker	msdos)
828*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-pc
829*5e7646d2SAndroid Build Coastguard Worker		os=-msdos
830*5e7646d2SAndroid Build Coastguard Worker		;;
831*5e7646d2SAndroid Build Coastguard Worker	ms1-*)
832*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
833*5e7646d2SAndroid Build Coastguard Worker		;;
834*5e7646d2SAndroid Build Coastguard Worker	msys)
835*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-pc
836*5e7646d2SAndroid Build Coastguard Worker		os=-msys
837*5e7646d2SAndroid Build Coastguard Worker		;;
838*5e7646d2SAndroid Build Coastguard Worker	mvs)
839*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i370-ibm
840*5e7646d2SAndroid Build Coastguard Worker		os=-mvs
841*5e7646d2SAndroid Build Coastguard Worker		;;
842*5e7646d2SAndroid Build Coastguard Worker	nacl)
843*5e7646d2SAndroid Build Coastguard Worker		basic_machine=le32-unknown
844*5e7646d2SAndroid Build Coastguard Worker		os=-nacl
845*5e7646d2SAndroid Build Coastguard Worker		;;
846*5e7646d2SAndroid Build Coastguard Worker	ncr3000)
847*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i486-ncr
848*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
849*5e7646d2SAndroid Build Coastguard Worker		;;
850*5e7646d2SAndroid Build Coastguard Worker	netbsd386)
851*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-unknown
852*5e7646d2SAndroid Build Coastguard Worker		os=-netbsd
853*5e7646d2SAndroid Build Coastguard Worker		;;
854*5e7646d2SAndroid Build Coastguard Worker	netwinder)
855*5e7646d2SAndroid Build Coastguard Worker		basic_machine=armv4l-rebel
856*5e7646d2SAndroid Build Coastguard Worker		os=-linux
857*5e7646d2SAndroid Build Coastguard Worker		;;
858*5e7646d2SAndroid Build Coastguard Worker	news | news700 | news800 | news900)
859*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-sony
860*5e7646d2SAndroid Build Coastguard Worker		os=-newsos
861*5e7646d2SAndroid Build Coastguard Worker		;;
862*5e7646d2SAndroid Build Coastguard Worker	news1000)
863*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68030-sony
864*5e7646d2SAndroid Build Coastguard Worker		os=-newsos
865*5e7646d2SAndroid Build Coastguard Worker		;;
866*5e7646d2SAndroid Build Coastguard Worker	news-3600 | risc-news)
867*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-sony
868*5e7646d2SAndroid Build Coastguard Worker		os=-newsos
869*5e7646d2SAndroid Build Coastguard Worker		;;
870*5e7646d2SAndroid Build Coastguard Worker	necv70)
871*5e7646d2SAndroid Build Coastguard Worker		basic_machine=v70-nec
872*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
873*5e7646d2SAndroid Build Coastguard Worker		;;
874*5e7646d2SAndroid Build Coastguard Worker	next | m*-next )
875*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-next
876*5e7646d2SAndroid Build Coastguard Worker		case $os in
877*5e7646d2SAndroid Build Coastguard Worker		    -nextstep* )
878*5e7646d2SAndroid Build Coastguard Worker			;;
879*5e7646d2SAndroid Build Coastguard Worker		    -ns2*)
880*5e7646d2SAndroid Build Coastguard Worker		      os=-nextstep2
881*5e7646d2SAndroid Build Coastguard Worker			;;
882*5e7646d2SAndroid Build Coastguard Worker		    *)
883*5e7646d2SAndroid Build Coastguard Worker		      os=-nextstep3
884*5e7646d2SAndroid Build Coastguard Worker			;;
885*5e7646d2SAndroid Build Coastguard Worker		esac
886*5e7646d2SAndroid Build Coastguard Worker		;;
887*5e7646d2SAndroid Build Coastguard Worker	nh3000)
888*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-harris
889*5e7646d2SAndroid Build Coastguard Worker		os=-cxux
890*5e7646d2SAndroid Build Coastguard Worker		;;
891*5e7646d2SAndroid Build Coastguard Worker	nh[45]000)
892*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m88k-harris
893*5e7646d2SAndroid Build Coastguard Worker		os=-cxux
894*5e7646d2SAndroid Build Coastguard Worker		;;
895*5e7646d2SAndroid Build Coastguard Worker	nindy960)
896*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i960-intel
897*5e7646d2SAndroid Build Coastguard Worker		os=-nindy
898*5e7646d2SAndroid Build Coastguard Worker		;;
899*5e7646d2SAndroid Build Coastguard Worker	mon960)
900*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i960-intel
901*5e7646d2SAndroid Build Coastguard Worker		os=-mon960
902*5e7646d2SAndroid Build Coastguard Worker		;;
903*5e7646d2SAndroid Build Coastguard Worker	nonstopux)
904*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-compaq
905*5e7646d2SAndroid Build Coastguard Worker		os=-nonstopux
906*5e7646d2SAndroid Build Coastguard Worker		;;
907*5e7646d2SAndroid Build Coastguard Worker	np1)
908*5e7646d2SAndroid Build Coastguard Worker		basic_machine=np1-gould
909*5e7646d2SAndroid Build Coastguard Worker		;;
910*5e7646d2SAndroid Build Coastguard Worker	neo-tandem)
911*5e7646d2SAndroid Build Coastguard Worker		basic_machine=neo-tandem
912*5e7646d2SAndroid Build Coastguard Worker		;;
913*5e7646d2SAndroid Build Coastguard Worker	nse-tandem)
914*5e7646d2SAndroid Build Coastguard Worker		basic_machine=nse-tandem
915*5e7646d2SAndroid Build Coastguard Worker		;;
916*5e7646d2SAndroid Build Coastguard Worker	nsr-tandem)
917*5e7646d2SAndroid Build Coastguard Worker		basic_machine=nsr-tandem
918*5e7646d2SAndroid Build Coastguard Worker		;;
919*5e7646d2SAndroid Build Coastguard Worker	op50n-* | op60c-*)
920*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-oki
921*5e7646d2SAndroid Build Coastguard Worker		os=-proelf
922*5e7646d2SAndroid Build Coastguard Worker		;;
923*5e7646d2SAndroid Build Coastguard Worker	openrisc | openrisc-*)
924*5e7646d2SAndroid Build Coastguard Worker		basic_machine=or32-unknown
925*5e7646d2SAndroid Build Coastguard Worker		;;
926*5e7646d2SAndroid Build Coastguard Worker	os400)
927*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc-ibm
928*5e7646d2SAndroid Build Coastguard Worker		os=-os400
929*5e7646d2SAndroid Build Coastguard Worker		;;
930*5e7646d2SAndroid Build Coastguard Worker	OSE68000 | ose68000)
931*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-ericsson
932*5e7646d2SAndroid Build Coastguard Worker		os=-ose
933*5e7646d2SAndroid Build Coastguard Worker		;;
934*5e7646d2SAndroid Build Coastguard Worker	os68k)
935*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-none
936*5e7646d2SAndroid Build Coastguard Worker		os=-os68k
937*5e7646d2SAndroid Build Coastguard Worker		;;
938*5e7646d2SAndroid Build Coastguard Worker	pa-hitachi)
939*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-hitachi
940*5e7646d2SAndroid Build Coastguard Worker		os=-hiuxwe2
941*5e7646d2SAndroid Build Coastguard Worker		;;
942*5e7646d2SAndroid Build Coastguard Worker	paragon)
943*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i860-intel
944*5e7646d2SAndroid Build Coastguard Worker		os=-osf
945*5e7646d2SAndroid Build Coastguard Worker		;;
946*5e7646d2SAndroid Build Coastguard Worker	parisc)
947*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa-unknown
948*5e7646d2SAndroid Build Coastguard Worker		os=-linux
949*5e7646d2SAndroid Build Coastguard Worker		;;
950*5e7646d2SAndroid Build Coastguard Worker	parisc-*)
951*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
952*5e7646d2SAndroid Build Coastguard Worker		os=-linux
953*5e7646d2SAndroid Build Coastguard Worker		;;
954*5e7646d2SAndroid Build Coastguard Worker	pbd)
955*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparc-tti
956*5e7646d2SAndroid Build Coastguard Worker		;;
957*5e7646d2SAndroid Build Coastguard Worker	pbb)
958*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-tti
959*5e7646d2SAndroid Build Coastguard Worker		;;
960*5e7646d2SAndroid Build Coastguard Worker	pc532 | pc532-*)
961*5e7646d2SAndroid Build Coastguard Worker		basic_machine=ns32k-pc532
962*5e7646d2SAndroid Build Coastguard Worker		;;
963*5e7646d2SAndroid Build Coastguard Worker	pc98)
964*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-pc
965*5e7646d2SAndroid Build Coastguard Worker		;;
966*5e7646d2SAndroid Build Coastguard Worker	pc98-*)
967*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
968*5e7646d2SAndroid Build Coastguard Worker		;;
969*5e7646d2SAndroid Build Coastguard Worker	pentium | p5 | k5 | k6 | nexgen | viac3)
970*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i586-pc
971*5e7646d2SAndroid Build Coastguard Worker		;;
972*5e7646d2SAndroid Build Coastguard Worker	pentiumpro | p6 | 6x86 | athlon | athlon_*)
973*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-pc
974*5e7646d2SAndroid Build Coastguard Worker		;;
975*5e7646d2SAndroid Build Coastguard Worker	pentiumii | pentium2 | pentiumiii | pentium3)
976*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-pc
977*5e7646d2SAndroid Build Coastguard Worker		;;
978*5e7646d2SAndroid Build Coastguard Worker	pentium4)
979*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i786-pc
980*5e7646d2SAndroid Build Coastguard Worker		;;
981*5e7646d2SAndroid Build Coastguard Worker	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
982*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
983*5e7646d2SAndroid Build Coastguard Worker		;;
984*5e7646d2SAndroid Build Coastguard Worker	pentiumpro-* | p6-* | 6x86-* | athlon-*)
985*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
986*5e7646d2SAndroid Build Coastguard Worker		;;
987*5e7646d2SAndroid Build Coastguard Worker	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
988*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
989*5e7646d2SAndroid Build Coastguard Worker		;;
990*5e7646d2SAndroid Build Coastguard Worker	pentium4-*)
991*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
992*5e7646d2SAndroid Build Coastguard Worker		;;
993*5e7646d2SAndroid Build Coastguard Worker	pn)
994*5e7646d2SAndroid Build Coastguard Worker		basic_machine=pn-gould
995*5e7646d2SAndroid Build Coastguard Worker		;;
996*5e7646d2SAndroid Build Coastguard Worker	power)	basic_machine=power-ibm
997*5e7646d2SAndroid Build Coastguard Worker		;;
998*5e7646d2SAndroid Build Coastguard Worker	ppc | ppcbe)	basic_machine=powerpc-unknown
999*5e7646d2SAndroid Build Coastguard Worker		;;
1000*5e7646d2SAndroid Build Coastguard Worker	ppc-* | ppcbe-*)
1001*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1002*5e7646d2SAndroid Build Coastguard Worker		;;
1003*5e7646d2SAndroid Build Coastguard Worker	ppcle | powerpclittle | ppc-le | powerpc-little)
1004*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpcle-unknown
1005*5e7646d2SAndroid Build Coastguard Worker		;;
1006*5e7646d2SAndroid Build Coastguard Worker	ppcle-* | powerpclittle-*)
1007*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1008*5e7646d2SAndroid Build Coastguard Worker		;;
1009*5e7646d2SAndroid Build Coastguard Worker	ppc64)	basic_machine=powerpc64-unknown
1010*5e7646d2SAndroid Build Coastguard Worker		;;
1011*5e7646d2SAndroid Build Coastguard Worker	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1012*5e7646d2SAndroid Build Coastguard Worker		;;
1013*5e7646d2SAndroid Build Coastguard Worker	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1014*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc64le-unknown
1015*5e7646d2SAndroid Build Coastguard Worker		;;
1016*5e7646d2SAndroid Build Coastguard Worker	ppc64le-* | powerpc64little-*)
1017*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1018*5e7646d2SAndroid Build Coastguard Worker		;;
1019*5e7646d2SAndroid Build Coastguard Worker	ps2)
1020*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-ibm
1021*5e7646d2SAndroid Build Coastguard Worker		;;
1022*5e7646d2SAndroid Build Coastguard Worker	pw32)
1023*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i586-unknown
1024*5e7646d2SAndroid Build Coastguard Worker		os=-pw32
1025*5e7646d2SAndroid Build Coastguard Worker		;;
1026*5e7646d2SAndroid Build Coastguard Worker	rdos | rdos64)
1027*5e7646d2SAndroid Build Coastguard Worker		basic_machine=x86_64-pc
1028*5e7646d2SAndroid Build Coastguard Worker		os=-rdos
1029*5e7646d2SAndroid Build Coastguard Worker		;;
1030*5e7646d2SAndroid Build Coastguard Worker	rdos32)
1031*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-pc
1032*5e7646d2SAndroid Build Coastguard Worker		os=-rdos
1033*5e7646d2SAndroid Build Coastguard Worker		;;
1034*5e7646d2SAndroid Build Coastguard Worker	rom68k)
1035*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-rom68k
1036*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1037*5e7646d2SAndroid Build Coastguard Worker		;;
1038*5e7646d2SAndroid Build Coastguard Worker	rm[46]00)
1039*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-siemens
1040*5e7646d2SAndroid Build Coastguard Worker		;;
1041*5e7646d2SAndroid Build Coastguard Worker	rtpc | rtpc-*)
1042*5e7646d2SAndroid Build Coastguard Worker		basic_machine=romp-ibm
1043*5e7646d2SAndroid Build Coastguard Worker		;;
1044*5e7646d2SAndroid Build Coastguard Worker	s390 | s390-*)
1045*5e7646d2SAndroid Build Coastguard Worker		basic_machine=s390-ibm
1046*5e7646d2SAndroid Build Coastguard Worker		;;
1047*5e7646d2SAndroid Build Coastguard Worker	s390x | s390x-*)
1048*5e7646d2SAndroid Build Coastguard Worker		basic_machine=s390x-ibm
1049*5e7646d2SAndroid Build Coastguard Worker		;;
1050*5e7646d2SAndroid Build Coastguard Worker	sa29200)
1051*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-amd
1052*5e7646d2SAndroid Build Coastguard Worker		os=-udi
1053*5e7646d2SAndroid Build Coastguard Worker		;;
1054*5e7646d2SAndroid Build Coastguard Worker	sb1)
1055*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mipsisa64sb1-unknown
1056*5e7646d2SAndroid Build Coastguard Worker		;;
1057*5e7646d2SAndroid Build Coastguard Worker	sb1el)
1058*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mipsisa64sb1el-unknown
1059*5e7646d2SAndroid Build Coastguard Worker		;;
1060*5e7646d2SAndroid Build Coastguard Worker	sde)
1061*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mipsisa32-sde
1062*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1063*5e7646d2SAndroid Build Coastguard Worker		;;
1064*5e7646d2SAndroid Build Coastguard Worker	sei)
1065*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mips-sei
1066*5e7646d2SAndroid Build Coastguard Worker		os=-seiux
1067*5e7646d2SAndroid Build Coastguard Worker		;;
1068*5e7646d2SAndroid Build Coastguard Worker	sequent)
1069*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-sequent
1070*5e7646d2SAndroid Build Coastguard Worker		;;
1071*5e7646d2SAndroid Build Coastguard Worker	sh)
1072*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sh-hitachi
1073*5e7646d2SAndroid Build Coastguard Worker		os=-hms
1074*5e7646d2SAndroid Build Coastguard Worker		;;
1075*5e7646d2SAndroid Build Coastguard Worker	sh5el)
1076*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sh5le-unknown
1077*5e7646d2SAndroid Build Coastguard Worker		;;
1078*5e7646d2SAndroid Build Coastguard Worker	sh64)
1079*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sh64-unknown
1080*5e7646d2SAndroid Build Coastguard Worker		;;
1081*5e7646d2SAndroid Build Coastguard Worker	sparclite-wrs | simso-wrs)
1082*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparclite-wrs
1083*5e7646d2SAndroid Build Coastguard Worker		os=-vxworks
1084*5e7646d2SAndroid Build Coastguard Worker		;;
1085*5e7646d2SAndroid Build Coastguard Worker	sps7)
1086*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-bull
1087*5e7646d2SAndroid Build Coastguard Worker		os=-sysv2
1088*5e7646d2SAndroid Build Coastguard Worker		;;
1089*5e7646d2SAndroid Build Coastguard Worker	spur)
1090*5e7646d2SAndroid Build Coastguard Worker		basic_machine=spur-unknown
1091*5e7646d2SAndroid Build Coastguard Worker		;;
1092*5e7646d2SAndroid Build Coastguard Worker	st2000)
1093*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-tandem
1094*5e7646d2SAndroid Build Coastguard Worker		;;
1095*5e7646d2SAndroid Build Coastguard Worker	stratus)
1096*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i860-stratus
1097*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
1098*5e7646d2SAndroid Build Coastguard Worker		;;
1099*5e7646d2SAndroid Build Coastguard Worker	strongarm-* | thumb-*)
1100*5e7646d2SAndroid Build Coastguard Worker		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1101*5e7646d2SAndroid Build Coastguard Worker		;;
1102*5e7646d2SAndroid Build Coastguard Worker	sun2)
1103*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-sun
1104*5e7646d2SAndroid Build Coastguard Worker		;;
1105*5e7646d2SAndroid Build Coastguard Worker	sun2os3)
1106*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-sun
1107*5e7646d2SAndroid Build Coastguard Worker		os=-sunos3
1108*5e7646d2SAndroid Build Coastguard Worker		;;
1109*5e7646d2SAndroid Build Coastguard Worker	sun2os4)
1110*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68000-sun
1111*5e7646d2SAndroid Build Coastguard Worker		os=-sunos4
1112*5e7646d2SAndroid Build Coastguard Worker		;;
1113*5e7646d2SAndroid Build Coastguard Worker	sun3os3)
1114*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-sun
1115*5e7646d2SAndroid Build Coastguard Worker		os=-sunos3
1116*5e7646d2SAndroid Build Coastguard Worker		;;
1117*5e7646d2SAndroid Build Coastguard Worker	sun3os4)
1118*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-sun
1119*5e7646d2SAndroid Build Coastguard Worker		os=-sunos4
1120*5e7646d2SAndroid Build Coastguard Worker		;;
1121*5e7646d2SAndroid Build Coastguard Worker	sun4os3)
1122*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparc-sun
1123*5e7646d2SAndroid Build Coastguard Worker		os=-sunos3
1124*5e7646d2SAndroid Build Coastguard Worker		;;
1125*5e7646d2SAndroid Build Coastguard Worker	sun4os4)
1126*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparc-sun
1127*5e7646d2SAndroid Build Coastguard Worker		os=-sunos4
1128*5e7646d2SAndroid Build Coastguard Worker		;;
1129*5e7646d2SAndroid Build Coastguard Worker	sun4sol2)
1130*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparc-sun
1131*5e7646d2SAndroid Build Coastguard Worker		os=-solaris2
1132*5e7646d2SAndroid Build Coastguard Worker		;;
1133*5e7646d2SAndroid Build Coastguard Worker	sun3 | sun3-*)
1134*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-sun
1135*5e7646d2SAndroid Build Coastguard Worker		;;
1136*5e7646d2SAndroid Build Coastguard Worker	sun4)
1137*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparc-sun
1138*5e7646d2SAndroid Build Coastguard Worker		;;
1139*5e7646d2SAndroid Build Coastguard Worker	sun386 | sun386i | roadrunner)
1140*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-sun
1141*5e7646d2SAndroid Build Coastguard Worker		;;
1142*5e7646d2SAndroid Build Coastguard Worker	sv1)
1143*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sv1-cray
1144*5e7646d2SAndroid Build Coastguard Worker		os=-unicos
1145*5e7646d2SAndroid Build Coastguard Worker		;;
1146*5e7646d2SAndroid Build Coastguard Worker	symmetry)
1147*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i386-sequent
1148*5e7646d2SAndroid Build Coastguard Worker		os=-dynix
1149*5e7646d2SAndroid Build Coastguard Worker		;;
1150*5e7646d2SAndroid Build Coastguard Worker	t3e)
1151*5e7646d2SAndroid Build Coastguard Worker		basic_machine=alphaev5-cray
1152*5e7646d2SAndroid Build Coastguard Worker		os=-unicos
1153*5e7646d2SAndroid Build Coastguard Worker		;;
1154*5e7646d2SAndroid Build Coastguard Worker	t90)
1155*5e7646d2SAndroid Build Coastguard Worker		basic_machine=t90-cray
1156*5e7646d2SAndroid Build Coastguard Worker		os=-unicos
1157*5e7646d2SAndroid Build Coastguard Worker		;;
1158*5e7646d2SAndroid Build Coastguard Worker	tile*)
1159*5e7646d2SAndroid Build Coastguard Worker		basic_machine=$basic_machine-unknown
1160*5e7646d2SAndroid Build Coastguard Worker		os=-linux-gnu
1161*5e7646d2SAndroid Build Coastguard Worker		;;
1162*5e7646d2SAndroid Build Coastguard Worker	tx39)
1163*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mipstx39-unknown
1164*5e7646d2SAndroid Build Coastguard Worker		;;
1165*5e7646d2SAndroid Build Coastguard Worker	tx39el)
1166*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mipstx39el-unknown
1167*5e7646d2SAndroid Build Coastguard Worker		;;
1168*5e7646d2SAndroid Build Coastguard Worker	toad1)
1169*5e7646d2SAndroid Build Coastguard Worker		basic_machine=pdp10-xkl
1170*5e7646d2SAndroid Build Coastguard Worker		os=-tops20
1171*5e7646d2SAndroid Build Coastguard Worker		;;
1172*5e7646d2SAndroid Build Coastguard Worker	tower | tower-32)
1173*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-ncr
1174*5e7646d2SAndroid Build Coastguard Worker		;;
1175*5e7646d2SAndroid Build Coastguard Worker	tpf)
1176*5e7646d2SAndroid Build Coastguard Worker		basic_machine=s390x-ibm
1177*5e7646d2SAndroid Build Coastguard Worker		os=-tpf
1178*5e7646d2SAndroid Build Coastguard Worker		;;
1179*5e7646d2SAndroid Build Coastguard Worker	udi29k)
1180*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-amd
1181*5e7646d2SAndroid Build Coastguard Worker		os=-udi
1182*5e7646d2SAndroid Build Coastguard Worker		;;
1183*5e7646d2SAndroid Build Coastguard Worker	ultra3)
1184*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-nyu
1185*5e7646d2SAndroid Build Coastguard Worker		os=-sym1
1186*5e7646d2SAndroid Build Coastguard Worker		;;
1187*5e7646d2SAndroid Build Coastguard Worker	v810 | necv810)
1188*5e7646d2SAndroid Build Coastguard Worker		basic_machine=v810-nec
1189*5e7646d2SAndroid Build Coastguard Worker		os=-none
1190*5e7646d2SAndroid Build Coastguard Worker		;;
1191*5e7646d2SAndroid Build Coastguard Worker	vaxv)
1192*5e7646d2SAndroid Build Coastguard Worker		basic_machine=vax-dec
1193*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
1194*5e7646d2SAndroid Build Coastguard Worker		;;
1195*5e7646d2SAndroid Build Coastguard Worker	vms)
1196*5e7646d2SAndroid Build Coastguard Worker		basic_machine=vax-dec
1197*5e7646d2SAndroid Build Coastguard Worker		os=-vms
1198*5e7646d2SAndroid Build Coastguard Worker		;;
1199*5e7646d2SAndroid Build Coastguard Worker	vpp*|vx|vx-*)
1200*5e7646d2SAndroid Build Coastguard Worker		basic_machine=f301-fujitsu
1201*5e7646d2SAndroid Build Coastguard Worker		;;
1202*5e7646d2SAndroid Build Coastguard Worker	vxworks960)
1203*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i960-wrs
1204*5e7646d2SAndroid Build Coastguard Worker		os=-vxworks
1205*5e7646d2SAndroid Build Coastguard Worker		;;
1206*5e7646d2SAndroid Build Coastguard Worker	vxworks68)
1207*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-wrs
1208*5e7646d2SAndroid Build Coastguard Worker		os=-vxworks
1209*5e7646d2SAndroid Build Coastguard Worker		;;
1210*5e7646d2SAndroid Build Coastguard Worker	vxworks29k)
1211*5e7646d2SAndroid Build Coastguard Worker		basic_machine=a29k-wrs
1212*5e7646d2SAndroid Build Coastguard Worker		os=-vxworks
1213*5e7646d2SAndroid Build Coastguard Worker		;;
1214*5e7646d2SAndroid Build Coastguard Worker	w65*)
1215*5e7646d2SAndroid Build Coastguard Worker		basic_machine=w65-wdc
1216*5e7646d2SAndroid Build Coastguard Worker		os=-none
1217*5e7646d2SAndroid Build Coastguard Worker		;;
1218*5e7646d2SAndroid Build Coastguard Worker	w89k-*)
1219*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-winbond
1220*5e7646d2SAndroid Build Coastguard Worker		os=-proelf
1221*5e7646d2SAndroid Build Coastguard Worker		;;
1222*5e7646d2SAndroid Build Coastguard Worker	xbox)
1223*5e7646d2SAndroid Build Coastguard Worker		basic_machine=i686-pc
1224*5e7646d2SAndroid Build Coastguard Worker		os=-mingw32
1225*5e7646d2SAndroid Build Coastguard Worker		;;
1226*5e7646d2SAndroid Build Coastguard Worker	xps | xps100)
1227*5e7646d2SAndroid Build Coastguard Worker		basic_machine=xps100-honeywell
1228*5e7646d2SAndroid Build Coastguard Worker		;;
1229*5e7646d2SAndroid Build Coastguard Worker	xscale-* | xscalee[bl]-*)
1230*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1231*5e7646d2SAndroid Build Coastguard Worker		;;
1232*5e7646d2SAndroid Build Coastguard Worker	ymp)
1233*5e7646d2SAndroid Build Coastguard Worker		basic_machine=ymp-cray
1234*5e7646d2SAndroid Build Coastguard Worker		os=-unicos
1235*5e7646d2SAndroid Build Coastguard Worker		;;
1236*5e7646d2SAndroid Build Coastguard Worker	z8k-*-coff)
1237*5e7646d2SAndroid Build Coastguard Worker		basic_machine=z8k-unknown
1238*5e7646d2SAndroid Build Coastguard Worker		os=-sim
1239*5e7646d2SAndroid Build Coastguard Worker		;;
1240*5e7646d2SAndroid Build Coastguard Worker	z80-*-coff)
1241*5e7646d2SAndroid Build Coastguard Worker		basic_machine=z80-unknown
1242*5e7646d2SAndroid Build Coastguard Worker		os=-sim
1243*5e7646d2SAndroid Build Coastguard Worker		;;
1244*5e7646d2SAndroid Build Coastguard Worker	none)
1245*5e7646d2SAndroid Build Coastguard Worker		basic_machine=none-none
1246*5e7646d2SAndroid Build Coastguard Worker		os=-none
1247*5e7646d2SAndroid Build Coastguard Worker		;;
1248*5e7646d2SAndroid Build Coastguard Worker
1249*5e7646d2SAndroid Build Coastguard Worker# Here we handle the default manufacturer of certain CPU types.  It is in
1250*5e7646d2SAndroid Build Coastguard Worker# some cases the only manufacturer, in others, it is the most popular.
1251*5e7646d2SAndroid Build Coastguard Worker	w89k)
1252*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-winbond
1253*5e7646d2SAndroid Build Coastguard Worker		;;
1254*5e7646d2SAndroid Build Coastguard Worker	op50n)
1255*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-oki
1256*5e7646d2SAndroid Build Coastguard Worker		;;
1257*5e7646d2SAndroid Build Coastguard Worker	op60c)
1258*5e7646d2SAndroid Build Coastguard Worker		basic_machine=hppa1.1-oki
1259*5e7646d2SAndroid Build Coastguard Worker		;;
1260*5e7646d2SAndroid Build Coastguard Worker	romp)
1261*5e7646d2SAndroid Build Coastguard Worker		basic_machine=romp-ibm
1262*5e7646d2SAndroid Build Coastguard Worker		;;
1263*5e7646d2SAndroid Build Coastguard Worker	mmix)
1264*5e7646d2SAndroid Build Coastguard Worker		basic_machine=mmix-knuth
1265*5e7646d2SAndroid Build Coastguard Worker		;;
1266*5e7646d2SAndroid Build Coastguard Worker	rs6000)
1267*5e7646d2SAndroid Build Coastguard Worker		basic_machine=rs6000-ibm
1268*5e7646d2SAndroid Build Coastguard Worker		;;
1269*5e7646d2SAndroid Build Coastguard Worker	vax)
1270*5e7646d2SAndroid Build Coastguard Worker		basic_machine=vax-dec
1271*5e7646d2SAndroid Build Coastguard Worker		;;
1272*5e7646d2SAndroid Build Coastguard Worker	pdp10)
1273*5e7646d2SAndroid Build Coastguard Worker		# there are many clones, so DEC is not a safe bet
1274*5e7646d2SAndroid Build Coastguard Worker		basic_machine=pdp10-unknown
1275*5e7646d2SAndroid Build Coastguard Worker		;;
1276*5e7646d2SAndroid Build Coastguard Worker	pdp11)
1277*5e7646d2SAndroid Build Coastguard Worker		basic_machine=pdp11-dec
1278*5e7646d2SAndroid Build Coastguard Worker		;;
1279*5e7646d2SAndroid Build Coastguard Worker	we32k)
1280*5e7646d2SAndroid Build Coastguard Worker		basic_machine=we32k-att
1281*5e7646d2SAndroid Build Coastguard Worker		;;
1282*5e7646d2SAndroid Build Coastguard Worker	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1283*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sh-unknown
1284*5e7646d2SAndroid Build Coastguard Worker		;;
1285*5e7646d2SAndroid Build Coastguard Worker	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1286*5e7646d2SAndroid Build Coastguard Worker		basic_machine=sparc-sun
1287*5e7646d2SAndroid Build Coastguard Worker		;;
1288*5e7646d2SAndroid Build Coastguard Worker	cydra)
1289*5e7646d2SAndroid Build Coastguard Worker		basic_machine=cydra-cydrome
1290*5e7646d2SAndroid Build Coastguard Worker		;;
1291*5e7646d2SAndroid Build Coastguard Worker	orion)
1292*5e7646d2SAndroid Build Coastguard Worker		basic_machine=orion-highlevel
1293*5e7646d2SAndroid Build Coastguard Worker		;;
1294*5e7646d2SAndroid Build Coastguard Worker	orion105)
1295*5e7646d2SAndroid Build Coastguard Worker		basic_machine=clipper-highlevel
1296*5e7646d2SAndroid Build Coastguard Worker		;;
1297*5e7646d2SAndroid Build Coastguard Worker	mac | mpw | mac-mpw)
1298*5e7646d2SAndroid Build Coastguard Worker		basic_machine=m68k-apple
1299*5e7646d2SAndroid Build Coastguard Worker		;;
1300*5e7646d2SAndroid Build Coastguard Worker	pmac | pmac-mpw)
1301*5e7646d2SAndroid Build Coastguard Worker		basic_machine=powerpc-apple
1302*5e7646d2SAndroid Build Coastguard Worker		;;
1303*5e7646d2SAndroid Build Coastguard Worker	*-unknown)
1304*5e7646d2SAndroid Build Coastguard Worker		# Make sure to match an already-canonicalized machine name.
1305*5e7646d2SAndroid Build Coastguard Worker		;;
1306*5e7646d2SAndroid Build Coastguard Worker	*)
1307*5e7646d2SAndroid Build Coastguard Worker		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1308*5e7646d2SAndroid Build Coastguard Worker		exit 1
1309*5e7646d2SAndroid Build Coastguard Worker		;;
1310*5e7646d2SAndroid Build Coastguard Workeresac
1311*5e7646d2SAndroid Build Coastguard Worker
1312*5e7646d2SAndroid Build Coastguard Worker# Here we canonicalize certain aliases for manufacturers.
1313*5e7646d2SAndroid Build Coastguard Workercase $basic_machine in
1314*5e7646d2SAndroid Build Coastguard Worker	*-digital*)
1315*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1316*5e7646d2SAndroid Build Coastguard Worker		;;
1317*5e7646d2SAndroid Build Coastguard Worker	*-commodore*)
1318*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1319*5e7646d2SAndroid Build Coastguard Worker		;;
1320*5e7646d2SAndroid Build Coastguard Worker	*)
1321*5e7646d2SAndroid Build Coastguard Worker		;;
1322*5e7646d2SAndroid Build Coastguard Workeresac
1323*5e7646d2SAndroid Build Coastguard Worker
1324*5e7646d2SAndroid Build Coastguard Worker# Decode manufacturer-specific aliases for certain operating systems.
1325*5e7646d2SAndroid Build Coastguard Worker
1326*5e7646d2SAndroid Build Coastguard Workerif [ x"$os" != x"" ]
1327*5e7646d2SAndroid Build Coastguard Workerthen
1328*5e7646d2SAndroid Build Coastguard Workercase $os in
1329*5e7646d2SAndroid Build Coastguard Worker	# First match some system type aliases
1330*5e7646d2SAndroid Build Coastguard Worker	# that might get confused with valid system types.
1331*5e7646d2SAndroid Build Coastguard Worker	# -solaris* is a basic system type, with this one exception.
1332*5e7646d2SAndroid Build Coastguard Worker	-auroraux)
1333*5e7646d2SAndroid Build Coastguard Worker		os=-auroraux
1334*5e7646d2SAndroid Build Coastguard Worker		;;
1335*5e7646d2SAndroid Build Coastguard Worker	-solaris1 | -solaris1.*)
1336*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1337*5e7646d2SAndroid Build Coastguard Worker		;;
1338*5e7646d2SAndroid Build Coastguard Worker	-solaris)
1339*5e7646d2SAndroid Build Coastguard Worker		os=-solaris2
1340*5e7646d2SAndroid Build Coastguard Worker		;;
1341*5e7646d2SAndroid Build Coastguard Worker	-svr4*)
1342*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
1343*5e7646d2SAndroid Build Coastguard Worker		;;
1344*5e7646d2SAndroid Build Coastguard Worker	-unixware*)
1345*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4.2uw
1346*5e7646d2SAndroid Build Coastguard Worker		;;
1347*5e7646d2SAndroid Build Coastguard Worker	-gnu/linux*)
1348*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1349*5e7646d2SAndroid Build Coastguard Worker		;;
1350*5e7646d2SAndroid Build Coastguard Worker	# First accept the basic system types.
1351*5e7646d2SAndroid Build Coastguard Worker	# The portable systems comes first.
1352*5e7646d2SAndroid Build Coastguard Worker	# Each alternative MUST END IN A *, to match a version number.
1353*5e7646d2SAndroid Build Coastguard Worker	# -sysv* is not here because it comes later, after sysvr4.
1354*5e7646d2SAndroid Build Coastguard Worker	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1355*5e7646d2SAndroid Build Coastguard Worker	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1356*5e7646d2SAndroid Build Coastguard Worker	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1357*5e7646d2SAndroid Build Coastguard Worker	      | -sym* | -kopensolaris* | -plan9* \
1358*5e7646d2SAndroid Build Coastguard Worker	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1359*5e7646d2SAndroid Build Coastguard Worker	      | -aos* | -aros* \
1360*5e7646d2SAndroid Build Coastguard Worker	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1361*5e7646d2SAndroid Build Coastguard Worker	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1362*5e7646d2SAndroid Build Coastguard Worker	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1363*5e7646d2SAndroid Build Coastguard Worker	      | -bitrig* | -openbsd* | -solidbsd* \
1364*5e7646d2SAndroid Build Coastguard Worker	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1365*5e7646d2SAndroid Build Coastguard Worker	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1366*5e7646d2SAndroid Build Coastguard Worker	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1367*5e7646d2SAndroid Build Coastguard Worker	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1368*5e7646d2SAndroid Build Coastguard Worker	      | -chorusos* | -chorusrdb* | -cegcc* \
1369*5e7646d2SAndroid Build Coastguard Worker	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1370*5e7646d2SAndroid Build Coastguard Worker	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1371*5e7646d2SAndroid Build Coastguard Worker	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1372*5e7646d2SAndroid Build Coastguard Worker	      | -uxpv* | -beos* | -mpeix* | -udk* \
1373*5e7646d2SAndroid Build Coastguard Worker	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1374*5e7646d2SAndroid Build Coastguard Worker	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1375*5e7646d2SAndroid Build Coastguard Worker	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1376*5e7646d2SAndroid Build Coastguard Worker	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1377*5e7646d2SAndroid Build Coastguard Worker	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1378*5e7646d2SAndroid Build Coastguard Worker	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1379*5e7646d2SAndroid Build Coastguard Worker	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1380*5e7646d2SAndroid Build Coastguard Worker	# Remember, each alternative MUST END IN *, to match a version number.
1381*5e7646d2SAndroid Build Coastguard Worker		;;
1382*5e7646d2SAndroid Build Coastguard Worker	-qnx*)
1383*5e7646d2SAndroid Build Coastguard Worker		case $basic_machine in
1384*5e7646d2SAndroid Build Coastguard Worker		    x86-* | i*86-*)
1385*5e7646d2SAndroid Build Coastguard Worker			;;
1386*5e7646d2SAndroid Build Coastguard Worker		    *)
1387*5e7646d2SAndroid Build Coastguard Worker			os=-nto$os
1388*5e7646d2SAndroid Build Coastguard Worker			;;
1389*5e7646d2SAndroid Build Coastguard Worker		esac
1390*5e7646d2SAndroid Build Coastguard Worker		;;
1391*5e7646d2SAndroid Build Coastguard Worker	-nto-qnx*)
1392*5e7646d2SAndroid Build Coastguard Worker		;;
1393*5e7646d2SAndroid Build Coastguard Worker	-nto*)
1394*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1395*5e7646d2SAndroid Build Coastguard Worker		;;
1396*5e7646d2SAndroid Build Coastguard Worker	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1397*5e7646d2SAndroid Build Coastguard Worker	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1398*5e7646d2SAndroid Build Coastguard Worker	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1399*5e7646d2SAndroid Build Coastguard Worker		;;
1400*5e7646d2SAndroid Build Coastguard Worker	-mac*)
1401*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|mac|macos|'`
1402*5e7646d2SAndroid Build Coastguard Worker		;;
1403*5e7646d2SAndroid Build Coastguard Worker	-linux-dietlibc)
1404*5e7646d2SAndroid Build Coastguard Worker		os=-linux-dietlibc
1405*5e7646d2SAndroid Build Coastguard Worker		;;
1406*5e7646d2SAndroid Build Coastguard Worker	-linux*)
1407*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1408*5e7646d2SAndroid Build Coastguard Worker		;;
1409*5e7646d2SAndroid Build Coastguard Worker	-sunos5*)
1410*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1411*5e7646d2SAndroid Build Coastguard Worker		;;
1412*5e7646d2SAndroid Build Coastguard Worker	-sunos6*)
1413*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1414*5e7646d2SAndroid Build Coastguard Worker		;;
1415*5e7646d2SAndroid Build Coastguard Worker	-opened*)
1416*5e7646d2SAndroid Build Coastguard Worker		os=-openedition
1417*5e7646d2SAndroid Build Coastguard Worker		;;
1418*5e7646d2SAndroid Build Coastguard Worker	-os400*)
1419*5e7646d2SAndroid Build Coastguard Worker		os=-os400
1420*5e7646d2SAndroid Build Coastguard Worker		;;
1421*5e7646d2SAndroid Build Coastguard Worker	-wince*)
1422*5e7646d2SAndroid Build Coastguard Worker		os=-wince
1423*5e7646d2SAndroid Build Coastguard Worker		;;
1424*5e7646d2SAndroid Build Coastguard Worker	-osfrose*)
1425*5e7646d2SAndroid Build Coastguard Worker		os=-osfrose
1426*5e7646d2SAndroid Build Coastguard Worker		;;
1427*5e7646d2SAndroid Build Coastguard Worker	-osf*)
1428*5e7646d2SAndroid Build Coastguard Worker		os=-osf
1429*5e7646d2SAndroid Build Coastguard Worker		;;
1430*5e7646d2SAndroid Build Coastguard Worker	-utek*)
1431*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
1432*5e7646d2SAndroid Build Coastguard Worker		;;
1433*5e7646d2SAndroid Build Coastguard Worker	-dynix*)
1434*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
1435*5e7646d2SAndroid Build Coastguard Worker		;;
1436*5e7646d2SAndroid Build Coastguard Worker	-acis*)
1437*5e7646d2SAndroid Build Coastguard Worker		os=-aos
1438*5e7646d2SAndroid Build Coastguard Worker		;;
1439*5e7646d2SAndroid Build Coastguard Worker	-atheos*)
1440*5e7646d2SAndroid Build Coastguard Worker		os=-atheos
1441*5e7646d2SAndroid Build Coastguard Worker		;;
1442*5e7646d2SAndroid Build Coastguard Worker	-syllable*)
1443*5e7646d2SAndroid Build Coastguard Worker		os=-syllable
1444*5e7646d2SAndroid Build Coastguard Worker		;;
1445*5e7646d2SAndroid Build Coastguard Worker	-386bsd)
1446*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
1447*5e7646d2SAndroid Build Coastguard Worker		;;
1448*5e7646d2SAndroid Build Coastguard Worker	-ctix* | -uts*)
1449*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
1450*5e7646d2SAndroid Build Coastguard Worker		;;
1451*5e7646d2SAndroid Build Coastguard Worker	-nova*)
1452*5e7646d2SAndroid Build Coastguard Worker		os=-rtmk-nova
1453*5e7646d2SAndroid Build Coastguard Worker		;;
1454*5e7646d2SAndroid Build Coastguard Worker	-ns2 )
1455*5e7646d2SAndroid Build Coastguard Worker		os=-nextstep2
1456*5e7646d2SAndroid Build Coastguard Worker		;;
1457*5e7646d2SAndroid Build Coastguard Worker	-nsk*)
1458*5e7646d2SAndroid Build Coastguard Worker		os=-nsk
1459*5e7646d2SAndroid Build Coastguard Worker		;;
1460*5e7646d2SAndroid Build Coastguard Worker	# Preserve the version number of sinix5.
1461*5e7646d2SAndroid Build Coastguard Worker	-sinix5.*)
1462*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed -e 's|sinix|sysv|'`
1463*5e7646d2SAndroid Build Coastguard Worker		;;
1464*5e7646d2SAndroid Build Coastguard Worker	-sinix*)
1465*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
1466*5e7646d2SAndroid Build Coastguard Worker		;;
1467*5e7646d2SAndroid Build Coastguard Worker	-tpf*)
1468*5e7646d2SAndroid Build Coastguard Worker		os=-tpf
1469*5e7646d2SAndroid Build Coastguard Worker		;;
1470*5e7646d2SAndroid Build Coastguard Worker	-triton*)
1471*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
1472*5e7646d2SAndroid Build Coastguard Worker		;;
1473*5e7646d2SAndroid Build Coastguard Worker	-oss*)
1474*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
1475*5e7646d2SAndroid Build Coastguard Worker		;;
1476*5e7646d2SAndroid Build Coastguard Worker	-svr4)
1477*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
1478*5e7646d2SAndroid Build Coastguard Worker		;;
1479*5e7646d2SAndroid Build Coastguard Worker	-svr3)
1480*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
1481*5e7646d2SAndroid Build Coastguard Worker		;;
1482*5e7646d2SAndroid Build Coastguard Worker	-sysvr4)
1483*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
1484*5e7646d2SAndroid Build Coastguard Worker		;;
1485*5e7646d2SAndroid Build Coastguard Worker	# This must come after -sysvr4.
1486*5e7646d2SAndroid Build Coastguard Worker	-sysv*)
1487*5e7646d2SAndroid Build Coastguard Worker		;;
1488*5e7646d2SAndroid Build Coastguard Worker	-ose*)
1489*5e7646d2SAndroid Build Coastguard Worker		os=-ose
1490*5e7646d2SAndroid Build Coastguard Worker		;;
1491*5e7646d2SAndroid Build Coastguard Worker	-es1800*)
1492*5e7646d2SAndroid Build Coastguard Worker		os=-ose
1493*5e7646d2SAndroid Build Coastguard Worker		;;
1494*5e7646d2SAndroid Build Coastguard Worker	-xenix)
1495*5e7646d2SAndroid Build Coastguard Worker		os=-xenix
1496*5e7646d2SAndroid Build Coastguard Worker		;;
1497*5e7646d2SAndroid Build Coastguard Worker	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1498*5e7646d2SAndroid Build Coastguard Worker		os=-mint
1499*5e7646d2SAndroid Build Coastguard Worker		;;
1500*5e7646d2SAndroid Build Coastguard Worker	-aros*)
1501*5e7646d2SAndroid Build Coastguard Worker		os=-aros
1502*5e7646d2SAndroid Build Coastguard Worker		;;
1503*5e7646d2SAndroid Build Coastguard Worker	-zvmoe)
1504*5e7646d2SAndroid Build Coastguard Worker		os=-zvmoe
1505*5e7646d2SAndroid Build Coastguard Worker		;;
1506*5e7646d2SAndroid Build Coastguard Worker	-dicos*)
1507*5e7646d2SAndroid Build Coastguard Worker		os=-dicos
1508*5e7646d2SAndroid Build Coastguard Worker		;;
1509*5e7646d2SAndroid Build Coastguard Worker	-nacl*)
1510*5e7646d2SAndroid Build Coastguard Worker		;;
1511*5e7646d2SAndroid Build Coastguard Worker	-none)
1512*5e7646d2SAndroid Build Coastguard Worker		;;
1513*5e7646d2SAndroid Build Coastguard Worker	*)
1514*5e7646d2SAndroid Build Coastguard Worker		# Get rid of the `-' at the beginning of $os.
1515*5e7646d2SAndroid Build Coastguard Worker		os=`echo $os | sed 's/[^-]*-//'`
1516*5e7646d2SAndroid Build Coastguard Worker		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1517*5e7646d2SAndroid Build Coastguard Worker		exit 1
1518*5e7646d2SAndroid Build Coastguard Worker		;;
1519*5e7646d2SAndroid Build Coastguard Workeresac
1520*5e7646d2SAndroid Build Coastguard Workerelse
1521*5e7646d2SAndroid Build Coastguard Worker
1522*5e7646d2SAndroid Build Coastguard Worker# Here we handle the default operating systems that come with various machines.
1523*5e7646d2SAndroid Build Coastguard Worker# The value should be what the vendor currently ships out the door with their
1524*5e7646d2SAndroid Build Coastguard Worker# machine or put another way, the most popular os provided with the machine.
1525*5e7646d2SAndroid Build Coastguard Worker
1526*5e7646d2SAndroid Build Coastguard Worker# Note that if you're going to try to match "-MANUFACTURER" here (say,
1527*5e7646d2SAndroid Build Coastguard Worker# "-sun"), then you have to tell the case statement up towards the top
1528*5e7646d2SAndroid Build Coastguard Worker# that MANUFACTURER isn't an operating system.  Otherwise, code above
1529*5e7646d2SAndroid Build Coastguard Worker# will signal an error saying that MANUFACTURER isn't an operating
1530*5e7646d2SAndroid Build Coastguard Worker# system, and we'll never get to this point.
1531*5e7646d2SAndroid Build Coastguard Worker
1532*5e7646d2SAndroid Build Coastguard Workercase $basic_machine in
1533*5e7646d2SAndroid Build Coastguard Worker	score-*)
1534*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1535*5e7646d2SAndroid Build Coastguard Worker		;;
1536*5e7646d2SAndroid Build Coastguard Worker	spu-*)
1537*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1538*5e7646d2SAndroid Build Coastguard Worker		;;
1539*5e7646d2SAndroid Build Coastguard Worker	*-acorn)
1540*5e7646d2SAndroid Build Coastguard Worker		os=-riscix1.2
1541*5e7646d2SAndroid Build Coastguard Worker		;;
1542*5e7646d2SAndroid Build Coastguard Worker	arm*-rebel)
1543*5e7646d2SAndroid Build Coastguard Worker		os=-linux
1544*5e7646d2SAndroid Build Coastguard Worker		;;
1545*5e7646d2SAndroid Build Coastguard Worker	arm*-semi)
1546*5e7646d2SAndroid Build Coastguard Worker		os=-aout
1547*5e7646d2SAndroid Build Coastguard Worker		;;
1548*5e7646d2SAndroid Build Coastguard Worker	c4x-* | tic4x-*)
1549*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1550*5e7646d2SAndroid Build Coastguard Worker		;;
1551*5e7646d2SAndroid Build Coastguard Worker	c8051-*)
1552*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1553*5e7646d2SAndroid Build Coastguard Worker		;;
1554*5e7646d2SAndroid Build Coastguard Worker	hexagon-*)
1555*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1556*5e7646d2SAndroid Build Coastguard Worker		;;
1557*5e7646d2SAndroid Build Coastguard Worker	tic54x-*)
1558*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1559*5e7646d2SAndroid Build Coastguard Worker		;;
1560*5e7646d2SAndroid Build Coastguard Worker	tic55x-*)
1561*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1562*5e7646d2SAndroid Build Coastguard Worker		;;
1563*5e7646d2SAndroid Build Coastguard Worker	tic6x-*)
1564*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1565*5e7646d2SAndroid Build Coastguard Worker		;;
1566*5e7646d2SAndroid Build Coastguard Worker	# This must come before the *-dec entry.
1567*5e7646d2SAndroid Build Coastguard Worker	pdp10-*)
1568*5e7646d2SAndroid Build Coastguard Worker		os=-tops20
1569*5e7646d2SAndroid Build Coastguard Worker		;;
1570*5e7646d2SAndroid Build Coastguard Worker	pdp11-*)
1571*5e7646d2SAndroid Build Coastguard Worker		os=-none
1572*5e7646d2SAndroid Build Coastguard Worker		;;
1573*5e7646d2SAndroid Build Coastguard Worker	*-dec | vax-*)
1574*5e7646d2SAndroid Build Coastguard Worker		os=-ultrix4.2
1575*5e7646d2SAndroid Build Coastguard Worker		;;
1576*5e7646d2SAndroid Build Coastguard Worker	m68*-apollo)
1577*5e7646d2SAndroid Build Coastguard Worker		os=-domain
1578*5e7646d2SAndroid Build Coastguard Worker		;;
1579*5e7646d2SAndroid Build Coastguard Worker	i386-sun)
1580*5e7646d2SAndroid Build Coastguard Worker		os=-sunos4.0.2
1581*5e7646d2SAndroid Build Coastguard Worker		;;
1582*5e7646d2SAndroid Build Coastguard Worker	m68000-sun)
1583*5e7646d2SAndroid Build Coastguard Worker		os=-sunos3
1584*5e7646d2SAndroid Build Coastguard Worker		;;
1585*5e7646d2SAndroid Build Coastguard Worker	m68*-cisco)
1586*5e7646d2SAndroid Build Coastguard Worker		os=-aout
1587*5e7646d2SAndroid Build Coastguard Worker		;;
1588*5e7646d2SAndroid Build Coastguard Worker	mep-*)
1589*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1590*5e7646d2SAndroid Build Coastguard Worker		;;
1591*5e7646d2SAndroid Build Coastguard Worker	mips*-cisco)
1592*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1593*5e7646d2SAndroid Build Coastguard Worker		;;
1594*5e7646d2SAndroid Build Coastguard Worker	mips*-*)
1595*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1596*5e7646d2SAndroid Build Coastguard Worker		;;
1597*5e7646d2SAndroid Build Coastguard Worker	or1k-*)
1598*5e7646d2SAndroid Build Coastguard Worker		os=-elf
1599*5e7646d2SAndroid Build Coastguard Worker		;;
1600*5e7646d2SAndroid Build Coastguard Worker	or32-*)
1601*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1602*5e7646d2SAndroid Build Coastguard Worker		;;
1603*5e7646d2SAndroid Build Coastguard Worker	*-tti)	# must be before sparc entry or we get the wrong os.
1604*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
1605*5e7646d2SAndroid Build Coastguard Worker		;;
1606*5e7646d2SAndroid Build Coastguard Worker	sparc-* | *-sun)
1607*5e7646d2SAndroid Build Coastguard Worker		os=-sunos4.1.1
1608*5e7646d2SAndroid Build Coastguard Worker		;;
1609*5e7646d2SAndroid Build Coastguard Worker	*-be)
1610*5e7646d2SAndroid Build Coastguard Worker		os=-beos
1611*5e7646d2SAndroid Build Coastguard Worker		;;
1612*5e7646d2SAndroid Build Coastguard Worker	*-haiku)
1613*5e7646d2SAndroid Build Coastguard Worker		os=-haiku
1614*5e7646d2SAndroid Build Coastguard Worker		;;
1615*5e7646d2SAndroid Build Coastguard Worker	*-ibm)
1616*5e7646d2SAndroid Build Coastguard Worker		os=-aix
1617*5e7646d2SAndroid Build Coastguard Worker		;;
1618*5e7646d2SAndroid Build Coastguard Worker	*-knuth)
1619*5e7646d2SAndroid Build Coastguard Worker		os=-mmixware
1620*5e7646d2SAndroid Build Coastguard Worker		;;
1621*5e7646d2SAndroid Build Coastguard Worker	*-wec)
1622*5e7646d2SAndroid Build Coastguard Worker		os=-proelf
1623*5e7646d2SAndroid Build Coastguard Worker		;;
1624*5e7646d2SAndroid Build Coastguard Worker	*-winbond)
1625*5e7646d2SAndroid Build Coastguard Worker		os=-proelf
1626*5e7646d2SAndroid Build Coastguard Worker		;;
1627*5e7646d2SAndroid Build Coastguard Worker	*-oki)
1628*5e7646d2SAndroid Build Coastguard Worker		os=-proelf
1629*5e7646d2SAndroid Build Coastguard Worker		;;
1630*5e7646d2SAndroid Build Coastguard Worker	*-hp)
1631*5e7646d2SAndroid Build Coastguard Worker		os=-hpux
1632*5e7646d2SAndroid Build Coastguard Worker		;;
1633*5e7646d2SAndroid Build Coastguard Worker	*-hitachi)
1634*5e7646d2SAndroid Build Coastguard Worker		os=-hiux
1635*5e7646d2SAndroid Build Coastguard Worker		;;
1636*5e7646d2SAndroid Build Coastguard Worker	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1637*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
1638*5e7646d2SAndroid Build Coastguard Worker		;;
1639*5e7646d2SAndroid Build Coastguard Worker	*-cbm)
1640*5e7646d2SAndroid Build Coastguard Worker		os=-amigaos
1641*5e7646d2SAndroid Build Coastguard Worker		;;
1642*5e7646d2SAndroid Build Coastguard Worker	*-dg)
1643*5e7646d2SAndroid Build Coastguard Worker		os=-dgux
1644*5e7646d2SAndroid Build Coastguard Worker		;;
1645*5e7646d2SAndroid Build Coastguard Worker	*-dolphin)
1646*5e7646d2SAndroid Build Coastguard Worker		os=-sysv3
1647*5e7646d2SAndroid Build Coastguard Worker		;;
1648*5e7646d2SAndroid Build Coastguard Worker	m68k-ccur)
1649*5e7646d2SAndroid Build Coastguard Worker		os=-rtu
1650*5e7646d2SAndroid Build Coastguard Worker		;;
1651*5e7646d2SAndroid Build Coastguard Worker	m88k-omron*)
1652*5e7646d2SAndroid Build Coastguard Worker		os=-luna
1653*5e7646d2SAndroid Build Coastguard Worker		;;
1654*5e7646d2SAndroid Build Coastguard Worker	*-next )
1655*5e7646d2SAndroid Build Coastguard Worker		os=-nextstep
1656*5e7646d2SAndroid Build Coastguard Worker		;;
1657*5e7646d2SAndroid Build Coastguard Worker	*-sequent)
1658*5e7646d2SAndroid Build Coastguard Worker		os=-ptx
1659*5e7646d2SAndroid Build Coastguard Worker		;;
1660*5e7646d2SAndroid Build Coastguard Worker	*-crds)
1661*5e7646d2SAndroid Build Coastguard Worker		os=-unos
1662*5e7646d2SAndroid Build Coastguard Worker		;;
1663*5e7646d2SAndroid Build Coastguard Worker	*-ns)
1664*5e7646d2SAndroid Build Coastguard Worker		os=-genix
1665*5e7646d2SAndroid Build Coastguard Worker		;;
1666*5e7646d2SAndroid Build Coastguard Worker	i370-*)
1667*5e7646d2SAndroid Build Coastguard Worker		os=-mvs
1668*5e7646d2SAndroid Build Coastguard Worker		;;
1669*5e7646d2SAndroid Build Coastguard Worker	*-next)
1670*5e7646d2SAndroid Build Coastguard Worker		os=-nextstep3
1671*5e7646d2SAndroid Build Coastguard Worker		;;
1672*5e7646d2SAndroid Build Coastguard Worker	*-gould)
1673*5e7646d2SAndroid Build Coastguard Worker		os=-sysv
1674*5e7646d2SAndroid Build Coastguard Worker		;;
1675*5e7646d2SAndroid Build Coastguard Worker	*-highlevel)
1676*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
1677*5e7646d2SAndroid Build Coastguard Worker		;;
1678*5e7646d2SAndroid Build Coastguard Worker	*-encore)
1679*5e7646d2SAndroid Build Coastguard Worker		os=-bsd
1680*5e7646d2SAndroid Build Coastguard Worker		;;
1681*5e7646d2SAndroid Build Coastguard Worker	*-sgi)
1682*5e7646d2SAndroid Build Coastguard Worker		os=-irix
1683*5e7646d2SAndroid Build Coastguard Worker		;;
1684*5e7646d2SAndroid Build Coastguard Worker	*-siemens)
1685*5e7646d2SAndroid Build Coastguard Worker		os=-sysv4
1686*5e7646d2SAndroid Build Coastguard Worker		;;
1687*5e7646d2SAndroid Build Coastguard Worker	*-masscomp)
1688*5e7646d2SAndroid Build Coastguard Worker		os=-rtu
1689*5e7646d2SAndroid Build Coastguard Worker		;;
1690*5e7646d2SAndroid Build Coastguard Worker	f30[01]-fujitsu | f700-fujitsu)
1691*5e7646d2SAndroid Build Coastguard Worker		os=-uxpv
1692*5e7646d2SAndroid Build Coastguard Worker		;;
1693*5e7646d2SAndroid Build Coastguard Worker	*-rom68k)
1694*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1695*5e7646d2SAndroid Build Coastguard Worker		;;
1696*5e7646d2SAndroid Build Coastguard Worker	*-*bug)
1697*5e7646d2SAndroid Build Coastguard Worker		os=-coff
1698*5e7646d2SAndroid Build Coastguard Worker		;;
1699*5e7646d2SAndroid Build Coastguard Worker	*-apple)
1700*5e7646d2SAndroid Build Coastguard Worker		os=-macos
1701*5e7646d2SAndroid Build Coastguard Worker		;;
1702*5e7646d2SAndroid Build Coastguard Worker	*-atari*)
1703*5e7646d2SAndroid Build Coastguard Worker		os=-mint
1704*5e7646d2SAndroid Build Coastguard Worker		;;
1705*5e7646d2SAndroid Build Coastguard Worker	*)
1706*5e7646d2SAndroid Build Coastguard Worker		os=-none
1707*5e7646d2SAndroid Build Coastguard Worker		;;
1708*5e7646d2SAndroid Build Coastguard Workeresac
1709*5e7646d2SAndroid Build Coastguard Workerfi
1710*5e7646d2SAndroid Build Coastguard Worker
1711*5e7646d2SAndroid Build Coastguard Worker# Here we handle the case where we know the os, and the CPU type, but not the
1712*5e7646d2SAndroid Build Coastguard Worker# manufacturer.  We pick the logical manufacturer.
1713*5e7646d2SAndroid Build Coastguard Workervendor=unknown
1714*5e7646d2SAndroid Build Coastguard Workercase $basic_machine in
1715*5e7646d2SAndroid Build Coastguard Worker	*-unknown)
1716*5e7646d2SAndroid Build Coastguard Worker		case $os in
1717*5e7646d2SAndroid Build Coastguard Worker			-riscix*)
1718*5e7646d2SAndroid Build Coastguard Worker				vendor=acorn
1719*5e7646d2SAndroid Build Coastguard Worker				;;
1720*5e7646d2SAndroid Build Coastguard Worker			-sunos*)
1721*5e7646d2SAndroid Build Coastguard Worker				vendor=sun
1722*5e7646d2SAndroid Build Coastguard Worker				;;
1723*5e7646d2SAndroid Build Coastguard Worker			-cnk*|-aix*)
1724*5e7646d2SAndroid Build Coastguard Worker				vendor=ibm
1725*5e7646d2SAndroid Build Coastguard Worker				;;
1726*5e7646d2SAndroid Build Coastguard Worker			-beos*)
1727*5e7646d2SAndroid Build Coastguard Worker				vendor=be
1728*5e7646d2SAndroid Build Coastguard Worker				;;
1729*5e7646d2SAndroid Build Coastguard Worker			-hpux*)
1730*5e7646d2SAndroid Build Coastguard Worker				vendor=hp
1731*5e7646d2SAndroid Build Coastguard Worker				;;
1732*5e7646d2SAndroid Build Coastguard Worker			-mpeix*)
1733*5e7646d2SAndroid Build Coastguard Worker				vendor=hp
1734*5e7646d2SAndroid Build Coastguard Worker				;;
1735*5e7646d2SAndroid Build Coastguard Worker			-hiux*)
1736*5e7646d2SAndroid Build Coastguard Worker				vendor=hitachi
1737*5e7646d2SAndroid Build Coastguard Worker				;;
1738*5e7646d2SAndroid Build Coastguard Worker			-unos*)
1739*5e7646d2SAndroid Build Coastguard Worker				vendor=crds
1740*5e7646d2SAndroid Build Coastguard Worker				;;
1741*5e7646d2SAndroid Build Coastguard Worker			-dgux*)
1742*5e7646d2SAndroid Build Coastguard Worker				vendor=dg
1743*5e7646d2SAndroid Build Coastguard Worker				;;
1744*5e7646d2SAndroid Build Coastguard Worker			-luna*)
1745*5e7646d2SAndroid Build Coastguard Worker				vendor=omron
1746*5e7646d2SAndroid Build Coastguard Worker				;;
1747*5e7646d2SAndroid Build Coastguard Worker			-genix*)
1748*5e7646d2SAndroid Build Coastguard Worker				vendor=ns
1749*5e7646d2SAndroid Build Coastguard Worker				;;
1750*5e7646d2SAndroid Build Coastguard Worker			-mvs* | -opened*)
1751*5e7646d2SAndroid Build Coastguard Worker				vendor=ibm
1752*5e7646d2SAndroid Build Coastguard Worker				;;
1753*5e7646d2SAndroid Build Coastguard Worker			-os400*)
1754*5e7646d2SAndroid Build Coastguard Worker				vendor=ibm
1755*5e7646d2SAndroid Build Coastguard Worker				;;
1756*5e7646d2SAndroid Build Coastguard Worker			-ptx*)
1757*5e7646d2SAndroid Build Coastguard Worker				vendor=sequent
1758*5e7646d2SAndroid Build Coastguard Worker				;;
1759*5e7646d2SAndroid Build Coastguard Worker			-tpf*)
1760*5e7646d2SAndroid Build Coastguard Worker				vendor=ibm
1761*5e7646d2SAndroid Build Coastguard Worker				;;
1762*5e7646d2SAndroid Build Coastguard Worker			-vxsim* | -vxworks* | -windiss*)
1763*5e7646d2SAndroid Build Coastguard Worker				vendor=wrs
1764*5e7646d2SAndroid Build Coastguard Worker				;;
1765*5e7646d2SAndroid Build Coastguard Worker			-aux*)
1766*5e7646d2SAndroid Build Coastguard Worker				vendor=apple
1767*5e7646d2SAndroid Build Coastguard Worker				;;
1768*5e7646d2SAndroid Build Coastguard Worker			-hms*)
1769*5e7646d2SAndroid Build Coastguard Worker				vendor=hitachi
1770*5e7646d2SAndroid Build Coastguard Worker				;;
1771*5e7646d2SAndroid Build Coastguard Worker			-mpw* | -macos*)
1772*5e7646d2SAndroid Build Coastguard Worker				vendor=apple
1773*5e7646d2SAndroid Build Coastguard Worker				;;
1774*5e7646d2SAndroid Build Coastguard Worker			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1775*5e7646d2SAndroid Build Coastguard Worker				vendor=atari
1776*5e7646d2SAndroid Build Coastguard Worker				;;
1777*5e7646d2SAndroid Build Coastguard Worker			-vos*)
1778*5e7646d2SAndroid Build Coastguard Worker				vendor=stratus
1779*5e7646d2SAndroid Build Coastguard Worker				;;
1780*5e7646d2SAndroid Build Coastguard Worker		esac
1781*5e7646d2SAndroid Build Coastguard Worker		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1782*5e7646d2SAndroid Build Coastguard Worker		;;
1783*5e7646d2SAndroid Build Coastguard Workeresac
1784*5e7646d2SAndroid Build Coastguard Worker
1785*5e7646d2SAndroid Build Coastguard Workerecho $basic_machine$os
1786*5e7646d2SAndroid Build Coastguard Workerexit
1787*5e7646d2SAndroid Build Coastguard Worker
1788*5e7646d2SAndroid Build Coastguard Worker# Local variables:
1789*5e7646d2SAndroid Build Coastguard Worker# eval: (add-hook 'write-file-hooks 'time-stamp)
1790*5e7646d2SAndroid Build Coastguard Worker# time-stamp-start: "timestamp='"
1791*5e7646d2SAndroid Build Coastguard Worker# time-stamp-format: "%:y-%02m-%02d"
1792*5e7646d2SAndroid Build Coastguard Worker# time-stamp-end: "'"
1793*5e7646d2SAndroid Build Coastguard Worker# End:
1794