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