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