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