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