Remove GM-specific hackery, no longer needed.
[deliverable/binutils-gdb.git] / config.sub
CommitLineData
4f183929 1#!/bin/sh
378fd382 2# Configuration validation subroutine script, version 1.1.
939d9e8a 3# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
378fd382
DZ
4# This file is (in principle) common to ALL GNU software.
5# The presence of a machine in this file suggests that SOME GNU software
6# can handle that machine. It does not imply ALL GNU software can.
a2ee3e6d
JW
7
8#This file is free software; you can redistribute it and/or modify
9#it under the terms of the GNU General Public License as published by
10#the Free Software Foundation; either version 2 of the License, or
11#(at your option) any later version.
12
13#This program is distributed in the hope that it will be useful,
14#but WITHOUT ANY WARRANTY; without even the implied warranty of
15#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16#GNU General Public License for more details.
17
18#You should have received a copy of the GNU General Public License
19#along with this program; if not, write to the Free Software
20#Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
4f183929
RP
22
23# Configuration subroutine to validate and canonicalize a configuration type.
24# Supply the specified configuration type as an argument.
25# If it is invalid, we print an error message on stderr and exit with code 1.
26# Otherwise, we print the canonical config type on stdout and succeed.
27
28# This file is supposed to be the same for all GNU packages
29# and recognize all the CPU types, system types and aliases
30# that are meaningful with *any* GNU software.
31# Each package is responsible for reporting which valid configurations
32# it does not support. The user should be able to distinguish
33# a failure to support a valid configuration from a meaningless
a2ee3e6d 34# configuration.
4f183929 35
a2ee3e6d
JW
36# The goal of this file is to map all the various variations of a given
37# machine specification into a single specification in the form:
38# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
27a2a371 39# It is wrong to echo any other type of specification.
8b204e6e 40
23ab00aa
KR
41if [ x$1 = x ]
42then
43 echo Configuration name missing. 1>&2
44 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
45 echo "or $0 ALIAS" 1>&2
46 echo where ALIAS is a recognized configuration type. 1>&2
47 exit 1
48fi
49
a2ee3e6d
JW
50# First pass through any local machine types.
51case $1 in
52 *local*)
53 echo $1
54 exit 0
55 ;;
56 *)
69e87de2 57 ;;
a2ee3e6d 58esac
b9fe720d 59
a2ee3e6d 60# Separate what the user gave into CPU-COMPANY and OS (if any).
378fd382 61basic_machine=`echo $1 | sed 's/-[^-]*$//'`
a2ee3e6d
JW
62if [ $basic_machine != $1 ]
63then os=`echo $1 | sed 's/.*-/-/'`
64else os=; fi
caebaa16 65
27a2a371
JW
66### Let's recognize common machines as not being operating systems so
67### that things like config.sub decstation-3100 work. We also
6559fbdb 68### recognize some manufacturers as not being operating systems, so we
27a2a371 69### can provide default operating systems below.
a2ee3e6d 70case $os in
939d9e8a
JL
71 -sun*os*)
72 # Prevent following clause from handling this invalid input.
73 ;;
a2ee3e6d
JW
74 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
75 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
939d9e8a
JL
76 -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \
77 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
a2ee3e6d 78 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
939d9e8a 79 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
aa6db781 80 -sim | -cisco) # CYGNUS LOCAL
a2ee3e6d
JW
81 os=
82 basic_machine=$1
83 ;;
378fd382 84 -scout) # CYGNUS LOCAL
f68be6f0 85 ;;
6559fbdb 86 -wrs) # CYGNUS LOCAL
300f6a4f
RS
87 os=vxworks
88 basic_machine=$1
89 ;;
939d9e8a
JL
90 -unixware) # CYGNUS LOCAL
91 os=-sysv4
92 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
93 ;;
94 -hiux*)
aa6db781 95 os=-hiuxwe2
939d9e8a
JL
96 ;;
97 -sco4)
98 os=-sco3.2v4
99 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
100 ;;
101 -sco3.2.[4-9]*)
102 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
103 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
104 ;;
27a2a371
JW
105 -sco3.2v[4-9]*)
106 # Don't forget version if it is 3.2v4 or newer.
6559fbdb 107 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
27a2a371 108 ;;
a2ee3e6d 109 -sco*)
378fd382 110 os=-sco3.2v2
6559fbdb 111 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
a2ee3e6d 112 ;;
27a2a371
JW
113 -isc)
114 os=-isc2.2
6559fbdb 115 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
27a2a371 116 ;;
9d784b19
RS
117 -clix*)
118 basic_machine=clipper-intergraph
119 ;;
378fd382 120 -isc*)
6559fbdb 121 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
a2ee3e6d 122 ;;
b2857593 123 -lynx*)
939d9e8a
JL
124 os=-lynxos
125 ;;
aa6db781
DE
126 -os9k)
127 os=-os9k
128 ;;
129 -os9)
130 os=-os9
131 ;;
a2ee3e6d 132esac
b9fe720d 133
a2ee3e6d
JW
134# Decode aliases for certain CPU-COMPANY combinations.
135case $basic_machine in
939d9e8a 136 # Recognize the basic CPU types without company name.
378fd382
DZ
137 # Some are omitted here because they have special meanings below.
138 tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
939d9e8a
JL
139 | tron | a29k | 580 | i960 | hppa1.0 | hppa1.1 \
140 | alpha | we32k | ns16k | clipper | sparclite | i370 \
141 | powerpc \
142 | h8300 | h8300h | sh \
143 | m88110 | sparc | m680[01234]0 | m683?2 | z8k | v70 \
144 | h8500 | mips64 | mipsel | mips64el) # CYGNUS LOCAL
a2ee3e6d
JW
145 basic_machine=$basic_machine-unknown
146 ;;
939d9e8a
JL
147 # Object if more than one company name word.
148 *-*-*)
149 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
150 exit 1
151 ;;
152 # Recognize the basic CPU types with company name.
378fd382
DZ
153 vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \
154 | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
a2ee3e6d 155 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
939d9e8a 156 | none-* | 580-* | cray2-* | i960-* | xmp-* | ymp-* \
27a2a371 157 | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
6559fbdb 158 | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
939d9e8a
JL
159 | powerpc \
160 | h8300-* | h8300h-* | sh-* \
161 | m88110-* | m680[01234]0-* | m683?2-* | z8k-* | h8500-* \
162 | mips64-* | mipsel-* | mips64el-*) # CYGNUS LOCAL
a2ee3e6d
JW
163 ;;
164 # Recognize the various machine names and aliases which stand
165 # for a CPU type and a company and sometimes even an OS.
378fd382 166 sparc64) # CYGNUS LOCAL
a2ee3e6d 167 basic_machine=sparc64-sun
aa6db781 168 os=-elf
a2ee3e6d 169 ;;
6559fbdb 170 sparc64-*) # CYGNUS LOCAL
a2ee3e6d 171 ;;
7054ee6d 172
939d9e8a
JL
173 mips3-*) # CYGNUS LOCAL
174 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
175 ;;
176 mips3) # CYGNUS LOCAL
177 basic_machine=mips64-unknown
178 ;;
ba7f177a
PB
179 dpx20 | dpx20-*) # CYGNUS LOCAL
180 basic_machine=rs6000-bull
181 os=-bosx
182 ;;
939d9e8a
JL
183 unixware) # CYGNUS LOCAL
184 os=-sysv4
185 basic_machine=i386-unknown
186 ;;
a2ee3e6d
JW
187 vaxv)
188 basic_machine=vax-dec
189 os=-sysv
190 ;;
191 vms)
192 basic_machine=vax-dec
193 os=-vms
194 ;;
939d9e8a
JL
195 i370-ibm* | ibm*)
196 basic_machine=i370-ibm
197 os=-mvs
198 ;;
378fd382 199 i386mach) # CYGNUS LOCAL
68cd7865
SEF
200 basic_machine=i386-mach
201 os=-mach
202 ;;
6559fbdb
RP
203 i[34]86v32)
204 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
939d9e8a 205 os=-sysv32
a2ee3e6d 206 ;;
6559fbdb
RP
207 i[34]86v4*)
208 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
209 os=-sysv4
210 ;;
211 i[34]86v)
212 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
213 os=-sysv
214 ;;
215 i[34]86sol2)
216 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
217 os=-solaris2
a2ee3e6d 218 ;;
939d9e8a
JL
219 vsta | i386-vsta) # CYGNUS LOCAL
220 basic_machine=i386-unknown
221 os=-vsta
222 ;;
378fd382 223 go32 | i386-go32) # CYGNUS LOCAL
2501643a
PB
224 basic_machine=i386-unknown
225 os=-go32
226 ;;
378fd382 227 i386-linux* | linux) # CYGNUS LOCAL
8bcd7db2
JW
228 basic_machine=i386-unknown
229 os=-linux
230 ;;
939d9e8a
JL
231 i386-linux*coff | linuxcoff) # CYGNUS LOCAL
232 basic_machine=i386-unknown
233 os=-linuxcoff
234 ;;
235 i386-linux*elf | linuxelf) # CYGNUS LOCAL
236 basic_machine=i386-unknown
237 os=-linuxelf
238 ;;
378fd382 239 386bsd) # CYGNUS LOCAL
23ab00aa
KR
240 basic_machine=i386-unknown
241 os=-bsd
242 ;;
9117f609
JK
243 netbsd386)
244 basic_machine=i386-unknown # CYGNUS LOCAL
245 os=-netbsd
246 ;;
a2ee3e6d
JW
247 spur)
248 basic_machine=spur-unknown
249 ;;
939d9e8a
JL
250 paragon)
251 basic_machine=i860-intel
252 os=-osf
253 ;;
378fd382
DZ
254 alliant | fx80)
255 basic_machine=fx80-alliant
a2ee3e6d
JW
256 ;;
257 convex-c1)
258 basic_machine=c1-convex
378fd382 259 os=-bsd
a2ee3e6d
JW
260 ;;
261 convex-c2)
262 basic_machine=c2-convex
378fd382 263 os=-bsd
a2ee3e6d
JW
264 ;;
265 convex-c32)
266 basic_machine=c32-convex
378fd382 267 os=-bsd
a2ee3e6d
JW
268 ;;
269 convex-c34)
270 basic_machine=c34-convex
378fd382 271 os=-bsd
a2ee3e6d
JW
272 ;;
273 convex-c38)
274 basic_machine=c38-convex
378fd382 275 os=-bsd
a2ee3e6d
JW
276 ;;
277 m88k-omron*)
278 basic_machine=m88k-omron
279 ;;
280 merlin)
281 basic_machine=ns32k-utek
282 os=-sysv
283 ;;
284 crds | unos)
285 basic_machine=m68k-crds
286 ;;
378fd382
DZ
287 elxsi)
288 basic_machine=elxsi-elxsi
289 os=-bsd
290 ;;
a2ee3e6d
JW
291 encore | umax | mmax)
292 basic_machine=ns32k-encore
a2ee3e6d
JW
293 ;;
294 genix)
295 basic_machine=ns32k-ns
296 ;;
378fd382
DZ
297 iris | iris4d | \
298 iris3 | iris4) # CYGNUS LOCAL
68cd7865 299 basic_machine=mips-sgi
378fd382
DZ
300 case $os in
301 -irix*)
302 ;;
303 *)
304 os=-irix4
305 ;;
306 esac
a2ee3e6d
JW
307 ;;
308 news | news700 | news800 | news900)
309 basic_machine=m68k-sony
310 os=-newsos
311 ;;
312 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
378fd382 313 basic_machine=m68000-att
a2ee3e6d 314 ;;
378fd382 315 3b*)
de0f17d8 316 basic_machine=we32k-att
de0f17d8 317 ;;
a2ee3e6d
JW
318 delta | 3300 | motorola-3300 | motorola-delta \
319 | 3300-motorola | delta-motorola)
320 basic_machine=m68k-motorola
321 ;;
322 balance)
323 basic_machine=ns32k-sequent
324 os=-dynix
325 ;;
326 pc532)
327 basic_machine=ns32k-pc532
328 ;;
329 symmetry)
330 basic_machine=i386-sequent
331 os=-dynix
332 ;;
333 sun2)
334 basic_machine=m68000-sun
335 ;;
336 sun2os3)
337 basic_machine=m68000-sun
338 os=-sunos3
339 ;;
340 sun2os4)
341 basic_machine=m68000-sun
342 os=-sunos4
343 ;;
344 sun3os3)
345 basic_machine=m68k-sun
346 os=-sunos3
347 ;;
348 sun3os4)
349 basic_machine=m68k-sun
350 os=-sunos4
351 ;;
352 sun4os3)
353 basic_machine=sparc-sun
354 os=-sunos3
355 ;;
356 sun4os4)
357 basic_machine=sparc-sun
358 os=-sunos4
359 ;;
378fd382 360 sun4sol2) # CYGNUS LOCAL
8bcd7db2
JW
361 basic_machine=sparc-sun
362 os=-solaris2
363 ;;
378fd382 364 z8ksim) # CYGNUS LOCAL
984b27cb 365 basic_machine=z8k-zilog
de0f17d8
BK
366 os=-sim
367 ;;
a2ee3e6d
JW
368 sun3)
369 basic_machine=m68k-sun
370 ;;
371 sun4)
372 basic_machine=sparc-sun
373 ;;
378fd382 374 msdos) # CYGNUS LOCAL
afba2b22
ILT
375 basic_machine=i386-unknown
376 os=-msdos
377 ;;
a2ee3e6d 378 pbd)
378fd382
DZ
379 basic_machine=sparc-tti
380 ;;
381 pbb)
382 basic_machine=m68k-tti
a2ee3e6d
JW
383 ;;
384 sun386 | sun386i | roadrunner)
385 basic_machine=i386-sun
386 ;;
387 ps2)
388 basic_machine=i386-ibm
389 ;;
378fd382
DZ
390 fx2800)
391 basic_machine=i860-alliant
392 ;;
a2ee3e6d
JW
393 next)
394 basic_machine=m68k-next
ad1f7512 395 os=-bsd
a2ee3e6d 396 ;;
378fd382
DZ
397 amiga)
398 basic_machine=m68k-cbm
399 ;;
27a2a371
JW
400 amigados)
401 basic_machine=m68k-cbm
402 os=-amigados
403 ;;
404 amigaunix | amix)
405 basic_machine=m68k-cbm
406 os=-sysv4
407 ;;
a2ee3e6d
JW
408 hp9k3[2-9][0-9])
409 basic_machine=m68k-hp
410 ;;
411 hp9k31[0-9] | hp9k2[0-9][0-9])
412 basic_machine=m68000-hp
413 ;;
8bcd7db2
JW
414 hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
415 basic_machine=hppa1.1-hp
416 ;;
417 hp9k8[0-9][0-9] | hp8[0-9][0-9])
418 basic_machine=hppa1.0-hp
a2ee3e6d 419 ;;
9117f609
JK
420 h3050r* | hppahitachi)
421 basic_machine=hppa1.1-hitachi
422 ;;
a2ee3e6d
JW
423 isi68 | isi)
424 basic_machine=m68k-isi
425 os=-sysv
426 ;;
427 apollo68)
428 basic_machine=m68k-apollo
429 os=-sysv
430 ;;
378fd382 431 apollo68bsd) # CYGNUS LOCAL
68cd7865
SEF
432 basic_machine=m68k-apollo
433 os=-bsd
434 ;;
a2ee3e6d
JW
435 altos | altos3068)
436 basic_machine=m68k-altos
437 ;;
438 miniframe)
9d784b19 439 basic_machine=m68010-convergent
a2ee3e6d
JW
440 ;;
441 tower | tower-32)
442 basic_machine=m68k-ncr
443 ;;
444 news-3600 | risc-news)
445 basic_machine=mips-sony
446 os=-newsos
447 ;;
378fd382 448 st2000) # CYGNUS LOCAL
012be2b1 449 basic_machine=m68k-tandem
68cd7865 450 ;;
9117f609 451 m6*bug) # CYGNUS LOCAL
9d784b19
RS
452 basic_machine=m68k-bug
453 os=-coff
454 ;;
455 rom68k) # CYGNUS LOCAL
456 basic_machine=m68k-rom68k
457 os=-coff
458 ;;
459 monitor) # CYGNUS LOCAL
460 basic_machine=m68k-rom68k
461 os=-coff
462 ;;
378fd382 463 decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn)
a2ee3e6d
JW
464 basic_machine=mips-dec
465 ;;
466 magnum | m3230)
467 basic_machine=mips-mips
468 os=-sysv
469 ;;
470 gmicro)
471 basic_machine=tron-gmicro
472 os=-sysv
473 ;;
474 rtpc | rtpc-*)
475 basic_machine=romp-ibm
476 ;;
477 am29k)
478 basic_machine=a29k-none
479 os=-bsd
480 ;;
481 amdahl)
482 basic_machine=580-amdahl
483 os=-sysv
484 ;;
378fd382 485 stratus) # CYGNUS LOCAL
dd16baba
SEF
486 basic_machine=i860-stratus
487 os=-sysv4
488 ;;
a2ee3e6d
JW
489 cray | ymp)
490 basic_machine=ymp-cray
491 os=-unicos
492 ;;
493 cray2)
494 basic_machine=cray2-cray
495 os=-unicos
496 ;;
497 xmp)
498 basic_machine=xmp-cray
499 os=-unicos
500 ;;
501 delta88)
502 basic_machine=m88k-motorola
6559fbdb 503 os=-sysv3
a2ee3e6d 504 ;;
939d9e8a 505 dpx2* | dpx2*-bull)
a2ee3e6d 506 basic_machine=m68k-bull
939d9e8a 507 os=-sysv3
a2ee3e6d
JW
508 ;;
509 ebmon29k)
510 basic_machine=a29k-amd
511 os=-ebmon
512 ;;
378fd382 513 h8300hms) # CYGNUS LOCAL
a2ee3e6d 514 basic_machine=h8300-hitachi
2501643a
PB
515 os=-hms
516 ;;
939d9e8a 517 sh*) # CYGNUS LOCAL
984b27cb
SC
518 basic_machine=sh-hitachi
519 os=-hms
520 ;;
521
522 h8500hms) # CYGNUS LOCAL
523 basic_machine=h8500-hitachi
524 os=-hms
525 ;;
378fd382
DZ
526 h8300xray) # CYGNUS LOCAL
527 basic_machine=h8300-hitachi
528 os=-xray
529 ;;
530 h8300hds)
531 basic_machine=h8300-hitachi
532 os=-hds
533 ;;
534 udi29k) # CYGNUS LOCAL
2501643a
PB
535 basic_machine=a29k-amd
536 os=-udi
537 ;;
378fd382 538 a29khif) # CYGNUS LOCAL
2501643a
PB
539 basic_machine=a29k-amd
540 os=-udi
541 ;;
378fd382 542 sa29200) # CYGNUS LOCAL
2501643a
PB
543 basic_machine=a29k-amd
544 os=-udi
545 ;;
a2ee3e6d
JW
546 harris)
547 basic_machine=m88k-harris
6559fbdb 548 os=-sysv3
a2ee3e6d
JW
549 ;;
550 hp300bsd)
551 basic_machine=m68k-hp
552 os=-bsd
553 ;;
554 hp300hpux)
555 basic_machine=m68k-hp
556 os=-hpux
557 ;;
99a5da15
KR
558 hppaosf)
559 basic_machine=hppa1.1-hp
560 os=-osf
561 ;;
a2ee3e6d 562 ncr3000)
afba2b22 563 basic_machine=i486-ncr
a2ee3e6d
JW
564 os=-sysv4
565 ;;
378fd382 566 necv70) # CYGNUS LOCAL
68cd7865
SEF
567 basic_machine=v70-nec
568 os=-sysv
569 ;;
a2ee3e6d
JW
570 news1000)
571 basic_machine=m68030-sony
572 os=-newsos
573 ;;
574 nindy960)
575 basic_machine=i960-intel
576 os=-nindy
577 ;;
578 pn)
579 basic_machine=pn-gould
a2ee3e6d
JW
580 ;;
581 np1)
582 basic_machine=np1-gould
a2ee3e6d
JW
583 ;;
584 ultra3)
585 basic_machine=a29k-nyu
c1e296fc 586 os=-sym1
a2ee3e6d
JW
587 ;;
588 vxworks960)
589 basic_machine=i960-wrs
590 os=-vxworks
591 ;;
592 vxworks68)
593 basic_machine=m68k-wrs
594 os=-vxworks
595 ;;
300f6a4f 596 es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
afba2b22
ILT
597 basic_machine=m68k-ericsson
598 os=-ose
599 ;;
378fd382 600 OSE68000 | ose68000) # CYGNUS LOCAL
afba2b22
ILT
601 basic_machine=m68000-ericsson
602 os=-ose
603 ;;
378fd382 604 os68k) # CYGNUS LOCAL
dd16baba
SEF
605 basic_machine=m68k-none
606 os=-os68k
607 ;;
378fd382 608 sparclite-wrs) # CYGNUS LOCAL
fb90daeb
ME
609 basic_machine=sparclite-wrs
610 os=-vxworks
611 ;;
378fd382 612 sparcfrw) # CYGNUS LOCAL
c73e3fe4
JW
613 basic_machine=sparcfrw-sun
614 os=-sunos4
615 ;;
378fd382 616 sparcfrwcompat) # CYGNUS LOCAL
c73e3fe4
JW
617 basic_machine=sparcfrwcompat-sun
618 os=-sunos4
619 ;;
378fd382 620 sparclitefrw) # CYGNUS LOCAL
c73e3fe4 621 basic_machine=sparclitefrw-fujitsu
c73e3fe4 622 ;;
378fd382 623 sparclitefrwcompat) # CYGNUS LOCAL
c73e3fe4 624 basic_machine=sparclitefrwcompat-fujitsu
c73e3fe4 625 ;;
378fd382 626 adobe68k) # CYGNUS LOCAL
f68be6f0
ILT
627 basic_machine=m68010-adobe
628 os=-scout
629 ;;
ad1f7512 630
27a2a371
JW
631 xps | xps100)
632 basic_machine=xps100-honeywell
633 ;;
a2ee3e6d
JW
634 none)
635 basic_machine=none-none
636 os=-none
637 ;;
69e87de2 638
a2ee3e6d
JW
639# Here we handle the default manufacturer of certain CPU types. It is in
640# some cases the only manufacturer, in others, it is the most popular.
641 mips)
642 basic_machine=mips-mips
643 ;;
644 romp)
645 basic_machine=romp-ibm
646 ;;
647 rs6000)
648 basic_machine=rs6000-ibm
649 ;;
650 vax)
651 basic_machine=vax-dec
652 ;;
378fd382
DZ
653 we32k)
654 basic_machine=we32k-att
655 ;;
6559fbdb
RP
656 sparc)
657 basic_machine=sparc-sun
658 ;;
27a2a371
JW
659 cydra)
660 basic_machine=cydra-cydrome
661 ;;
662 orion)
663 basic_machine=orion-highlevel
664 ;;
665 orion105)
666 basic_machine=clipper-highlevel
667 ;;
939d9e8a
JL
668## start-sanitize-mpw
669 mac) # CYGNUS LOCAL
670 basic_machine=m68k-apple
671 ;;
672 mpw) # CYGNUS LOCAL
673 basic_machine=m68k-apple
674 ;;
675## end-sanitize-mpw
a2ee3e6d
JW
676 *)
677 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
4f183929 678 exit 1
a2ee3e6d 679 ;;
4f183929
RP
680esac
681
378fd382
DZ
682# Here we canonicalize certain aliases for manufacturers.
683case $basic_machine in
684 *-digital*)
685 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
686 ;;
687 *-commodore*)
688 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
689 ;;
690 *)
691 ;;
692esac
693
a2ee3e6d 694# Decode manufacturer-specific aliases for certain operating systems.
e6602723 695
b48eb8b7 696if [ x"$os" != x"" ]
a2ee3e6d
JW
697then
698case $os in
6559fbdb
RP
699 # -solaris* is a basic system type, with this one exception.
700 -solaris1 | -solaris1.*)
701 os=`echo $os | sed -e 's|solaris1|sunos4|'`
702 ;;
b2eed00f
DE
703 -solaris)
704 os=-solaris2
705 ;;
a2ee3e6d
JW
706 # First accept the basic system types.
707 # The portable systems comes first.
708 # Each alternative must end in a *, to match a version number.
939d9e8a
JL
709 # -sysv* is not here because it comes later, after sysvr4.
710 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
711 | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \
378fd382
DZ
712 | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
713 | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
939d9e8a 714 | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
27a2a371 715 | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
939d9e8a
JL
716 | -hiux* | -386bsd* | -netbsd* | -riscix* | -lynxos* \
717 | -go32 | -vsta | -sim | -es1800* | -udi | -hms* | -xray | -hds* \
718 | -os68k* | -none* | -v88r* | -aout* | -coff | -elf* | -bosx* \
aa6db781 719 | -abug | -ecoff* | -netware* | -os9* )
ba7f177a 720 # The last three lines above are CYGNUS LOCAL
2501643a 721 ;;
6559fbdb
RP
722 -sunos5*)
723 os=`echo $os | sed -e 's|sunos5|solaris2|'`
724 ;;
725 -sunos6*)
726 os=`echo $os | sed -e 's|sunos6|solaris3|'`
727 ;;
a2ee3e6d 728 -osfrose*)
378fd382 729 os=-osfrose
a2ee3e6d
JW
730 ;;
731 -osf*)
378fd382
DZ
732 os=-osf
733 ;;
734 -utek*)
a2ee3e6d
JW
735 os=-bsd
736 ;;
737 -dynix*)
738 os=-bsd
739 ;;
378fd382
DZ
740 -acis*)
741 os=-aos
a2ee3e6d 742 ;;
378fd382 743 -386bsd) # CYGNUS LOCAL
23ab00aa
KR
744 os=-bsd
745 ;;
68cd7865 746 -ctix* | -uts*)
a2ee3e6d
JW
747 os=-sysv
748 ;;
378fd382
DZ
749 -triton*)
750 os=-sysv3
751 ;;
752 -oss*)
753 os=-sysv3
754 ;;
c1e296fc
SG
755 -svr4)
756 os=-sysv4
757 ;;
939d9e8a
JL
758 -unixware)
759 os=-sysv4
760 ;;
c1e296fc
SG
761 -svr3)
762 os=-sysv3
763 ;;
939d9e8a
JL
764 -sysvr4)
765 os=-sysv4
766 ;;
767 # This must come after -sysvr4.
768 -sysv*)
769 ;;
378fd382 770 -ose*) # CYGNUS LOCAL
afba2b22
ILT
771 os=-ose
772 ;;
378fd382 773 -es1800*) # CYGNUS LOCAL
afba2b22
ILT
774 os=-ose
775 ;;
27a2a371
JW
776 -xenix)
777 os=-xenix
778 ;;
378fd382
DZ
779 -none)
780 ;;
a2ee3e6d
JW
781 *)
782 # Get rid of the `-' at the beginning of $os.
783 os=`echo $1 | sed 's/[^-]*-//'`
784 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
785 exit 1
786 ;;
69e87de2 787esac
a2ee3e6d 788else
69e87de2 789
a2ee3e6d
JW
790# Here we handle the default operating systems that come with various machines.
791# The value should be what the vendor currently ships out the door with their
792# machine or put another way, the most popular os provided with the machine.
27a2a371
JW
793
794# Note that if you're going to try to match "-MANUFACTURER" here (say,
795# "-sun"), then you have to tell the case statement up towards the top
796# that MANUFACTURER isn't an operating system. Otherwise, code above
797# will signal an error saying that MANUFACTURER isn't an operating
798# system, and we'll never get to this point.
799
a2ee3e6d 800case $basic_machine in
939d9e8a
JL
801 *-acorn)
802 os=-riscix1.2
803 ;;
a2ee3e6d 804 *-dec | vax-*)
378fd382 805 os=-ultrix4.2
a2ee3e6d
JW
806 ;;
807 i386-sun)
378fd382 808 os=-sunos4.0.2
a2ee3e6d
JW
809 ;;
810 m68000-sun)
811 os=-sunos3
812 # This also exists in the configure program, but was not the
813 # default.
814 # os=-sunos4
815 ;;
aa6db781
DE
816 m68*-cisco)
817 os=-aout
818 ;;
819 mips*-cisco)
820 os=-elf
821 ;;
378fd382
DZ
822 *-tti) # must be before sparc entry or we get the wrong os.
823 os=-sysv3
a2ee3e6d 824 ;;
378fd382
DZ
825 sparc-* | *-sun)
826 os=-sunos4.1.1
a2ee3e6d
JW
827 ;;
828 *-ibm)
829 os=-aix
830 ;;
831 *-hp)
832 os=-hpux
833 ;;
9117f609
JK
834 *-hitachi)
835 os=-hiux
836 ;;
27a2a371 837 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
a2ee3e6d
JW
838 os=-sysv
839 ;;
378fd382
DZ
840 *-cbm)
841 os=-amigados
842 ;;
a2ee3e6d
JW
843 *-dg)
844 os=-dgux
845 ;;
378fd382
DZ
846 *-dolphin)
847 os=-sysv3
848 ;;
a2ee3e6d
JW
849 m88k-omron*)
850 os=-luna
851 ;;
a70c9959
KR
852 *-sequent)
853 os=-bsd
854 ;;
a2ee3e6d
JW
855 *-crds)
856 os=-unos
857 ;;
858 *-ns)
859 os=-genix
860 ;;
939d9e8a
JL
861 i370-*)
862 os=-mvs
863 ;;
864 *-next)
865 os=-bsd
866 ;;
378fd382
DZ
867 i[34]86-*)
868 os=-sco3.2v2
a2ee3e6d 869 ;;
27a2a371
JW
870 *-gould)
871 os=-sysv
872 ;;
873 *-highlevel)
874 os=-bsd
875 ;;
876 *-encore)
877 os=-bsd
878 ;;
879 *-sgi)
880 os=-irix
881 ;;
882 *-masscomp)
883 os=-rtu
884 ;;
9d784b19
RS
885 *-rom68k) # CYGNUS LOCAL
886 os=-coff
887 ;;
888 *-*bug) # CYGNUS LOCAL
889 os=-coff
890 ;;
939d9e8a
JL
891## start-sanitize-mpw
892 *-apple) # CYGNUS LOCAL
893 os=-mpw
894 ;;
895## end-sanitize-mpw
a2ee3e6d
JW
896 *)
897 os=-none
898 ;;
69e87de2 899esac
a2ee3e6d 900fi
69e87de2 901
a2ee3e6d
JW
902# Here we handle the case where we know the os, and the CPU type, but not the
903# manufacturer. We pick the logical manufacturer.
904vendor=unknown
905case $basic_machine in
906 *-unknown)
907 case $os in
939d9e8a
JL
908 -riscix*)
909 vendor=acorn
910 ;;
a2ee3e6d
JW
911 -sunos*)
912 vendor=sun
913 ;;
6559fbdb 914 -bosx*) # CYGNUS LOCAL
ba7f177a
PB
915 vendor=bull
916 ;;
b2eed00f
DE
917 -lynxos*)
918 vendor=lynx
919 ;;
a2ee3e6d
JW
920 -aix*)
921 vendor=ibm
922 ;;
923 -hpux*)
924 vendor=hp
925 ;;
9117f609
JK
926 -hiux*)
927 vendor=hitachi
928 ;;
a2ee3e6d
JW
929 -unos*)
930 vendor=crds
931 ;;
932 -dgux*)
933 vendor=dg
934 ;;
935 -luna*)
936 vendor=omron
937 ;;
938 -genix*)
939 vendor=ns
940 ;;
939d9e8a
JL
941 -mvs*)
942 vendor=ibm
943 ;;
944 -vxworks*)
945 vendor=wrs # CYGNUS LOCAL
afba2b22 946 ;;
984b27cb
SC
947 -hms*) # CYGNUS LOCAL
948 vendor=hitachi
949 ;;
939d9e8a
JL
950## start-sanitize-mpw
951 -mpw*) # CYGNUS LOCAL
952 vendor=apple
953 ;;
954## end-sanitize-mpw
a2ee3e6d
JW
955 esac
956 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
957 ;;
4f183929
RP
958esac
959
a2ee3e6d 960echo $basic_machine$os
This page took 0.315892 seconds and 4 git commands to generate.