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