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