Initial revision
[binutils.git] / config.sub
blob3d4f5fd21b1a968be3cdce0f5655360204b0a5e2
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 92-97, 1998, 1999 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 # CYGNUS LOCAL marketing-names
68 # Here we handle any "marketing" names - translating them to
69 # standard triplets
70 case $1 in
71 mips-tx39-elf)
72 set mipstx39-unknown-elf
76 esac
77 # END CYGNUS LOCAL marketing-names
79 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
80 # Here we must recognize all the valid KERNEL-OS combinations.
81 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
82 case $maybe_os in
83 linux-gnu*)
84 os=-$maybe_os
85 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
88 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
89 if [ $basic_machine != $1 ]
90 then os=`echo $1 | sed 's/.*-/-/'`
91 else os=; fi
93 esac
95 ### Let's recognize common machines as not being operating systems so
96 ### that things like config.sub decstation-3100 work. We also
97 ### recognize some manufacturers as not being operating systems, so we
98 ### can provide default operating systems below.
99 case $os in
100 -sun*os*)
101 # Prevent following clause from handling this invalid input.
103 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
104 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
105 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
106 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
107 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
108 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
109 -apple)
111 basic_machine=$1
113 -sim | -cisco | -oki | -wec | -winbond ) # EGCS LOCAL
115 basic_machine=$1
117 -scout) # EGCS LOCAL
119 -wrs) # EGCS LOCAL
120 os=vxworks
121 basic_machine=$1
123 -hiux*)
124 os=-hiuxwe2
126 -sco5)
127 os=-sco3.2v5
128 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
130 -sco4)
131 os=-sco3.2v4
132 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
134 -sco3.2.[4-9]*)
135 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
136 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
138 -sco3.2v[4-9]*)
139 # Don't forget version if it is 3.2v4 or newer.
140 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
142 -sco*)
143 os=-sco3.2v2
144 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
146 -udk*)
147 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
149 -isc)
150 os=-isc2.2
151 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
153 -clix*)
154 basic_machine=clipper-intergraph
156 -isc*)
157 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
159 -lynx*)
160 os=-lynxos
162 -ptx*)
163 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
165 -windowsnt*)
166 os=`echo $os | sed -e 's/windowsnt/winnt/'`
168 -psos*)
169 os=-psos
171 esac
173 # Decode aliases for certain CPU-COMPANY combinations.
174 case $basic_machine in
175 # Recognize the basic CPU types without company name.
176 # Some are omitted here because they have special meanings below.
177 tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
178 | arme[lb] | pyramid | mn10200 | mn10300 \
179 | tron | a29k | 580 | i960 | h8300 \
180 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
181 | alpha | alphaev[45678] | alphaev56 | alphapca5[67] \
182 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
183 | 1750a | dsp16xx | pdp11 \
184 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
185 | mipstx39 | mipstx39el \
186 | sparc | sparclet | sparclite | sparc64 | sparc86x | v850 \
187 | c4x)
188 basic_machine=$basic_machine-unknown
190 m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
191 | h8500 | w65 | fr30 | mcore) # CYGNUS / EGCS LOCAL
192 basic_machine=$basic_machine-unknown
194 strongarm) # CYGNUS LOCAL nickc/strongarm
195 basic_machine=$basic_machine-unknown
197 thumb)
198 basic_machine=$basic_machine-unknown
200 # CYGNUS LOCAL vr4111/gavin
201 mips64vr4111 | mips64vr4111el)
202 basic_machine=$basic_machine-unknown
204 # END CYGNUS LOCAL vr4111/gavin
205 mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
206 basic_machine=$basic_machine-unknown
208 mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
209 basic_machine=$basic_machine-unknown
211 mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
212 basic_machine=$basic_machine-unknown
214 mips16)
215 basic_machine=$basic_machine-unknown
217 tic30) # CYGNUS LOCAL ian/tic30
218 basic_machine=$basic_machine-unknown
220 c30) # CYGNUS LOCAL ian/tic30
221 basic_machine=tic30-unknown
224 tic80) # CYGNUS LOCAL fnf/TIc80
225 basic_machine=$basic_machine-unknown
227 v850e) # CYGNUS LOCAL jtc/v850
228 basic_machine=$basic_machine-unknown
230 v850ea) # CYGNUS LOCAL jtc/v850
231 basic_machine=$basic_machine-unknown
233 d10v)
234 basic_machine=$basic_machine-unknown
236 d30v) # CYGNUS LOCAL hunt/d30v
237 basic_machine=$basic_machine-unknown
239 # We use `pc' rather than `unknown'
240 # because (1) that's what they normally are, and
241 # (2) the word "unknown" tends to confuse beginning users.
242 i[34567]86)
243 basic_machine=$basic_machine-pc
245 # Object if more than one company name word.
246 *-*-*)
247 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
248 exit 1
250 # Recognize the basic CPU types with company name.
251 vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
252 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
253 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
254 | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
255 | xmp-* | ymp-* \
256 | hppa-* | hppa1.0-* | hppa1.1-* \
257 | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
258 | alpha-* | alphaev[45678]-* | alphaev56-* | alphapca5[67]-* \
259 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
260 | xps100-* | clipper-* | orion-* \
261 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
262 | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
263 | mips64el-* | mips64orion-* | mips64orionel-* \
264 | mipstx39-* | mipstx39el-* \
265 | f301-* | arm*-* \
266 | fr30-* | mcore-*) # CYGNUS LOCAL
268 m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
270 strongarm-*) # CYGNUS LOCAL nickc/strongarm
272 thumb-*) # EGCS LOCAL angela/thumb
274 v850-*) # EGCS LOCAL
276 v850e-*) # CYGNUS LOCAL
278 v850ea-*) # CYGNUS LOCAL
280 d30v-*) # EGCS LOCAL
282 # CYGNUS LOCAL vr4111/gavin
283 mips64vr4111-* | mips64vr4111el-*)
285 # END CYGNUS LOCAL vr4111/gavin
286 mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
288 mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
290 mips16-*) # EGCS LOCAL krk/mips16
292 tic30-*) # EGCS LOCAL ian/tic30
294 c30-*) # EGCS LOCAL ian/tic30
295 basic_machine=tic30-unknown
297 tic80-*) # CYGNUS LOCAL fnf/TIc80
299 # Recognize the various machine names and aliases which stand
300 # for a CPU type and a company and sometimes even an OS.
301 386bsd) # EGCS LOCAL
302 basic_machine=i386-unknown
303 os=-bsd
305 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
306 basic_machine=m68000-att
308 3b*)
309 basic_machine=we32k-att
311 a29khif) # EGCS LOCAL
312 basic_machine=a29k-amd
313 os=-udi
315 adobe68k) # EGCS LOCAL
316 basic_machine=m68010-adobe
317 os=-scout
319 alliant | fx80)
320 basic_machine=fx80-alliant
322 altos | altos3068)
323 basic_machine=m68k-altos
325 am29k)
326 basic_machine=a29k-none
327 os=-bsd
329 amdahl)
330 basic_machine=580-amdahl
331 os=-sysv
333 amiga | amiga-*)
334 basic_machine=m68k-cbm
336 amigaos | amigados)
337 basic_machine=m68k-cbm
338 os=-amigaos
340 amigaunix | amix)
341 basic_machine=m68k-cbm
342 os=-sysv4
344 apollo68)
345 basic_machine=m68k-apollo
346 os=-sysv
348 apollo68bsd) # EGCS LOCAL
349 basic_machine=m68k-apollo
350 os=-bsd
352 aux)
353 basic_machine=m68k-apple
354 os=-aux
356 balance)
357 basic_machine=ns32k-sequent
358 os=-dynix
360 convex-c1)
361 basic_machine=c1-convex
362 os=-bsd
364 convex-c2)
365 basic_machine=c2-convex
366 os=-bsd
368 convex-c32)
369 basic_machine=c32-convex
370 os=-bsd
372 convex-c34)
373 basic_machine=c34-convex
374 os=-bsd
376 convex-c38)
377 basic_machine=c38-convex
378 os=-bsd
380 cray | ymp)
381 basic_machine=ymp-cray
382 os=-unicos
384 cray2)
385 basic_machine=cray2-cray
386 os=-unicos
388 [ctj]90-cray)
389 basic_machine=c90-cray
390 os=-unicos
392 crds | unos)
393 basic_machine=m68k-crds
395 da30 | da30-*)
396 basic_machine=m68k-da30
398 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
399 basic_machine=mips-dec
401 delta | 3300 | motorola-3300 | motorola-delta \
402 | 3300-motorola | delta-motorola)
403 basic_machine=m68k-motorola
405 delta88)
406 basic_machine=m88k-motorola
407 os=-sysv3
409 dpx20 | dpx20-*)
410 basic_machine=rs6000-bull
411 os=-bosx
413 dpx2* | dpx2*-bull)
414 basic_machine=m68k-bull
415 os=-sysv3
417 ebmon29k)
418 basic_machine=a29k-amd
419 os=-ebmon
421 elxsi)
422 basic_machine=elxsi-elxsi
423 os=-bsd
425 encore | umax | mmax)
426 basic_machine=ns32k-encore
428 es1800 | OSE68k | ose68k | ose | OSE) # EGCS LOCAL
429 basic_machine=m68k-ericsson
430 os=-ose
432 fx2800)
433 basic_machine=i860-alliant
435 genix)
436 basic_machine=ns32k-ns
438 gmicro)
439 basic_machine=tron-gmicro
440 os=-sysv
442 h3050r* | hiux*)
443 basic_machine=hppa1.1-hitachi
444 os=-hiuxwe2
446 h8300hms)
447 basic_machine=h8300-hitachi
448 os=-hms
450 h8300xray) # EGCS LOCAL
451 basic_machine=h8300-hitachi
452 os=-xray
454 h8500hms) # EGCS LOCAL
455 basic_machine=h8500-hitachi
456 os=-hms
458 harris)
459 basic_machine=m88k-harris
460 os=-sysv3
462 hp300-*)
463 basic_machine=m68k-hp
465 hp300bsd)
466 basic_machine=m68k-hp
467 os=-bsd
469 hp300hpux)
470 basic_machine=m68k-hp
471 os=-hpux
473 w89k-*) # EGCS LOCAL
474 basic_machine=hppa1.1-winbond
475 os=-proelf
477 op50n-*) # EGCS LOCAL
478 basic_machine=hppa1.1-oki
479 os=-proelf
481 op60c-*) # EGCS LOCAL
482 basic_machine=hppa1.1-oki
483 os=-proelf
485 hppro) # EGCS LOCAL
486 basic_machine=hppa1.1-hp
487 os=-proelf
489 hp3k9[0-9][0-9] | hp9[0-9][0-9])
490 basic_machine=hppa1.0-hp
492 hp9k2[0-9][0-9] | hp9k31[0-9])
493 basic_machine=m68000-hp
495 hp9k3[2-9][0-9])
496 basic_machine=m68k-hp
498 hp9k6[0-9][0-9] | hp6[0-9][0-9] )
499 basic_machine=hppa1.0-hp
501 hp9k7[0-79][0-9] | hp7[0-79][0-9] )
502 basic_machine=hppa1.1-hp
504 hp9k78[0-9] | hp78[0-9] )
505 # FIXME: really hppa2.0-hp
506 basic_machine=hppa1.1-hp
508 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
509 hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
510 # FIXME: really hppa2.0-hp
511 basic_machine=hppa1.1-hp
513 hp9k8[0-9][13679] | hp8[0-9][13679] )
514 basic_machine=hppa1.1-hp
516 hp9k8[0-9][0-9] | hp8[0-9][0-9])
517 basic_machine=hppa1.0-hp
519 hppa-next)
520 os=-nextstep3
522 hppaosf) # EGCS LOCAL
523 basic_machine=hppa1.1-hp
524 os=-osf
526 i370-ibm* | ibm*)
527 basic_machine=i370-ibm
528 os=-mvs
530 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
531 i[34567]86v32)
532 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
533 os=-sysv32
535 i[34567]86v4*)
536 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
537 os=-sysv4
539 i[34567]86v)
540 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
541 os=-sysv
543 i[34567]86sol2)
544 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
545 os=-solaris2
547 i386mach) # EGCS LOCAL
548 basic_machine=i386-mach
549 os=-mach
551 i386-vsta | vsta) # EGCS LOCAL
552 basic_machine=i386-unknown
553 os=-vsta
555 i386-go32 | go32) # EGCS LOCAL
556 basic_machine=i386-unknown
557 os=-go32
559 i386-mingw32 | mingw32)
560 basic_machine=i386-unknown
561 os=-mingw32
563 iris | iris4d)
564 basic_machine=mips-sgi
565 case $os in
566 -irix*)
569 os=-irix4
571 esac
573 isi68 | isi)
574 basic_machine=m68k-isi
575 os=-sysv
577 m88k-omron*)
578 basic_machine=m88k-omron
580 magnum | m3230)
581 basic_machine=mips-mips
582 os=-sysv
584 merlin)
585 basic_machine=ns32k-utek
586 os=-sysv
588 miniframe)
589 basic_machine=m68000-convergent
591 mipsel*-linux*)
592 basic_machine=mipsel-unknown
593 os=-linux-gnu
595 mips*-linux*)
596 basic_machine=mips-unknown
597 os=-linux-gnu
599 mips3*-*)
600 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
602 mips3*)
603 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
605 monitor) # EGCS LOCAL
606 basic_machine=m68k-rom68k
607 os=-coff
609 msdos) # EGCS LOCAL
610 basic_machine=i386-unknown
611 os=-msdos
613 ncr3000)
614 basic_machine=i486-ncr
615 os=-sysv4
617 netbsd386)
618 basic_machine=i386-unknown # EGCS LOCAL
619 os=-netbsd
621 netwinder)
622 basic_machine=armv4l-corel
623 os=-linux
625 news | news700 | news800 | news900)
626 basic_machine=m68k-sony
627 os=-newsos
629 news1000)
630 basic_machine=m68030-sony
631 os=-newsos
633 news-3600 | risc-news)
634 basic_machine=mips-sony
635 os=-newsos
637 necv70) # EGCS LOCAL
638 basic_machine=v70-nec
639 os=-sysv
641 next | m*-next )
642 basic_machine=m68k-next
643 case $os in
644 -nextstep* )
646 -ns2*)
647 os=-nextstep2
650 os=-nextstep3
652 esac
654 nh3000)
655 basic_machine=m68k-harris
656 os=-cxux
658 nh[45]000)
659 basic_machine=m88k-harris
660 os=-cxux
662 nindy960)
663 basic_machine=i960-intel
664 os=-nindy
666 mon960) # EGCS LOCAL
667 basic_machine=i960-intel
668 os=-mon960
670 np1)
671 basic_machine=np1-gould
673 OSE68000 | ose68000) # EGCS LOCAL
674 basic_machine=m68000-ericsson
675 os=-ose
677 os68k) # EGCS LOCAL
678 basic_machine=m68k-none
679 os=-os68k
681 pa-hitachi)
682 basic_machine=hppa1.1-hitachi
683 os=-hiuxwe2
685 paragon)
686 basic_machine=i860-intel
687 os=-osf
689 pbd)
690 basic_machine=sparc-tti
692 pbb)
693 basic_machine=m68k-tti
695 pc532 | pc532-*)
696 basic_machine=ns32k-pc532
698 pentium | p5 | k5 | nexen)
699 basic_machine=i586-pc
701 pentiumpro | p6 | k6 | 6x86)
702 basic_machine=i686-pc
704 pentiumii | pentium2)
705 basic_machine=i786-pc
707 pentium-* | p5-* | k5-* | nexen-*)
708 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
710 pentiumpro-* | p6-* | k6-* | 6x86-*)
711 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
713 pentiumii-* | pentium2-*)
714 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
717 basic_machine=pn-gould
719 power) basic_machine=rs6000-ibm
721 ppc) basic_machine=powerpc-unknown
723 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
725 ppcle | powerpclittle | ppc-le | powerpc-little)
726 basic_machine=powerpcle-unknown
728 ppcle-* | powerpclittle-*)
729 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
731 ps2)
732 basic_machine=i386-ibm
734 rom68k) # EGCS LOCAL
735 basic_machine=m68k-rom68k
736 os=-coff
738 rm[46]00)
739 basic_machine=mips-siemens
741 rtpc | rtpc-*)
742 basic_machine=romp-ibm
744 sa29200) # EGCS LOCAL
745 basic_machine=a29k-amd
746 os=-udi
748 sequent)
749 basic_machine=i386-sequent
752 basic_machine=sh-hitachi
753 os=-hms
755 sparclite-wrs) # EGCS LOCAL
756 basic_machine=sparclite-wrs
757 os=-vxworks
759 sps7)
760 basic_machine=m68k-bull
761 os=-sysv2
763 spur)
764 basic_machine=spur-unknown
766 st2000) # EGCS LOCAL
767 basic_machine=m68k-tandem
769 stratus) # EGCS LOCAL
770 basic_machine=i860-stratus
771 os=-sysv4
773 sun2)
774 basic_machine=m68000-sun
776 sun2os3)
777 basic_machine=m68000-sun
778 os=-sunos3
780 sun2os4)
781 basic_machine=m68000-sun
782 os=-sunos4
784 sun3os3)
785 basic_machine=m68k-sun
786 os=-sunos3
788 sun3os4)
789 basic_machine=m68k-sun
790 os=-sunos4
792 sun4os3)
793 basic_machine=sparc-sun
794 os=-sunos3
796 sun4os4)
797 basic_machine=sparc-sun
798 os=-sunos4
800 sun4sol2)
801 basic_machine=sparc-sun
802 os=-solaris2
804 sun3 | sun3-*)
805 basic_machine=m68k-sun
807 sun4)
808 basic_machine=sparc-sun
810 sun386 | sun386i | roadrunner)
811 basic_machine=i386-sun
813 symmetry)
814 basic_machine=i386-sequent
815 os=-dynix
817 tx39)
818 basic_machine=mipstx39-unknown
820 tx39el)
821 basic_machine=mipstx39el-unknown
823 tower | tower-32)
824 basic_machine=m68k-ncr
826 udi29k)
827 basic_machine=a29k-amd
828 os=-udi
830 ultra3)
831 basic_machine=a29k-nyu
832 os=-sym1
834 v810 | necv810) # EGCS LOCAL
835 basic_machine=v810-nec
836 os=-none
838 vaxv)
839 basic_machine=vax-dec
840 os=-sysv
842 vms)
843 basic_machine=vax-dec
844 os=-vms
846 vpp*|vx|vx-*)
847 basic_machine=f301-fujitsu
849 vxworks960)
850 basic_machine=i960-wrs
851 os=-vxworks
853 vxworks68)
854 basic_machine=m68k-wrs
855 os=-vxworks
857 vxworks29k)
858 basic_machine=a29k-wrs
859 os=-vxworks
861 w65*) # EGCS LOCAL
862 basic_machine=w65-wdc
863 os=-none
865 xmp)
866 basic_machine=xmp-cray
867 os=-unicos
869 xps | xps100)
870 basic_machine=xps100-honeywell
872 z8k-*-coff) # EGCS LOCAL
873 basic_machine=z8k-unknown
874 os=-sim
876 none)
877 basic_machine=none-none
878 os=-none
881 # Here we handle the default manufacturer of certain CPU types. It is in
882 # some cases the only manufacturer, in others, it is the most popular.
883 w89k) # EGCS LOCAL
884 basic_machine=hppa1.1-winbond
886 op50n) # EGCS LOCAL
887 basic_machine=hppa1.1-oki
889 op60c) # EGCS LOCAL
890 basic_machine=hppa1.1-oki
892 mips)
893 if [ x$os = x-linux-gnu ]; then
894 basic_machine=mips-unknown
895 else
896 basic_machine=mips-mips
899 romp)
900 basic_machine=romp-ibm
902 rs6000)
903 basic_machine=rs6000-ibm
905 vax)
906 basic_machine=vax-dec
908 pdp11)
909 basic_machine=pdp11-dec
911 we32k)
912 basic_machine=we32k-att
914 sparc | sparcv9)
915 basic_machine=sparc-sun
917 cydra)
918 basic_machine=cydra-cydrome
920 orion)
921 basic_machine=orion-highlevel
923 orion105)
924 basic_machine=clipper-highlevel
926 mac | mpw | mac-mpw) # EGCS LOCAL
927 basic_machine=m68k-apple
929 pmac | pmac-mpw) # EGCS LOCAL
930 basic_machine=powerpc-apple
932 c4x*)
933 basic_machine=c4x-none
934 os=-coff
937 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
938 exit 1
940 esac
942 # Here we canonicalize certain aliases for manufacturers.
943 case $basic_machine in
944 *-digital*)
945 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
947 *-commodore*)
948 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
952 esac
954 # Decode manufacturer-specific aliases for certain operating systems.
956 if [ x"$os" != x"" ]
957 then
958 case $os in
959 # First match some system type aliases
960 # that might get confused with valid system types.
961 # -solaris* is a basic system type, with this one exception.
962 -solaris1 | -solaris1.*)
963 os=`echo $os | sed -e 's|solaris1|sunos4|'`
965 -solaris)
966 os=-solaris2
968 -svr4*)
969 os=-sysv4
971 -unixware*)
972 os=-sysv4.2uw
974 -gnu/linux*)
975 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
977 # First accept the basic system types.
978 # The portable systems comes first.
979 # Each alternative MUST END IN A *, to match a version number.
980 # -sysv* is not here because it comes later, after sysvr4.
981 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
982 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
983 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
984 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
985 | -aos* \
986 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
987 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
988 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
989 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
990 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
991 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
992 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
993 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
994 | -interix* | -uwin* )
995 # Remember, each alternative MUST END IN *, to match a version number.
997 # EGCS LOCAL
998 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
999 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1000 | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
1002 -mac*)
1003 os=`echo $os | sed -e 's|mac|macos|'`
1005 # END EGCS LOCAL
1006 -linux*)
1007 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1009 -sunos5*)
1010 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1012 -sunos6*)
1013 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1015 -osfrose*)
1016 os=-osfrose
1018 -osf*)
1019 os=-osf
1021 -utek*)
1022 os=-bsd
1024 -dynix*)
1025 os=-bsd
1027 -acis*)
1028 os=-aos
1030 -386bsd) # EGCS LOCAL
1031 os=-bsd
1033 -ctix* | -uts*)
1034 os=-sysv
1036 -ns2 )
1037 os=-nextstep2
1039 # Preserve the version number of sinix5.
1040 -sinix5.*)
1041 os=`echo $os | sed -e 's|sinix|sysv|'`
1043 -sinix*)
1044 os=-sysv4
1046 -triton*)
1047 os=-sysv3
1049 -oss*)
1050 os=-sysv3
1052 -svr4)
1053 os=-sysv4
1055 -svr3)
1056 os=-sysv3
1058 -sysvr4)
1059 os=-sysv4
1061 # This must come after -sysvr4.
1062 -sysv*)
1064 -ose*) # EGCS LOCAL
1065 os=-ose
1067 -es1800*) # EGCS LOCAL
1068 os=-ose
1070 -xenix)
1071 os=-xenix
1073 -none)
1076 # Get rid of the `-' at the beginning of $os.
1077 os=`echo $os | sed 's/[^-]*-//'`
1078 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1079 exit 1
1081 esac
1082 else
1084 # Here we handle the default operating systems that come with various machines.
1085 # The value should be what the vendor currently ships out the door with their
1086 # machine or put another way, the most popular os provided with the machine.
1088 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1089 # "-sun"), then you have to tell the case statement up towards the top
1090 # that MANUFACTURER isn't an operating system. Otherwise, code above
1091 # will signal an error saying that MANUFACTURER isn't an operating
1092 # system, and we'll never get to this point.
1094 case $basic_machine in
1095 *-acorn)
1096 os=-riscix1.2
1098 arm*-corel)
1099 os=-linux
1101 arm*-semi)
1102 os=-aout
1104 pdp11-*)
1105 os=-none
1107 *-dec | vax-*)
1108 os=-ultrix4.2
1110 m68*-apollo)
1111 os=-domain
1113 i386-sun)
1114 os=-sunos4.0.2
1116 m68000-sun)
1117 os=-sunos3
1118 # This also exists in the configure program, but was not the
1119 # default.
1120 # os=-sunos4
1122 m68*-cisco) # EGCS LOCAL
1123 os=-aout
1125 mips*-cisco) # EGCS LOCAL
1126 os=-elf
1128 mips*-*) # EGCS LOCAL
1129 os=-elf
1131 *-tti) # must be before sparc entry or we get the wrong os.
1132 os=-sysv3
1134 sparc-* | *-sun)
1135 os=-sunos4.1.1
1137 *-be)
1138 os=-beos
1140 *-ibm)
1141 os=-aix
1143 *-wec) # EGCS LOCAL
1144 os=-proelf
1146 *-winbond) # EGCS LOCAL
1147 os=-proelf
1149 *-oki) # EGCS LOCAL
1150 os=-proelf
1152 *-hp)
1153 os=-hpux
1155 *-hitachi)
1156 os=-hiux
1158 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1159 os=-sysv
1161 *-cbm)
1162 os=-amigaos
1164 *-dg)
1165 os=-dgux
1167 *-dolphin)
1168 os=-sysv3
1170 m68k-ccur)
1171 os=-rtu
1173 m88k-omron*)
1174 os=-luna
1176 *-next )
1177 os=-nextstep
1179 *-sequent)
1180 os=-ptx
1182 *-crds)
1183 os=-unos
1185 *-ns)
1186 os=-genix
1188 i370-*)
1189 os=-mvs
1191 *-next)
1192 os=-nextstep3
1194 *-gould)
1195 os=-sysv
1197 *-highlevel)
1198 os=-bsd
1200 *-encore)
1201 os=-bsd
1203 *-sgi)
1204 os=-irix
1206 *-siemens)
1207 os=-sysv4
1209 *-masscomp)
1210 os=-rtu
1212 f301-fujitsu)
1213 os=-uxpv
1215 *-rom68k) # EGCS LOCAL
1216 os=-coff
1218 *-*bug) # EGCS LOCAL
1219 os=-coff
1221 *-apple) # EGCS LOCAL
1222 os=-macos
1225 os=-none
1227 esac
1230 # Here we handle the case where we know the os, and the CPU type, but not the
1231 # manufacturer. We pick the logical manufacturer.
1232 vendor=unknown
1233 case $basic_machine in
1234 *-unknown)
1235 case $os in
1236 -riscix*)
1237 vendor=acorn
1239 -sunos*)
1240 vendor=sun
1242 -aix*)
1243 vendor=ibm
1245 -beos*)
1246 vendor=be
1248 -hpux*)
1249 vendor=hp
1251 -mpeix*)
1252 vendor=hp
1254 -hiux*)
1255 vendor=hitachi
1257 -unos*)
1258 vendor=crds
1260 -dgux*)
1261 vendor=dg
1263 -luna*)
1264 vendor=omron
1266 -genix*)
1267 vendor=ns
1269 -mvs*)
1270 vendor=ibm
1272 -ptx*)
1273 vendor=sequent
1275 -vxsim* | -vxworks*)
1276 vendor=wrs
1278 -aux*)
1279 vendor=apple
1281 -hms*) # EGCS LOCAL
1282 vendor=hitachi
1284 -mpw* | -macos*) # EGCS LOCAL
1285 vendor=apple
1287 esac
1288 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1290 esac
1292 echo $basic_machine$os