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