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