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