Remove CYGNUS LOCAL marker for pure v850.
[external/binutils.git] / config.sub
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 #   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 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.
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., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
22
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.
27
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.
32
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.
40
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.
47
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
55 fi
56
57 # First pass through any local machine types.
58 case $1 in
59         *local*)
60                 echo $1
61                 exit 0
62                 ;;
63         *)
64         ;;
65 esac
66
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/'`
74     ;;
75   *)
76     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
77     if [ $basic_machine != $1 ]
78     then os=`echo $1 | sed 's/.*-/-/'`
79     else os=; fi
80     ;;
81 esac
82
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.
90                 ;;
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
100                 ;;
101         -sim | -cisco | -oki | -wec | -winbond )        # CYGNUS LOCAL
102                 os=
103                 basic_machine=$1
104                 ;;
105         -scout)                                         # CYGNUS LOCAL
106                 ;;
107         -wrs)                                           # CYGNUS LOCAL
108                 os=vxworks
109                 basic_machine=$1
110                 ;;
111         -hiux*)
112                 os=-hiuxwe2
113                 ;;
114         -sco5)
115                 os=sco3.2v5
116                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
117                 ;;
118         -sco4)
119                 os=-sco3.2v4
120                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
121                 ;;
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/'`
125                 ;;
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/'`
129                 ;;
130         -sco*)
131                 os=-sco3.2v2
132                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133                 ;;
134         -isc)
135                 os=-isc2.2
136                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
137                 ;;
138         -clix*)
139                 basic_machine=clipper-intergraph
140                 ;;
141         -isc*)
142                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
143                 ;;
144         -lynx*)
145                 os=-lynxos
146                 ;;
147         -ptx*)
148                 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
149                 ;;
150         -windowsnt*)
151                 os=`echo $os | sed -e 's/windowsnt/winnt/'`
152                 ;;
153         -psos*)
154                 os=-psos
155                 ;;
156 esac
157
158 # Decode aliases for certain CPU-COMPANY combinations.
159 case $basic_machine in
160         # Recognize the basic CPU types without company name.
161         # Some are omitted here because they have special meanings below.
162         tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
163                 | arme[lb] | pyramid | mn10200 | mn10300 \
164                 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
165                 | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
166                 | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
167                 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
168                 | mipstx39 | mipstx39el \
169                 | sparc | sparclet | sparclite | sparc64 | v850)
170                 basic_machine=$basic_machine-unknown
171                 ;;
172         m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
173                 basic_machine=$basic_machine-unknown
174                 ;;
175         mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
176                 basic_machine=$basic_machine-unknown
177                 ;;
178         mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
179                 basic_machine=$basic_machine-unknown
180                 ;;
181         mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
182                 basic_machine=$basic_machine-unknown
183                 ;;
184 # start-sanitize-r5900
185         mips64vr5900 | mips64vr5900el) # CYGNUS LOCAL gavin/r5900
186                 basic_machine=$basic_machine-unknown
187                 ;;
188 # end-sanitize-r5900
189         mips16) # CYGNUS LOCAL krk/mips16
190                 basic_machine=$basic_machine-unknown
191                 ;;
192 # start-sanitize-tic80
193         tic80)                          # CYGNUS LOCAL fnf/TIc80
194                 basic_machine=$basic_machine-unknown
195                 ;;
196 # end-sanitize-tic80
197 # start-sanitize-v850e
198         v850e)                          # CYGNUS LOCAL jtc/v850
199                 basic_machine=$basic_machine-unknown
200                 ;;
201 # end-sanitize-v850e
202 # start-sanitize-v850eq
203         v850eq)                         # CYGNUS LOCAL jtc/v850
204                 basic_machine=$basic_machine-unknown
205                 ;;
206 # end-sanitize-v850eq
207         d10v)                           # CYGNUS LOCAL meissner/d10v
208                 basic_machine=$basic_machine-unknown
209                 ;;
210 # start-sanitize-d30v
211         d30v)                           # CYGNUS LOCAL hunt/d30v
212                 basic_machine=$basic_machine-unknown
213                 ;;
214 # end-sanitize-d30v
215         # We use `pc' rather than `unknown'
216         # because (1) that's what they normally are, and
217         # (2) the word "unknown" tends to confuse beginning users.
218         i[3456]86)
219           basic_machine=$basic_machine-pc
220           ;;
221         # Object if more than one company name word.
222         *-*-*)
223                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
224                 exit 1
225                 ;;
226         # Recognize the basic CPU types with company name.
227         vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
228               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
229               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
230               | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
231               | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
232               | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
233               | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
234               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
235               | sparc64-* | mips64-* | mipsel-* \
236               | mips64el-* | mips64orion-* | mips64orionel-* \
237               | mipstx39-* | mipstx39el-* \
238               | f301-*)
239                 ;;
240         m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
241                 ;;
242 # start-sanitize-v850
243         v850-*) # CYGNUS LOCAL
244                 ;;
245 # end-sanitize-v850
246 # start-sanitize-v850e
247         v850e-*) # CYGNUS LOCAL
248                 ;;
249 # end-sanitize-v850e
250 # start-sanitize-v850eq
251         v850eq-*) # CYGNUS LOCAL
252                 ;;
253 # end-sanitize-v850eq
254 # start-sanitize-d30v
255         d30v-*) # CYGNUS LOCAL
256                 ;;
257 # end-sanitize-d30v
258         mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
259                 ;;
260         mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
261                 ;;
262 # start-sanitize-r5900
263         mips64vr5900-* | mips64vr5900el-*) # CYGNUS LOCAL gavin/r5900
264                 ;;
265 # end-sanitize-r5900
266         mips16-*) # CYGNUS LOCAL krk/mips16
267                 ;;
268 # start-sanitize-tic80
269         tic80-*)                                                # CYGNUS LOCAL fnf/TIc80
270                 ;;
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
277                 ;;
278         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
279                 basic_machine=m68000-att
280                 ;;
281         3b*)
282                 basic_machine=we32k-att
283                 ;;
284         a29khif)                                        # CYGNUS LOCAL
285                 basic_machine=a29k-amd
286                 os=-udi
287                 ;;
288         adobe68k)                                       # CYGNUS LOCAL
289                 basic_machine=m68010-adobe
290                 os=-scout
291                 ;;
292         alliant | fx80)
293                 basic_machine=fx80-alliant
294                 ;;
295         altos | altos3068)
296                 basic_machine=m68k-altos
297                 ;;
298         am29k)
299                 basic_machine=a29k-none
300                 os=-bsd
301                 ;;
302         amdahl)
303                 basic_machine=580-amdahl
304                 os=-sysv
305                 ;;
306         amiga | amiga-*)
307                 basic_machine=m68k-cbm
308                 ;;
309         amigados)
310                 basic_machine=m68k-cbm
311                 os=-amigados
312                 ;;
313         amigaunix | amix)
314                 basic_machine=m68k-cbm
315                 os=-sysv4
316                 ;;
317         apollo68)
318                 basic_machine=m68k-apollo
319                 os=-sysv
320                 ;;
321         apollo68bsd)                                    # CYGNUS LOCAL
322                 basic_machine=m68k-apollo
323                 os=-bsd
324                 ;;
325         aux)
326                 basic_machine=m68k-apple
327                 os=-aux
328                 ;;
329         balance)
330                 basic_machine=ns32k-sequent
331                 os=-dynix
332                 ;;
333         convex-c1)
334                 basic_machine=c1-convex
335                 os=-bsd
336                 ;;
337         convex-c2)
338                 basic_machine=c2-convex
339                 os=-bsd
340                 ;;
341         convex-c32)
342                 basic_machine=c32-convex
343                 os=-bsd
344                 ;;
345         convex-c34)
346                 basic_machine=c34-convex
347                 os=-bsd
348                 ;;
349         convex-c38)
350                 basic_machine=c38-convex
351                 os=-bsd
352                 ;;
353         cray | ymp)
354                 basic_machine=ymp-cray
355                 os=-unicos
356                 ;;
357         cray2)
358                 basic_machine=cray2-cray
359                 os=-unicos
360                 ;;
361         [ctj]90-cray)
362                 basic_machine=c90-cray
363                 os=-unicos
364                 ;;
365         crds | unos)
366                 basic_machine=m68k-crds
367                 ;;
368         da30 | da30-*)
369                 basic_machine=m68k-da30
370                 ;;
371         decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
372                 basic_machine=mips-dec
373                 ;;
374         delta | 3300 | motorola-3300 | motorola-delta \
375               | 3300-motorola | delta-motorola)
376                 basic_machine=m68k-motorola
377                 ;;
378         delta88)
379                 basic_machine=m88k-motorola
380                 os=-sysv3
381                 ;;
382         dpx20 | dpx20-*)
383                 basic_machine=rs6000-bull
384                 os=-bosx
385                 ;;
386         dpx2* | dpx2*-bull)
387                 basic_machine=m68k-bull
388                 os=-sysv3
389                 ;;
390         ebmon29k)
391                 basic_machine=a29k-amd
392                 os=-ebmon
393                 ;;
394         elxsi)
395                 basic_machine=elxsi-elxsi
396                 os=-bsd
397                 ;;
398         encore | umax | mmax)
399                 basic_machine=ns32k-encore
400                 ;;
401         es1800 | OSE68k | ose68k | ose | OSE)           # CYGNUS LOCAL
402                 basic_machine=m68k-ericsson
403                 os=-ose
404                 ;;
405         fx2800)
406                 basic_machine=i860-alliant
407                 ;;
408         genix)
409                 basic_machine=ns32k-ns
410                 ;;
411         gmicro)
412                 basic_machine=tron-gmicro
413                 os=-sysv
414                 ;;
415         h3050r* | hiux*)
416                 basic_machine=hppa1.1-hitachi
417                 os=-hiuxwe2
418                 ;;
419         h8300hms)
420                 basic_machine=h8300-hitachi
421                 os=-hms
422                 ;;
423         h8300xray)                                      # CYGNUS LOCAL
424                 basic_machine=h8300-hitachi
425                 os=-xray
426                 ;;
427         h8500hms)                                       # CYGNUS LOCAL
428                 basic_machine=h8500-hitachi
429                 os=-hms
430                 ;;
431         harris)
432                 basic_machine=m88k-harris
433                 os=-sysv3
434                 ;;
435         hp300-*)
436                 basic_machine=m68k-hp
437                 ;;
438         hp300bsd)
439                 basic_machine=m68k-hp
440                 os=-bsd
441                 ;;
442         hp300hpux)
443                 basic_machine=m68k-hp
444                 os=-hpux
445                 ;;
446         w89k-*)                                         # CYGNUS LOCAL
447                 basic_machine=hppa1.1-winbond
448                 os=-proelf
449                 ;;
450         op50n-*)                                        # CYGNUS LOCAL
451                 basic_machine=hppa1.1-oki
452                 os=-proelf
453                 ;;
454         op60c-*)                                        # CYGNUS LOCAL
455                 basic_machine=hppa1.1-oki
456                 os=-proelf
457                 ;;
458         hppro)                                          # CYGNUS LOCAL
459                 basic_machine=hppa1.1-hp
460                 os=-proelf
461                 ;;
462         hp9k2[0-9][0-9] | hp9k31[0-9])
463                 basic_machine=m68000-hp
464                 ;;
465         hp9k3[2-9][0-9])
466                 basic_machine=m68k-hp
467                 ;;
468         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
469                 basic_machine=hppa1.1-hp
470                 ;;
471         hp9k8[0-9][0-9] | hp8[0-9][0-9])
472                 basic_machine=hppa1.0-hp
473                 ;;
474         hppa-next)
475                 os=-nextstep3
476                 ;;
477         hppaosf)                                        # CYGNUS LOCAL
478                 basic_machine=hppa1.1-hp
479                 os=-osf
480                 ;;
481         i370-ibm* | ibm*)
482                 basic_machine=i370-ibm
483                 os=-mvs
484                 ;;
485 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
486         i[3456]86v32)
487                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
488                 os=-sysv32
489                 ;;
490         i[3456]86v4*)
491                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
492                 os=-sysv4
493                 ;;
494         i[3456]86v)
495                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
496                 os=-sysv
497                 ;;
498         i[3456]86sol2)
499                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
500                 os=-solaris2
501                 ;;
502         i386mach)                                       # CYGNUS LOCAL
503                 basic_machine=i386-mach
504                 os=-mach
505                 ;;
506         i386-vsta | vsta)                               # CYGNUS LOCAL
507                 basic_machine=i386-unknown
508                 os=-vsta
509                 ;;
510         i386-go32 | go32)                               # CYGNUS LOCAL
511                 basic_machine=i386-unknown
512                 os=-go32
513                 ;;
514         iris | iris4d)
515                 basic_machine=mips-sgi
516                 case $os in
517                     -irix*)
518                         ;;
519                     *)
520                         os=-irix4
521                         ;;
522                 esac
523                 ;;
524         isi68 | isi)
525                 basic_machine=m68k-isi
526                 os=-sysv
527                 ;;
528         m88k-omron*)
529                 basic_machine=m88k-omron
530                 ;;
531         magnum | m3230)
532                 basic_machine=mips-mips
533                 os=-sysv
534                 ;;
535         merlin)
536                 basic_machine=ns32k-utek
537                 os=-sysv
538                 ;;
539         miniframe)
540                 basic_machine=m68000-convergent
541                 ;;
542         mipsel*-linux*)
543                 basic_machine=mipsel-unknown
544                 os=-linux-gnu
545                 ;;
546         mips*-linux*)
547                 basic_machine=mips-unknown
548                 os=-linux-gnu
549                 ;;
550         mips3*-*)
551                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
552                 ;;
553         mips3*)
554                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
555                 ;;
556         monitor)                                        # CYGNUS LOCAL
557                 basic_machine=m68k-rom68k
558                 os=-coff
559                 ;;
560         msdos)                                          # CYGNUS LOCAL
561                 basic_machine=i386-unknown      
562                 os=-msdos
563                 ;;
564         ncr3000)
565                 basic_machine=i486-ncr
566                 os=-sysv4
567                 ;;
568         netbsd386)
569                 basic_machine=i386-unknown              # CYGNUS LOCAL
570                 os=-netbsd
571                 ;;
572         news | news700 | news800 | news900)
573                 basic_machine=m68k-sony
574                 os=-newsos
575                 ;;
576         news1000)
577                 basic_machine=m68030-sony
578                 os=-newsos
579                 ;;
580         news-3600 | risc-news)
581                 basic_machine=mips-sony
582                 os=-newsos
583                 ;;
584         necv70)                                         # CYGNUS LOCAL
585                 basic_machine=v70-nec
586                 os=-sysv
587                 ;;
588         next | m*-next )
589                 basic_machine=m68k-next
590                 case $os in
591                     -nextstep* )
592                         ;;
593                     -ns2*)
594                       os=-nextstep2
595                         ;;
596                     *)
597                       os=-nextstep3
598                         ;;
599                 esac
600                 ;;
601         nh3000)
602                 basic_machine=m68k-harris
603                 os=-cxux
604                 ;;
605         nh[45]000)
606                 basic_machine=m88k-harris
607                 os=-cxux
608                 ;;
609         nindy960)
610                 basic_machine=i960-intel
611                 os=-nindy
612                 ;;
613         mon960)                                         # CYGNUS LOCAL
614                 basic_machine=i960-intel
615                 os=-mon960
616                 ;;
617         np1)
618                 basic_machine=np1-gould
619                 ;;
620         OSE68000 | ose68000)                            # CYGNUS LOCAL
621                 basic_machine=m68000-ericsson
622                 os=-ose
623                 ;;
624         os68k)                                          # CYGNUS LOCAL
625                 basic_machine=m68k-none
626                 os=-os68k
627                 ;;
628         pa-hitachi)
629                 basic_machine=hppa1.1-hitachi
630                 os=-hiuxwe2
631                 ;;
632         paragon)
633                 basic_machine=i860-intel
634                 os=-osf
635                 ;;
636         pbd)
637                 basic_machine=sparc-tti
638                 ;;
639         pbb)
640                 basic_machine=m68k-tti
641                 ;;
642         pc532 | pc532-*)
643                 basic_machine=ns32k-pc532
644                 ;;
645         pentium | p5)
646                 basic_machine=i586-intel
647                 ;;
648         pentiumpro | p6)
649                 basic_machine=i686-intel
650                 ;;
651         pentium-* | p5-*)
652                 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
653                 ;;
654         pentiumpro-* | p6-*)
655                 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
656                 ;;
657         k5)
658                 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
659                 basic_machine=i586-amd
660                 ;;
661         nexen)
662                 # We don't have specific support for Nexgen yet, so just call it a Pentium
663                 basic_machine=i586-nexgen
664                 ;;
665         pn)
666                 basic_machine=pn-gould
667                 ;;
668         power)  basic_machine=rs6000-ibm
669                 ;;
670         ppc)    basic_machine=powerpc-unknown
671                 ;;
672         ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
673                 ;;
674         ppcle | powerpclittle | ppc-le | powerpc-little)
675                 basic_machine=powerpcle-unknown
676                 ;;
677         ppcle-* | powerpclittle-*)
678                 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
679                 ;;
680         ps2)
681                 basic_machine=i386-ibm
682                 ;;
683 # start-sanitize-r5900
684         r5900)                                          # CYGNUS LOCAL
685                 basic_machine=mips64vr5900el-unknown
686                 ;;
687 # end-sanitize-r5900
688         rom68k)                                         # CYGNUS LOCAL
689                 basic_machine=m68k-rom68k
690                 os=-coff
691                 ;;
692         rm[46]00)
693                 basic_machine=mips-siemens
694                 ;;
695         rtpc | rtpc-*)
696                 basic_machine=romp-ibm
697                 ;;
698         sa29200)                                        # CYGNUS LOCAL
699                 basic_machine=a29k-amd
700                 os=-udi
701                 ;;
702         sequent)
703                 basic_machine=i386-sequent
704                 ;;
705         sh)
706                 basic_machine=sh-hitachi
707                 os=-hms
708                 ;;
709         sparclite-wrs)                                  # CYGNUS LOCAL
710                 basic_machine=sparclite-wrs
711                 os=-vxworks
712                 ;;
713         sps7)
714                 basic_machine=m68k-bull
715                 os=-sysv2
716                 ;;
717         spur)
718                 basic_machine=spur-unknown
719                 ;;
720         st2000)                                         # CYGNUS LOCAL
721                 basic_machine=m68k-tandem
722                 ;;
723         stratus)                                        # CYGNUS LOCAL
724                 basic_machine=i860-stratus
725                 os=-sysv4
726                 ;;
727         sun2)
728                 basic_machine=m68000-sun
729                 ;;
730         sun2os3)
731                 basic_machine=m68000-sun
732                 os=-sunos3
733                 ;;
734         sun2os4)
735                 basic_machine=m68000-sun
736                 os=-sunos4
737                 ;;
738         sun3os3)
739                 basic_machine=m68k-sun
740                 os=-sunos3
741                 ;;
742         sun3os4)
743                 basic_machine=m68k-sun
744                 os=-sunos4
745                 ;;
746         sun4os3)
747                 basic_machine=sparc-sun
748                 os=-sunos3
749                 ;;
750         sun4os4)
751                 basic_machine=sparc-sun
752                 os=-sunos4
753                 ;;
754         sun4sol2)
755                 basic_machine=sparc-sun
756                 os=-solaris2
757                 ;;
758         sun3 | sun3-*)
759                 basic_machine=m68k-sun
760                 ;;
761         sun4)
762                 basic_machine=sparc-sun
763                 ;;
764         sun386 | sun386i | roadrunner)
765                 basic_machine=i386-sun
766                 ;;
767         symmetry)
768                 basic_machine=i386-sequent
769                 os=-dynix
770                 ;;
771         tx39)
772                 basic_machine=mipstx39-unknown
773                 ;;
774         tx39el)
775                 basic_machine=mipstx39el-unknown
776                 ;;
777         tower | tower-32)
778                 basic_machine=m68k-ncr
779                 ;;
780         udi29k)
781                 basic_machine=a29k-amd
782                 os=-udi
783                 ;;
784         ultra3)
785                 basic_machine=a29k-nyu
786                 os=-sym1
787                 ;;
788         v810 | necv810)                                 # CYGNUS LOCAL
789                 basic_machine=v810-nec
790                 os=-none
791                 ;;
792         vaxv)
793                 basic_machine=vax-dec
794                 os=-sysv
795                 ;;
796         vms)
797                 basic_machine=vax-dec
798                 os=-vms
799                 ;;
800         vpp*|vx|vx-*)
801                basic_machine=f301-fujitsu
802                ;;
803         vxworks960)
804                 basic_machine=i960-wrs
805                 os=-vxworks
806                 ;;
807         vxworks68)
808                 basic_machine=m68k-wrs
809                 os=-vxworks
810                 ;;
811         vxworks29k)
812                 basic_machine=a29k-wrs
813                 os=-vxworks
814                 ;;
815         w65*)                                           # CYGNUS LOCAL
816                 basic_machine=w65-wdc
817                 os=-none
818                 ;;
819         xmp)
820                 basic_machine=xmp-cray
821                 os=-unicos
822                 ;;
823         xps | xps100)
824                 basic_machine=xps100-honeywell
825                 ;;
826         z8k-*-coff)                                     # CYGNUS LOCAL
827                 basic_machine=z8k-unknown
828                 os=-sim
829                 ;;
830         none)
831                 basic_machine=none-none
832                 os=-none
833                 ;;
834
835 # Here we handle the default manufacturer of certain CPU types.  It is in
836 # some cases the only manufacturer, in others, it is the most popular.
837         w89k)                                           # CYGNUS LOCAL
838                 basic_machine=hppa1.1-winbond
839                 ;;
840         op50n)                                          # CYGNUS LOCAL
841                 basic_machine=hppa1.1-oki
842                 ;;
843         op60c)                                          # CYGNUS LOCAL
844                 basic_machine=hppa1.1-oki
845                 ;;
846         mips)
847                 if [ x$os = x-linux-gnu ]; then
848                         basic_machine=mips-unknown
849                 else
850                         basic_machine=mips-mips
851                 fi
852                 ;;
853         romp)
854                 basic_machine=romp-ibm
855                 ;;
856         rs6000)
857                 basic_machine=rs6000-ibm
858                 ;;
859         vax)
860                 basic_machine=vax-dec
861                 ;;
862         pdp11)
863                 basic_machine=pdp11-dec
864                 ;;
865         we32k)
866                 basic_machine=we32k-att
867                 ;;
868         sparc)
869                 basic_machine=sparc-sun
870                 ;;
871         cydra)
872                 basic_machine=cydra-cydrome
873                 ;;
874         orion)
875                 basic_machine=orion-highlevel
876                 ;;
877         orion105)
878                 basic_machine=clipper-highlevel
879                 ;;
880         mac | mpw | mac-mpw)                            # CYGNUS LOCAL
881                 basic_machine=m68k-apple
882                 ;;
883         pmac | pmac-mpw)                                # CYGNUS LOCAL
884                 basic_machine=powerpc-apple
885                 ;;
886         *)
887                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
888                 exit 1
889                 ;;
890 esac
891
892 # Here we canonicalize certain aliases for manufacturers.
893 case $basic_machine in
894         *-digital*)
895                 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
896                 ;;
897         *-commodore*)
898                 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
899                 ;;
900         *)
901                 ;;
902 esac
903
904 # Decode manufacturer-specific aliases for certain operating systems.
905
906 if [ x"$os" != x"" ]
907 then
908 case $os in
909         # First match some system type aliases
910         # that might get confused with valid system types.
911         # -solaris* is a basic system type, with this one exception.
912         -solaris1 | -solaris1.*)
913                 os=`echo $os | sed -e 's|solaris1|sunos4|'`
914                 ;;
915         -solaris)
916                 os=-solaris2
917                 ;;
918         -unixware* | svr4*)
919                 os=-sysv4
920                 ;;
921         -gnu/linux*)
922                 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
923                 ;;
924         # First accept the basic system types.
925         # The portable systems comes first.
926         # Each alternative MUST END IN A *, to match a version number.
927         # -sysv* is not here because it comes later, after sysvr4.
928         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
929               | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
930               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
931               | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
932               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
933               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
934               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
935               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
936               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
937               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
938               | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
939               | -mingw32* | -linux-gnu* | -uxpv*)
940         # Remember, each alternative MUST END IN *, to match a version number.
941                 ;;
942         # CYGNUS LOCAL
943         -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
944               | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
945               | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
946                 ;;
947         -mac*)
948                 os=`echo $os | sed -e 's|mac|macos|'`
949                 ;;
950         # END CYGNUS LOCAL
951         -linux*)
952                 os=`echo $os | sed -e 's|linux|linux-gnu|'`
953                 ;;
954         -sunos5*)
955                 os=`echo $os | sed -e 's|sunos5|solaris2|'`
956                 ;;
957         -sunos6*)
958                 os=`echo $os | sed -e 's|sunos6|solaris3|'`
959                 ;;
960         -osfrose*)
961                 os=-osfrose
962                 ;;
963         -osf*)
964                 os=-osf
965                 ;;
966         -utek*)
967                 os=-bsd
968                 ;;
969         -dynix*)
970                 os=-bsd
971                 ;;
972         -acis*)
973                 os=-aos
974                 ;;
975         -386bsd)                                        # CYGNUS LOCAL
976                 os=-bsd
977                 ;;
978         -ctix* | -uts*)
979                 os=-sysv
980                 ;;
981         -ns2 )
982                 os=-nextstep2
983                 ;;
984         # Preserve the version number of sinix5.
985         -sinix5.*)
986                 os=`echo $os | sed -e 's|sinix|sysv|'`
987                 ;;
988         -sinix*)
989                 os=-sysv4
990                 ;;
991         -triton*)
992                 os=-sysv3
993                 ;;
994         -oss*)
995                 os=-sysv3
996                 ;;
997         -svr4)
998                 os=-sysv4
999                 ;;
1000         -svr3)
1001                 os=-sysv3
1002                 ;;
1003         -sysvr4)
1004                 os=-sysv4
1005                 ;;
1006         # This must come after -sysvr4.
1007         -sysv*)
1008                 ;;
1009         -ose*)                                          # CYGNUS LOCAL
1010                 os=-ose
1011                 ;;
1012         -es1800*)                                       # CYGNUS LOCAL
1013                 os=-ose
1014                 ;;
1015         -xenix)
1016                 os=-xenix
1017                 ;;
1018         -none)
1019                 ;;
1020         *)
1021                 # Get rid of the `-' at the beginning of $os.
1022                 os=`echo $os | sed 's/[^-]*-//'`
1023                 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1024                 exit 1
1025                 ;;
1026 esac
1027 else
1028
1029 # Here we handle the default operating systems that come with various machines.
1030 # The value should be what the vendor currently ships out the door with their
1031 # machine or put another way, the most popular os provided with the machine.
1032
1033 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1034 # "-sun"), then you have to tell the case statement up towards the top
1035 # that MANUFACTURER isn't an operating system.  Otherwise, code above
1036 # will signal an error saying that MANUFACTURER isn't an operating
1037 # system, and we'll never get to this point.
1038
1039 case $basic_machine in
1040         *-acorn)
1041                 os=-riscix1.2
1042                 ;;
1043         arm*-semi)
1044                 os=-aout
1045                 ;;
1046         pdp11-*)
1047                 os=-none
1048                 ;;
1049         *-dec | vax-*)
1050                 os=-ultrix4.2
1051                 ;;
1052         m68*-apollo)
1053                 os=-domain
1054                 ;;
1055         i386-sun)
1056                 os=-sunos4.0.2
1057                 ;;
1058         m68000-sun)
1059                 os=-sunos3
1060                 # This also exists in the configure program, but was not the
1061                 # default.
1062                 # os=-sunos4
1063                 ;;
1064         m68*-cisco)                                     # CYGNUS LOCAL
1065                 os=-aout
1066                 ;;
1067         mips*-cisco)                                    # CYGNUS LOCAL
1068                 os=-elf
1069                 ;;
1070         mips*-*)                                        # CYGNUS LOCAL
1071                 os=-elf
1072                 ;;
1073         *-tti)  # must be before sparc entry or we get the wrong os.
1074                 os=-sysv3
1075                 ;;
1076         sparc-* | *-sun)
1077                 os=-sunos4.1.1
1078                 ;;
1079         *-be)                                           # CYGNUS LOCAL
1080                 os=-beos
1081                 ;;
1082         *-ibm)
1083                 os=-aix
1084                 ;;
1085         *-wec)                                          # CYGNUS LOCAL
1086                 os=-proelf
1087                 ;;
1088         *-winbond)                                      # CYGNUS LOCAL
1089                 os=-proelf
1090                 ;;
1091         *-oki)                                          # CYGNUS LOCAL
1092                 os=-proelf
1093                 ;;
1094         *-hp)
1095                 os=-hpux
1096                 ;;
1097         *-hitachi)
1098                 os=-hiux
1099                 ;;
1100         i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1101                 os=-sysv
1102                 ;;
1103         *-cbm)
1104                 os=-amigados
1105                 ;;
1106         *-dg)
1107                 os=-dgux
1108                 ;;
1109         *-dolphin)
1110                 os=-sysv3
1111                 ;;
1112         m68k-ccur)
1113                 os=-rtu
1114                 ;;
1115         m88k-omron*)
1116                 os=-luna
1117                 ;;
1118         *-next )
1119                 os=-nextstep
1120                 ;;
1121         *-sequent)
1122                 os=-ptx
1123                 ;;
1124         *-crds)
1125                 os=-unos
1126                 ;;
1127         *-ns)
1128                 os=-genix
1129                 ;;
1130         i370-*)
1131                 os=-mvs
1132                 ;;
1133         *-next)
1134                 os=-nextstep3
1135                 ;;
1136         *-gould)
1137                 os=-sysv
1138                 ;;
1139         *-highlevel)
1140                 os=-bsd
1141                 ;;
1142         *-encore)
1143                 os=-bsd
1144                 ;;
1145         *-sgi)
1146                 os=-irix
1147                 ;;
1148         *-siemens)
1149                 os=-sysv4
1150                 ;;
1151         *-masscomp)
1152                 os=-rtu
1153                 ;;
1154         f301-fujitsu)
1155                 os=-uxpv
1156                 ;;
1157         *-rom68k)                                       # CYGNUS LOCAL
1158                 os=-coff
1159                 ;;
1160         *-*bug)                                         # CYGNUS LOCAL
1161                 os=-coff
1162                 ;;
1163         *-apple)                                        # CYGNUS LOCAL
1164                 os=-macos
1165                 ;;
1166         *)
1167                 os=-none
1168                 ;;
1169 esac
1170 fi
1171
1172 # Here we handle the case where we know the os, and the CPU type, but not the
1173 # manufacturer.  We pick the logical manufacturer.
1174 vendor=unknown
1175 case $basic_machine in
1176         *-unknown)
1177                 case $os in
1178                         -riscix*)
1179                                 vendor=acorn
1180                                 ;;
1181                         -sunos*)
1182                                 vendor=sun
1183                                 ;;
1184                         -aix*)
1185                                 vendor=ibm
1186                                 ;;
1187                         -beos*)                                         # CYGNUS LOCAL
1188                                 vendor=be
1189                                 ;;
1190                         -hpux*)
1191                                 vendor=hp
1192                                 ;;
1193                         -hiux*)
1194                                 vendor=hitachi
1195                                 ;;
1196                         -unos*)
1197                                 vendor=crds
1198                                 ;;
1199                         -dgux*)
1200                                 vendor=dg
1201                                 ;;
1202                         -luna*)
1203                                 vendor=omron
1204                                 ;;
1205                         -genix*)
1206                                 vendor=ns
1207                                 ;;
1208                         -mvs*)
1209                                 vendor=ibm
1210                                 ;;
1211                         -ptx*)
1212                                 vendor=sequent
1213                                 ;;
1214                         -vxsim* | -vxworks*)
1215                                 vendor=wrs
1216                                 ;;
1217                         -aux*)
1218                                 vendor=apple
1219                                 ;;
1220                         -hms*)                          # CYGNUS LOCAL
1221                                 vendor=hitachi
1222                                 ;;
1223                         -mpw* | -macos*)                # CYGNUS LOCAL
1224                                 vendor=apple
1225                                 ;;
1226                 esac
1227                 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1228                 ;;
1229 esac
1230
1231 echo $basic_machine$os