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