update copyright
[official-gcc.git] / config.sub
blobff0652c903a95a9215a42803230b88cb096bbd0e
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
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.
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.
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.
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., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
28 # Configuration subroutine to validate and canonicalize a configuration type.
29 # Supply the specified configuration type as an argument.
30 # If it is invalid, we print an error message on stderr and exit with code 1.
31 # Otherwise, we print the canonical config type on stdout and succeed.
33 # This file is supposed to be the same for all GNU packages
34 # and recognize all the CPU types, system types and aliases
35 # that are meaningful with *any* GNU software.
36 # Each package is responsible for reporting which valid configurations
37 # it does not support. The user should be able to distinguish
38 # a failure to support a valid configuration from a meaningless
39 # configuration.
41 # The goal of this file is to map all the various variations of a given
42 # machine specification into a single specification in the form:
43 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44 # or in some cases, the newer four-part form:
45 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46 # It is wrong to echo any other type of specification.
48 if [ x$1 = x ]
49 then
50 echo Configuration name missing. 1>&2
51 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
52 echo "or $0 ALIAS" 1>&2
53 echo where ALIAS is a recognized configuration type. 1>&2
54 exit 1
57 # First pass through any local machine types.
58 case $1 in
59 *local*)
60 echo $1
61 exit 0
65 esac
67 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68 # Here we must recognize all the valid KERNEL-OS combinations.
69 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
70 case $maybe_os in
71 linux-gnu*)
72 os=-$maybe_os
73 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
76 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
77 if [ $basic_machine != $1 ]
78 then os=`echo $1 | sed 's/.*-/-/'`
79 else os=; fi
81 esac
83 ### Let's recognize common machines as not being operating systems so
84 ### that things like config.sub decstation-3100 work. We also
85 ### recognize some manufacturers as not being operating systems, so we
86 ### can provide default operating systems below.
87 case $os in
88 -sun*os*)
89 # Prevent following clause from handling this invalid input.
91 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
92 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
93 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
94 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
95 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
96 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
97 -apple)
98 os=
99 basic_machine=$1
101 -sim | -cisco | -oki | -wec | -winbond ) # CYGNUS LOCAL
103 basic_machine=$1
105 -scout) # CYGNUS LOCAL
107 -wrs) # CYGNUS LOCAL
108 os=vxworks
109 basic_machine=$1
111 -hiux*)
112 os=-hiuxwe2
114 -sco5)
115 os=-sco3.2v5
116 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
118 -sco4)
119 os=-sco3.2v4
120 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
122 -sco3.2.[4-9]*)
123 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
124 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
126 -sco3.2v[4-9]*)
127 # Don't forget version if it is 3.2v4 or newer.
128 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
130 -sco*)
131 os=-sco3.2v2
132 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
134 -udk*)
135 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
137 -isc)
138 os=-isc2.2
139 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
141 -clix*)
142 basic_machine=clipper-intergraph
144 -isc*)
145 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
147 -lynx*)
148 os=-lynxos
150 -ptx*)
151 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
153 -windowsnt*)
154 os=`echo $os | sed -e 's/windowsnt/winnt/'`
156 -psos*)
157 os=-psos
159 esac
161 # Decode aliases for certain CPU-COMPANY combinations.
162 case $basic_machine in
163 # Recognize the basic CPU types without company name.
164 # Some are omitted here because they have special meanings below.
165 tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
166 | arme[lb] | pyramid | mn10200 | mn10300 \
167 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
168 | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
169 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
170 | 1750a | dsp16xx | pdp11 \
171 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
172 | mipstx39 | mipstx39el \
173 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
174 basic_machine=$basic_machine-unknown
176 m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
177 | h8500 | w65) # CYGNUS LOCAL
179 thumb)
180 basic_machine=$basic_machine-unknown
182 mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
183 basic_machine=$basic_machine-unknown
185 mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
186 basic_machine=$basic_machine-unknown
188 mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
189 basic_machine=$basic_machine-unknown
191 mips16)
192 basic_machine=$basic_machine-unknown
194 d10v)
195 basic_machine=$basic_machine-unknown
197 # We use `pc' rather than `unknown'
198 # because (1) that's what they normally are, and
199 # (2) the word "unknown" tends to confuse beginning users.
200 i[34567]86)
201 basic_machine=$basic_machine-pc
203 # Object if more than one company name word.
204 *-*-*)
205 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
206 exit 1
208 # Recognize the basic CPU types with company name.
209 vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
210 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
211 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
212 | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
213 | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
214 | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
215 | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
216 | xps100-* | clipper-* | orion-* \
217 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
218 | sparc64-* | sparc86x-* | mips64-* | mipsel-* \
219 | mips64el-* | mips64orion-* | mips64orionel-* \
220 | mipstx39-* | mipstx39el-* \
221 | f301-*)
223 m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
225 thumb-*) # CYGNUS LOCAL angela/thumb
227 # start-sanitize-sky
228 dvp-* | txvu-*)
230 # end-sanitize-sky
231 v850-*) # CYGNUS LOCAL
233 # start-sanitize-v850e
234 v850e-*) # CYGNUS LOCAL
236 v850ea-*) # CYGNUS LOCAL
238 # end-sanitize-v850e
239 d30v-*) # CYGNUS LOCAL
241 # start-sanitize-vr4320
242 mips64vr4320-* | mips64vr4320el-*)
244 # end-sanitize-vr4320
245 mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
247 mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
249 # start-sanitize-tx19
250 mipstx19-* | mipstx19el-*)
252 # end-sanitize-tx19
253 # start-sanitize-tx49
254 mips64tx49-* | mips64tx49el-*)
256 # end-sanitize-tx49
257 # start-sanitize-r5900
258 mips64r5900-* | mips64r5900el-*) # CYGNUS LOCAL gavin/r5900
260 # end-sanitize-r5900
261 mips16-*) # CYGNUS LOCAL krk/mips16
263 tic30-*) # CYGNUS LOCAL ian/tic30
265 c30-*) # CYGNUS LOCAL ian/tic30
266 basic_machine=tic30-unknown
268 # start-sanitize-tic80
269 tic80-*) # CYGNUS LOCAL fnf/TIc80
271 # end-sanitize-tic80
272 # Recognize the various machine names and aliases which stand
273 # for a CPU type and a company and sometimes even an OS.
274 386bsd) # CYGNUS LOCAL
275 basic_machine=i386-unknown
276 os=-bsd
278 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
279 basic_machine=m68000-att
281 3b*)
282 basic_machine=we32k-att
284 a29khif) # CYGNUS LOCAL
285 basic_machine=a29k-amd
286 os=-udi
288 adobe68k) # CYGNUS LOCAL
289 basic_machine=m68010-adobe
290 os=-scout
292 alliant | fx80)
293 basic_machine=fx80-alliant
295 altos | altos3068)
296 basic_machine=m68k-altos
298 am29k)
299 basic_machine=a29k-none
300 os=-bsd
302 amdahl)
303 basic_machine=580-amdahl
304 os=-sysv
306 amiga | amiga-*)
307 basic_machine=m68k-cbm
309 amigaos | amigados)
310 basic_machine=m68k-cbm
311 os=-amigaos
313 amigaunix | amix)
314 basic_machine=m68k-cbm
315 os=-sysv4
317 apollo68)
318 basic_machine=m68k-apollo
319 os=-sysv
321 apollo68bsd) # CYGNUS LOCAL
322 basic_machine=m68k-apollo
323 os=-bsd
325 aux)
326 basic_machine=m68k-apple
327 os=-aux
329 balance)
330 basic_machine=ns32k-sequent
331 os=-dynix
333 convex-c1)
334 basic_machine=c1-convex
335 os=-bsd
337 convex-c2)
338 basic_machine=c2-convex
339 os=-bsd
341 convex-c32)
342 basic_machine=c32-convex
343 os=-bsd
345 convex-c34)
346 basic_machine=c34-convex
347 os=-bsd
349 convex-c38)
350 basic_machine=c38-convex
351 os=-bsd
353 cray | ymp)
354 basic_machine=ymp-cray
355 os=-unicos
357 cray2)
358 basic_machine=cray2-cray
359 os=-unicos
361 [ctj]90-cray)
362 basic_machine=c90-cray
363 os=-unicos
365 crds | unos)
366 basic_machine=m68k-crds
368 da30 | da30-*)
369 basic_machine=m68k-da30
371 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
372 basic_machine=mips-dec
374 delta | 3300 | motorola-3300 | motorola-delta \
375 | 3300-motorola | delta-motorola)
376 basic_machine=m68k-motorola
378 delta88)
379 basic_machine=m88k-motorola
380 os=-sysv3
382 dpx20 | dpx20-*)
383 basic_machine=rs6000-bull
384 os=-bosx
386 dpx2* | dpx2*-bull)
387 basic_machine=m68k-bull
388 os=-sysv3
390 ebmon29k)
391 basic_machine=a29k-amd
392 os=-ebmon
394 elxsi)
395 basic_machine=elxsi-elxsi
396 os=-bsd
398 encore | umax | mmax)
399 basic_machine=ns32k-encore
401 es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
402 basic_machine=m68k-ericsson
403 os=-ose
405 fx2800)
406 basic_machine=i860-alliant
408 genix)
409 basic_machine=ns32k-ns
411 gmicro)
412 basic_machine=tron-gmicro
413 os=-sysv
415 h3050r* | hiux*)
416 basic_machine=hppa1.1-hitachi
417 os=-hiuxwe2
419 h8300hms)
420 basic_machine=h8300-hitachi
421 os=-hms
423 h8300xray) # CYGNUS LOCAL
424 basic_machine=h8300-hitachi
425 os=-xray
427 h8500hms) # CYGNUS LOCAL
428 basic_machine=h8500-hitachi
429 os=-hms
431 harris)
432 basic_machine=m88k-harris
433 os=-sysv3
435 hp300-*)
436 basic_machine=m68k-hp
438 hp300bsd)
439 basic_machine=m68k-hp
440 os=-bsd
442 hp300hpux)
443 basic_machine=m68k-hp
444 os=-hpux
446 w89k-*) # CYGNUS LOCAL
447 basic_machine=hppa1.1-winbond
448 os=-proelf
450 op50n-*) # CYGNUS LOCAL
451 basic_machine=hppa1.1-oki
452 os=-proelf
454 op60c-*) # CYGNUS LOCAL
455 basic_machine=hppa1.1-oki
456 os=-proelf
458 hppro) # CYGNUS LOCAL
459 basic_machine=hppa1.1-hp
460 os=-proelf
462 hp3k9[0-9][0-9] | hp9[0-9][0-9])
463 basic_machine=hppa1.0-hp
465 hp9k2[0-9][0-9] | hp9k31[0-9])
466 basic_machine=m68000-hp
468 hp9k3[2-9][0-9])
469 basic_machine=m68k-hp
471 hp9k6[0-9][0-9] | hp6[0-9][0-9] )
472 basic_machine=hppa1.0-hp
474 hp9k7[0-79][0-9] | hp7[0-79][0-9] )
475 basic_machine=hppa1.1-hp
477 hp9k78[0-9] | hp78[0-9] )
478 # FIXME: really hppa2.0-hp
479 basic_machine=hppa1.1-hp
481 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
482 hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
483 # FIXME: really hppa2.0-hp
484 basic_machine=hppa1.1-hp
486 hp9k8[0-9][13679] | hp8[0-9][13679] )
487 basic_machine=hppa1.1-hp
489 hp9k8[0-9][0-9] | hp8[0-9][0-9])
490 basic_machine=hppa1.0-hp
492 hppa-next)
493 os=-nextstep3
495 hppaosf) # CYGNUS LOCAL
496 basic_machine=hppa1.1-hp
497 os=-osf
499 i370-ibm* | ibm*)
500 basic_machine=i370-ibm
501 os=-mvs
503 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
504 i[34567]86v32)
505 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
506 os=-sysv32
508 i[34567]86v4*)
509 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
510 os=-sysv4
512 i[34567]86v)
513 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
514 os=-sysv
516 i[34567]86sol2)
517 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
518 os=-solaris2
520 i386mach) # CYGNUS LOCAL
521 basic_machine=i386-mach
522 os=-mach
524 i386-vsta | vsta) # CYGNUS LOCAL
525 basic_machine=i386-unknown
526 os=-vsta
528 i386-go32 | go32) # CYGNUS LOCAL
529 basic_machine=i386-unknown
530 os=-go32
532 i386-mingw32 | mingw32)
533 basic_machine=i386-unknown
534 os=-mingw32
536 iris | iris4d)
537 basic_machine=mips-sgi
538 case $os in
539 -irix*)
542 os=-irix4
544 esac
546 isi68 | isi)
547 basic_machine=m68k-isi
548 os=-sysv
550 m88k-omron*)
551 basic_machine=m88k-omron
553 magnum | m3230)
554 basic_machine=mips-mips
555 os=-sysv
557 merlin)
558 basic_machine=ns32k-utek
559 os=-sysv
561 miniframe)
562 basic_machine=m68000-convergent
564 mipsel*-linux*)
565 basic_machine=mipsel-unknown
566 os=-linux-gnu
568 mips*-linux*)
569 basic_machine=mips-unknown
570 os=-linux-gnu
572 mips3*-*)
573 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
575 mips3*)
576 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
578 monitor) # CYGNUS LOCAL
579 basic_machine=m68k-rom68k
580 os=-coff
582 msdos) # CYGNUS LOCAL
583 basic_machine=i386-unknown
584 os=-msdos
586 ncr3000)
587 basic_machine=i486-ncr
588 os=-sysv4
590 netbsd386)
591 basic_machine=i386-unknown # CYGNUS LOCAL
592 os=-netbsd
594 news | news700 | news800 | news900)
595 basic_machine=m68k-sony
596 os=-newsos
598 news1000)
599 basic_machine=m68030-sony
600 os=-newsos
602 news-3600 | risc-news)
603 basic_machine=mips-sony
604 os=-newsos
606 necv70) # CYGNUS LOCAL
607 basic_machine=v70-nec
608 os=-sysv
610 next | m*-next )
611 basic_machine=m68k-next
612 case $os in
613 -nextstep* )
615 -ns2*)
616 os=-nextstep2
619 os=-nextstep3
621 esac
623 nh3000)
624 basic_machine=m68k-harris
625 os=-cxux
627 nh[45]000)
628 basic_machine=m88k-harris
629 os=-cxux
631 nindy960)
632 basic_machine=i960-intel
633 os=-nindy
635 mon960) # CYGNUS LOCAL
636 basic_machine=i960-intel
637 os=-mon960
639 np1)
640 basic_machine=np1-gould
642 OSE68000 | ose68000) # CYGNUS LOCAL
643 basic_machine=m68000-ericsson
644 os=-ose
646 os68k) # CYGNUS LOCAL
647 basic_machine=m68k-none
648 os=-os68k
650 pa-hitachi)
651 basic_machine=hppa1.1-hitachi
652 os=-hiuxwe2
654 paragon)
655 basic_machine=i860-intel
656 os=-osf
658 pbd)
659 basic_machine=sparc-tti
661 pbb)
662 basic_machine=m68k-tti
664 pc532 | pc532-*)
665 basic_machine=ns32k-pc532
667 pentium | p5 | k5 | nexen)
668 basic_machine=i586-pc
670 pentiumpro | p6 | k6 | 6x86)
671 basic_machine=i686-pc
673 pentiumii | pentium2)
674 basic_machine=i786-pc
676 pentium-* | p5-* | k5-* | nexen-*)
677 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
679 pentiumpro-* | p6-* | k6-* | 6x86-*)
680 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
682 pentiumii-* | pentium2-*)
683 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
686 basic_machine=pn-gould
688 power) basic_machine=rs6000-ibm
690 ppc) basic_machine=powerpc-unknown
692 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
694 ppcle | powerpclittle | ppc-le | powerpc-little)
695 basic_machine=powerpcle-unknown
697 ppcle-* | powerpclittle-*)
698 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
700 ps2)
701 basic_machine=i386-ibm
703 rom68k) # CYGNUS LOCAL
704 basic_machine=m68k-rom68k
705 os=-coff
707 rm[46]00)
708 basic_machine=mips-siemens
710 rtpc | rtpc-*)
711 basic_machine=romp-ibm
713 sa29200) # CYGNUS LOCAL
714 basic_machine=a29k-amd
715 os=-udi
717 sequent)
718 basic_machine=i386-sequent
721 basic_machine=sh-hitachi
722 os=-hms
724 sparclite-wrs) # CYGNUS LOCAL
725 basic_machine=sparclite-wrs
726 os=-vxworks
728 sps7)
729 basic_machine=m68k-bull
730 os=-sysv2
732 spur)
733 basic_machine=spur-unknown
735 st2000) # CYGNUS LOCAL
736 basic_machine=m68k-tandem
738 stratus) # CYGNUS LOCAL
739 basic_machine=i860-stratus
740 os=-sysv4
742 sun2)
743 basic_machine=m68000-sun
745 sun2os3)
746 basic_machine=m68000-sun
747 os=-sunos3
749 sun2os4)
750 basic_machine=m68000-sun
751 os=-sunos4
753 sun3os3)
754 basic_machine=m68k-sun
755 os=-sunos3
757 sun3os4)
758 basic_machine=m68k-sun
759 os=-sunos4
761 sun4os3)
762 basic_machine=sparc-sun
763 os=-sunos3
765 sun4os4)
766 basic_machine=sparc-sun
767 os=-sunos4
769 sun4sol2)
770 basic_machine=sparc-sun
771 os=-solaris2
773 sun3 | sun3-*)
774 basic_machine=m68k-sun
776 sun4)
777 basic_machine=sparc-sun
779 sun386 | sun386i | roadrunner)
780 basic_machine=i386-sun
782 symmetry)
783 basic_machine=i386-sequent
784 os=-dynix
786 tx39)
787 basic_machine=mipstx39-unknown
789 tx39el)
790 basic_machine=mipstx39el-unknown
792 tower | tower-32)
793 basic_machine=m68k-ncr
795 udi29k)
796 basic_machine=a29k-amd
797 os=-udi
799 ultra3)
800 basic_machine=a29k-nyu
801 os=-sym1
803 v810 | necv810) # CYGNUS LOCAL
804 basic_machine=v810-nec
805 os=-none
807 vaxv)
808 basic_machine=vax-dec
809 os=-sysv
811 vms)
812 basic_machine=vax-dec
813 os=-vms
815 vpp*|vx|vx-*)
816 basic_machine=f301-fujitsu
818 vxworks960)
819 basic_machine=i960-wrs
820 os=-vxworks
822 vxworks68)
823 basic_machine=m68k-wrs
824 os=-vxworks
826 vxworks29k)
827 basic_machine=a29k-wrs
828 os=-vxworks
830 w65*) # CYGNUS LOCAL
831 basic_machine=w65-wdc
832 os=-none
834 xmp)
835 basic_machine=xmp-cray
836 os=-unicos
838 xps | xps100)
839 basic_machine=xps100-honeywell
841 z8k-*-coff) # CYGNUS LOCAL
842 basic_machine=z8k-unknown
843 os=-sim
845 none)
846 basic_machine=none-none
847 os=-none
850 # Here we handle the default manufacturer of certain CPU types. It is in
851 # some cases the only manufacturer, in others, it is the most popular.
852 w89k) # CYGNUS LOCAL
853 basic_machine=hppa1.1-winbond
855 op50n) # CYGNUS LOCAL
856 basic_machine=hppa1.1-oki
858 op60c) # CYGNUS LOCAL
859 basic_machine=hppa1.1-oki
861 mips)
862 if [ x$os = x-linux-gnu ]; then
863 basic_machine=mips-unknown
864 else
865 basic_machine=mips-mips
868 romp)
869 basic_machine=romp-ibm
871 rs6000)
872 basic_machine=rs6000-ibm
874 vax)
875 basic_machine=vax-dec
877 pdp11)
878 basic_machine=pdp11-dec
880 we32k)
881 basic_machine=we32k-att
883 sparc | sparcv9)
884 basic_machine=sparc-sun
886 cydra)
887 basic_machine=cydra-cydrome
889 orion)
890 basic_machine=orion-highlevel
892 orion105)
893 basic_machine=clipper-highlevel
895 mac | mpw | mac-mpw) # CYGNUS LOCAL
896 basic_machine=m68k-apple
898 pmac | pmac-mpw) # CYGNUS LOCAL
899 basic_machine=powerpc-apple
901 c4x*)
902 basic_machine=c4x-none
903 os=-coff
906 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
907 exit 1
909 esac
911 # Here we canonicalize certain aliases for manufacturers.
912 case $basic_machine in
913 *-digital*)
914 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
916 *-commodore*)
917 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
921 esac
923 # Decode manufacturer-specific aliases for certain operating systems.
925 if [ x"$os" != x"" ]
926 then
927 case $os in
928 # First match some system type aliases
929 # that might get confused with valid system types.
930 # -solaris* is a basic system type, with this one exception.
931 -solaris1 | -solaris1.*)
932 os=`echo $os | sed -e 's|solaris1|sunos4|'`
934 -solaris)
935 os=-solaris2
937 -svr4*)
938 os=-sysv4
940 -unixware*)
941 os=-sysv4.2uw
943 -gnu/linux*)
944 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
946 # First accept the basic system types.
947 # The portable systems comes first.
948 # Each alternative MUST END IN A *, to match a version number.
949 # -sysv* is not here because it comes later, after sysvr4.
950 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
951 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
952 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
953 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
954 | -aos* \
955 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
956 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
957 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
958 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
959 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
960 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
961 | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
962 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk*)
963 # Remember, each alternative MUST END IN *, to match a version number.
965 # CYGNUS LOCAL
966 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
967 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
968 | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
970 -mac*)
971 os=`echo $os | sed -e 's|mac|macos|'`
973 # END CYGNUS LOCAL
974 -linux*)
975 os=`echo $os | sed -e 's|linux|linux-gnu|'`
977 -sunos5*)
978 os=`echo $os | sed -e 's|sunos5|solaris2|'`
980 -sunos6*)
981 os=`echo $os | sed -e 's|sunos6|solaris3|'`
983 -osfrose*)
984 os=-osfrose
986 -osf*)
987 os=-osf
989 -utek*)
990 os=-bsd
992 -dynix*)
993 os=-bsd
995 -acis*)
996 os=-aos
998 -386bsd) # CYGNUS LOCAL
999 os=-bsd
1001 -ctix* | -uts*)
1002 os=-sysv
1004 -ns2 )
1005 os=-nextstep2
1007 # Preserve the version number of sinix5.
1008 -sinix5.*)
1009 os=`echo $os | sed -e 's|sinix|sysv|'`
1011 -sinix*)
1012 os=-sysv4
1014 -triton*)
1015 os=-sysv3
1017 -oss*)
1018 os=-sysv3
1020 -svr4)
1021 os=-sysv4
1023 -svr3)
1024 os=-sysv3
1026 -sysvr4)
1027 os=-sysv4
1029 # This must come after -sysvr4.
1030 -sysv*)
1032 -ose*) # CYGNUS LOCAL
1033 os=-ose
1035 -es1800*) # CYGNUS LOCAL
1036 os=-ose
1038 -xenix)
1039 os=-xenix
1041 -none)
1044 # Get rid of the `-' at the beginning of $os.
1045 os=`echo $os | sed 's/[^-]*-//'`
1046 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1047 exit 1
1049 esac
1050 else
1052 # Here we handle the default operating systems that come with various machines.
1053 # The value should be what the vendor currently ships out the door with their
1054 # machine or put another way, the most popular os provided with the machine.
1056 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1057 # "-sun"), then you have to tell the case statement up towards the top
1058 # that MANUFACTURER isn't an operating system. Otherwise, code above
1059 # will signal an error saying that MANUFACTURER isn't an operating
1060 # system, and we'll never get to this point.
1062 case $basic_machine in
1063 *-acorn)
1064 os=-riscix1.2
1066 arm*-semi)
1067 os=-aout
1069 pdp11-*)
1070 os=-none
1072 *-dec | vax-*)
1073 os=-ultrix4.2
1075 m68*-apollo)
1076 os=-domain
1078 i386-sun)
1079 os=-sunos4.0.2
1081 m68000-sun)
1082 os=-sunos3
1083 # This also exists in the configure program, but was not the
1084 # default.
1085 # os=-sunos4
1087 m68*-cisco) # CYGNUS LOCAL
1088 os=-aout
1090 mips*-cisco) # CYGNUS LOCAL
1091 os=-elf
1093 mips*-*) # CYGNUS LOCAL
1094 os=-elf
1096 *-tti) # must be before sparc entry or we get the wrong os.
1097 os=-sysv3
1099 sparc-* | *-sun)
1100 os=-sunos4.1.1
1102 *-be)
1103 os=-beos
1105 *-ibm)
1106 os=-aix
1108 *-wec) # CYGNUS LOCAL
1109 os=-proelf
1111 *-winbond) # CYGNUS LOCAL
1112 os=-proelf
1114 *-oki) # CYGNUS LOCAL
1115 os=-proelf
1117 *-hp)
1118 os=-hpux
1120 *-hitachi)
1121 os=-hiux
1123 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1124 os=-sysv
1126 *-cbm)
1127 os=-amigaos
1129 *-dg)
1130 os=-dgux
1132 *-dolphin)
1133 os=-sysv3
1135 m68k-ccur)
1136 os=-rtu
1138 m88k-omron*)
1139 os=-luna
1141 *-next )
1142 os=-nextstep
1144 *-sequent)
1145 os=-ptx
1147 *-crds)
1148 os=-unos
1150 *-ns)
1151 os=-genix
1153 i370-*)
1154 os=-mvs
1156 *-next)
1157 os=-nextstep3
1159 *-gould)
1160 os=-sysv
1162 *-highlevel)
1163 os=-bsd
1165 *-encore)
1166 os=-bsd
1168 *-sgi)
1169 os=-irix
1171 *-siemens)
1172 os=-sysv4
1174 *-masscomp)
1175 os=-rtu
1177 f301-fujitsu)
1178 os=-uxpv
1180 *-rom68k) # CYGNUS LOCAL
1181 os=-coff
1183 *-*bug) # CYGNUS LOCAL
1184 os=-coff
1186 *-apple) # CYGNUS LOCAL
1187 os=-macos
1190 os=-none
1192 esac
1195 # Here we handle the case where we know the os, and the CPU type, but not the
1196 # manufacturer. We pick the logical manufacturer.
1197 vendor=unknown
1198 case $basic_machine in
1199 *-unknown)
1200 case $os in
1201 -riscix*)
1202 vendor=acorn
1204 -sunos*)
1205 vendor=sun
1207 -aix*)
1208 vendor=ibm
1210 -beos*)
1211 vendor=be
1213 -hpux*)
1214 vendor=hp
1216 -mpeix*)
1217 vendor=hp
1219 -hiux*)
1220 vendor=hitachi
1222 -unos*)
1223 vendor=crds
1225 -dgux*)
1226 vendor=dg
1228 -luna*)
1229 vendor=omron
1231 -genix*)
1232 vendor=ns
1234 -mvs*)
1235 vendor=ibm
1237 -ptx*)
1238 vendor=sequent
1240 -vxsim* | -vxworks*)
1241 vendor=wrs
1243 -aux*)
1244 vendor=apple
1246 -hms*) # CYGNUS LOCAL
1247 vendor=hitachi
1249 -mpw* | -macos*) # CYGNUS LOCAL
1250 vendor=apple
1252 esac
1253 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1255 esac
1257 echo $basic_machine$os