[xcc] minor performance tweaks
[riscv-isa-sim.git] / scripts / config.sub
1 #! /bin/sh
2 # Configuration validation subroutine script.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5 # Free Software Foundation, Inc.
6
7 timestamp='2009-09-02'
8
9 # This file is (in principle) common to ALL GNU software.
10 # The presence of a machine in this file suggests that SOME GNU software
11 # can handle that machine. It does not imply ALL GNU software can.
12 #
13 # This file is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26 # 02110-1301, USA.
27 #
28 # As a special exception to the GNU General Public License, if you
29 # distribute this file as part of a program that contains a
30 # configuration script generated by Autoconf, you may include it under
31 # the same distribution terms that you use for the rest of that program.
32
33
34 # Please send patches to <config-patches@gnu.org>. Submit a context
35 # diff and a properly formatted ChangeLog entry.
36 #
37 # Configuration subroutine to validate and canonicalize a configuration type.
38 # Supply the specified configuration type as an argument.
39 # If it is invalid, we print an error message on stderr and exit with code 1.
40 # Otherwise, we print the canonical config type on stdout and succeed.
41
42 # This file is supposed to be the same for all GNU packages
43 # and recognize all the CPU types, system types and aliases
44 # that are meaningful with *any* GNU software.
45 # Each package is responsible for reporting which valid configurations
46 # it does not support. The user should be able to distinguish
47 # a failure to support a valid configuration from a meaningless
48 # configuration.
49
50 # The goal of this file is to map all the various variations of a given
51 # machine specification into a single specification in the form:
52 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
53 # or in some cases, the newer four-part form:
54 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
55 # It is wrong to echo any other type of specification.
56
57 me=`echo "$0" | sed -e 's,.*/,,'`
58
59 usage="\
60 Usage: $0 [OPTION] CPU-MFR-OPSYS
61 $0 [OPTION] ALIAS
62
63 Canonicalize a configuration name.
64
65 Operation modes:
66 -h, --help print this help, then exit
67 -t, --time-stamp print date of last modification, then exit
68 -v, --version print version number, then exit
69
70 Report bugs and patches to <config-patches@gnu.org>."
71
72 version="\
73 GNU config.sub ($timestamp)
74
75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
76 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
77
78 This is free software; see the source for copying conditions. There is NO
79 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80
81 help="
82 Try \`$me --help' for more information."
83
84 # Parse command line
85 while test $# -gt 0 ; do
86 case $1 in
87 --time-stamp | --time* | -t )
88 echo "$timestamp" ; exit ;;
89 --version | -v )
90 echo "$version" ; exit ;;
91 --help | --h* | -h )
92 echo "$usage"; exit ;;
93 -- ) # Stop option processing
94 shift; break ;;
95 - ) # Use stdin as input.
96 break ;;
97 -* )
98 echo "$me: invalid option $1$help"
99 exit 1 ;;
100
101 *local*)
102 # First pass through any local machine types.
103 echo $1
104 exit ;;
105
106 * )
107 break ;;
108 esac
109 done
110
111 case $# in
112 0) echo "$me: missing argument$help" >&2
113 exit 1;;
114 1) ;;
115 *) echo "$me: too many arguments$help" >&2
116 exit 1;;
117 esac
118
119 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
120 # Here we must recognize all the valid KERNEL-OS combinations.
121 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122 case $maybe_os in
123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
125 storm-chaos* | os2-emx* | rtmk-nova*)
126 os=-$maybe_os
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135 esac
136
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
152 os=
153 basic_machine=$1
154 ;;
155 -sim | -cisco | -oki | -wec | -winbond)
156 os=
157 basic_machine=$1
158 ;;
159 -scout)
160 ;;
161 -wrs)
162 os=-vxworks
163 basic_machine=$1
164 ;;
165 -chorusos*)
166 os=-chorusos
167 basic_machine=$1
168 ;;
169 -chorusrdb)
170 os=-chorusrdb
171 basic_machine=$1
172 ;;
173 -hiux*)
174 os=-hiuxwe2
175 ;;
176 -sco6)
177 os=-sco5v6
178 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
179 ;;
180 -sco5)
181 os=-sco3.2v5
182 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183 ;;
184 -sco4)
185 os=-sco3.2v4
186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 ;;
188 -sco3.2.[4-9]*)
189 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 ;;
192 -sco3.2v[4-9]*)
193 # Don't forget version if it is 3.2v4 or newer.
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -sco5v6*)
197 # Don't forget version if it is 3.2v4 or newer.
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -sco*)
201 os=-sco3.2v2
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -udk*)
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -isc)
208 os=-isc2.2
209 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 ;;
211 -clix*)
212 basic_machine=clipper-intergraph
213 ;;
214 -isc*)
215 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
216 ;;
217 -lynx*)
218 os=-lynxos
219 ;;
220 -ptx*)
221 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
222 ;;
223 -windowsnt*)
224 os=`echo $os | sed -e 's/windowsnt/winnt/'`
225 ;;
226 -psos*)
227 os=-psos
228 ;;
229 -mint | -mint[0-9]*)
230 basic_machine=m68k-atari
231 os=-mint
232 ;;
233 esac
234
235 # Decode aliases for certain CPU-COMPANY combinations.
236 case $basic_machine in
237 # Recognize the basic CPU types without company name.
238 # Some are omitted here because they have special meanings below.
239 1750a | 580 \
240 | a29k \
241 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
242 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
243 | am33_2.0 \
244 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
245 | bfin \
246 | c4x | clipper \
247 | d10v | d30v | dlx | dsp16xx \
248 | fido | fr30 | frv \
249 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
250 | i370 | i860 | i960 | ia64 \
251 | ip2k | iq2000 \
252 | m32c | m32r | m32rle | m68000 | m68k | m88k \
253 | maxq | mb | microblaze | mcore | mep \
254 | mips | mipsbe | mipseb | mipsel | mipsle \
255 | mips16 \
256 | mips64 | mips64el \
257 | mips64vr | mips64vrel \
258 | mips64orion | mips64orionel \
259 | mips64vr4100 | mips64vr4100el \
260 | mips64vr4300 | mips64vr4300el \
261 | mips64vr5000 | mips64vr5000el \
262 | mips64vr5900 | mips64vr5900el \
263 | mipsisa32 | mipsisa32el \
264 | mipsisa32r2 | mipsisa32r2el \
265 | mipsisa64 | mipsisa64el \
266 | mipsisa64r2 | mipsisa64r2el \
267 | mipsisa64sb1 | mipsisa64sb1el \
268 | mipsisa64sr71k | mipsisa64sr71kel \
269 | mipstx39 | mipstx39el \
270 | mn10200 | mn10300 \
271 | mt \
272 | msp430 \
273 | nios | nios2 \
274 | ns16k | ns32k \
275 | or32 \
276 | pdp10 | pdp11 | pj | pjl \
277 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
278 | pyramid \
279 | score \
280 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
281 | sh64 | sh64le \
282 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
283 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
284 | spu | strongarm \
285 | tahoe | thumb | tic4x | tic80 | tron \
286 | v850 | v850e \
287 | we32k \
288 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
289 | z8k)
290 basic_machine=$basic_machine-unknown
291 ;;
292 m6811 | m68hc11 | m6812 | m68hc12)
293 # Motorola 68HC11/12.
294 basic_machine=$basic_machine-unknown
295 os=-none
296 ;;
297 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
298 ;;
299 ms1)
300 basic_machine=mt-unknown
301 ;;
302
303 # cbatten - Add maven target
304 maven)
305 basic_machine=mipsmavenel-ucb
306 ;;
307
308 # We use `pc' rather than `unknown'
309 # because (1) that's what they normally are, and
310 # (2) the word "unknown" tends to confuse beginning users.
311 i*86 | x86_64)
312 basic_machine=$basic_machine-pc
313 ;;
314 # Object if more than one company name word.
315 *-*-*)
316 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
317 exit 1
318 ;;
319 # Recognize the basic CPU types with company name.
320 580-* \
321 | a29k-* \
322 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
323 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
324 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
325 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
326 | avr-* | avr32-* \
327 | bfin-* | bs2000-* \
328 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
329 | clipper-* | craynv-* | cydra-* \
330 | d10v-* | d30v-* | dlx-* \
331 | elxsi-* \
332 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
333 | h8300-* | h8500-* \
334 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
335 | i*86-* | i860-* | i960-* | ia64-* \
336 | ip2k-* | iq2000-* \
337 | m32c-* | m32r-* | m32rle-* \
338 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
339 | m88110-* | m88k-* | maxq-* | mcore-* \
340 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
341 | mips16-* \
342 | mips64-* | mips64el-* \
343 | mips64vr-* | mips64vrel-* \
344 | mips64orion-* | mips64orionel-* \
345 | mips64vr4100-* | mips64vr4100el-* \
346 | mips64vr4300-* | mips64vr4300el-* \
347 | mips64vr5000-* | mips64vr5000el-* \
348 | mips64vr5900-* | mips64vr5900el-* \
349 | mipsisa32-* | mipsisa32el-* \
350 | mipsisa32r2-* | mipsisa32r2el-* \
351 | mipsisa64-* | mipsisa64el-* \
352 | mipsisa64r2-* | mipsisa64r2el-* \
353 | mipsisa64sb1-* | mipsisa64sb1el-* \
354 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
355 | mipstx39-* | mipstx39el-* \
356 | mmix-* \
357 | mt-* \
358 | msp430-* \
359 | nios-* | nios2-* \
360 | none-* | np1-* | ns16k-* | ns32k-* \
361 | orion-* \
362 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
363 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
364 | pyramid-* \
365 | romp-* | rs6000-* \
366 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
367 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
368 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
369 | sparclite-* \
370 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
371 | tahoe-* | thumb-* \
372 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
373 | tron-* \
374 | v850-* | v850e-* | vax-* \
375 | we32k-* \
376 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
377 | xstormy16-* | xtensa*-* \
378 | ymp-* \
379 | z8k-*)
380 ;;
381 # Recognize the basic CPU types without company name, with glob match.
382 xtensa*)
383 basic_machine=$basic_machine-unknown
384 ;;
385 # Recognize the various machine names and aliases which stand
386 # for a CPU type and a company and sometimes even an OS.
387 386bsd)
388 basic_machine=i386-unknown
389 os=-bsd
390 ;;
391 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
392 basic_machine=m68000-att
393 ;;
394 3b*)
395 basic_machine=we32k-att
396 ;;
397 a29khif)
398 basic_machine=a29k-amd
399 os=-udi
400 ;;
401 abacus)
402 basic_machine=abacus-unknown
403 ;;
404 adobe68k)
405 basic_machine=m68010-adobe
406 os=-scout
407 ;;
408 alliant | fx80)
409 basic_machine=fx80-alliant
410 ;;
411 altos | altos3068)
412 basic_machine=m68k-altos
413 ;;
414 am29k)
415 basic_machine=a29k-none
416 os=-bsd
417 ;;
418 amd64)
419 basic_machine=x86_64-pc
420 ;;
421 amd64-*)
422 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
423 ;;
424 amdahl)
425 basic_machine=580-amdahl
426 os=-sysv
427 ;;
428 amiga | amiga-*)
429 basic_machine=m68k-unknown
430 ;;
431 amigaos | amigados)
432 basic_machine=m68k-unknown
433 os=-amigaos
434 ;;
435 amigaunix | amix)
436 basic_machine=m68k-unknown
437 os=-sysv4
438 ;;
439 apollo68)
440 basic_machine=m68k-apollo
441 os=-sysv
442 ;;
443 apollo68bsd)
444 basic_machine=m68k-apollo
445 os=-bsd
446 ;;
447 aux)
448 basic_machine=m68k-apple
449 os=-aux
450 ;;
451 balance)
452 basic_machine=ns32k-sequent
453 os=-dynix
454 ;;
455 blackfin)
456 basic_machine=bfin-unknown
457 os=-linux
458 ;;
459 blackfin-*)
460 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
461 os=-linux
462 ;;
463 c90)
464 basic_machine=c90-cray
465 os=-unicos
466 ;;
467 convex-c1)
468 basic_machine=c1-convex
469 os=-bsd
470 ;;
471 convex-c2)
472 basic_machine=c2-convex
473 os=-bsd
474 ;;
475 convex-c32)
476 basic_machine=c32-convex
477 os=-bsd
478 ;;
479 convex-c34)
480 basic_machine=c34-convex
481 os=-bsd
482 ;;
483 convex-c38)
484 basic_machine=c38-convex
485 os=-bsd
486 ;;
487 cray | j90)
488 basic_machine=j90-cray
489 os=-unicos
490 ;;
491 craynv)
492 basic_machine=craynv-cray
493 os=-unicosmp
494 ;;
495 cr16)
496 basic_machine=cr16-unknown
497 os=-elf
498 ;;
499 crds | unos)
500 basic_machine=m68k-crds
501 ;;
502 crisv32 | crisv32-* | etraxfs*)
503 basic_machine=crisv32-axis
504 ;;
505 cris | cris-* | etrax*)
506 basic_machine=cris-axis
507 ;;
508 crx)
509 basic_machine=crx-unknown
510 os=-elf
511 ;;
512 da30 | da30-*)
513 basic_machine=m68k-da30
514 ;;
515 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
516 basic_machine=mips-dec
517 ;;
518 decsystem10* | dec10*)
519 basic_machine=pdp10-dec
520 os=-tops10
521 ;;
522 decsystem20* | dec20*)
523 basic_machine=pdp10-dec
524 os=-tops20
525 ;;
526 delta | 3300 | motorola-3300 | motorola-delta \
527 | 3300-motorola | delta-motorola)
528 basic_machine=m68k-motorola
529 ;;
530 delta88)
531 basic_machine=m88k-motorola
532 os=-sysv3
533 ;;
534 djgpp)
535 basic_machine=i586-pc
536 os=-msdosdjgpp
537 ;;
538 dpx20 | dpx20-*)
539 basic_machine=rs6000-bull
540 os=-bosx
541 ;;
542 dpx2* | dpx2*-bull)
543 basic_machine=m68k-bull
544 os=-sysv3
545 ;;
546 ebmon29k)
547 basic_machine=a29k-amd
548 os=-ebmon
549 ;;
550 elxsi)
551 basic_machine=elxsi-elxsi
552 os=-bsd
553 ;;
554 encore | umax | mmax)
555 basic_machine=ns32k-encore
556 ;;
557 es1800 | OSE68k | ose68k | ose | OSE)
558 basic_machine=m68k-ericsson
559 os=-ose
560 ;;
561 fx2800)
562 basic_machine=i860-alliant
563 ;;
564 genix)
565 basic_machine=ns32k-ns
566 ;;
567 gmicro)
568 basic_machine=tron-gmicro
569 os=-sysv
570 ;;
571 go32)
572 basic_machine=i386-pc
573 os=-go32
574 ;;
575 h3050r* | hiux*)
576 basic_machine=hppa1.1-hitachi
577 os=-hiuxwe2
578 ;;
579 h8300hms)
580 basic_machine=h8300-hitachi
581 os=-hms
582 ;;
583 h8300xray)
584 basic_machine=h8300-hitachi
585 os=-xray
586 ;;
587 h8500hms)
588 basic_machine=h8500-hitachi
589 os=-hms
590 ;;
591 harris)
592 basic_machine=m88k-harris
593 os=-sysv3
594 ;;
595 hp300-*)
596 basic_machine=m68k-hp
597 ;;
598 hp300bsd)
599 basic_machine=m68k-hp
600 os=-bsd
601 ;;
602 hp300hpux)
603 basic_machine=m68k-hp
604 os=-hpux
605 ;;
606 hp3k9[0-9][0-9] | hp9[0-9][0-9])
607 basic_machine=hppa1.0-hp
608 ;;
609 hp9k2[0-9][0-9] | hp9k31[0-9])
610 basic_machine=m68000-hp
611 ;;
612 hp9k3[2-9][0-9])
613 basic_machine=m68k-hp
614 ;;
615 hp9k6[0-9][0-9] | hp6[0-9][0-9])
616 basic_machine=hppa1.0-hp
617 ;;
618 hp9k7[0-79][0-9] | hp7[0-79][0-9])
619 basic_machine=hppa1.1-hp
620 ;;
621 hp9k78[0-9] | hp78[0-9])
622 # FIXME: really hppa2.0-hp
623 basic_machine=hppa1.1-hp
624 ;;
625 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
626 # FIXME: really hppa2.0-hp
627 basic_machine=hppa1.1-hp
628 ;;
629 hp9k8[0-9][13679] | hp8[0-9][13679])
630 basic_machine=hppa1.1-hp
631 ;;
632 hp9k8[0-9][0-9] | hp8[0-9][0-9])
633 basic_machine=hppa1.0-hp
634 ;;
635 hppa-next)
636 os=-nextstep3
637 ;;
638 hppaosf)
639 basic_machine=hppa1.1-hp
640 os=-osf
641 ;;
642 hppro)
643 basic_machine=hppa1.1-hp
644 os=-proelf
645 ;;
646 i370-ibm* | ibm*)
647 basic_machine=i370-ibm
648 ;;
649 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
650 i*86v32)
651 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
652 os=-sysv32
653 ;;
654 i*86v4*)
655 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
656 os=-sysv4
657 ;;
658 i*86v)
659 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
660 os=-sysv
661 ;;
662 i*86sol2)
663 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
664 os=-solaris2
665 ;;
666 i386mach)
667 basic_machine=i386-mach
668 os=-mach
669 ;;
670 i386-vsta | vsta)
671 basic_machine=i386-unknown
672 os=-vsta
673 ;;
674 iris | iris4d)
675 basic_machine=mips-sgi
676 case $os in
677 -irix*)
678 ;;
679 *)
680 os=-irix4
681 ;;
682 esac
683 ;;
684 isi68 | isi)
685 basic_machine=m68k-isi
686 os=-sysv
687 ;;
688 m68knommu)
689 basic_machine=m68k-unknown
690 os=-linux
691 ;;
692 m68knommu-*)
693 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
694 os=-linux
695 ;;
696 m88k-omron*)
697 basic_machine=m88k-omron
698 ;;
699 magnum | m3230)
700 basic_machine=mips-mips
701 os=-sysv
702 ;;
703 merlin)
704 basic_machine=ns32k-utek
705 os=-sysv
706 ;;
707 mingw32)
708 basic_machine=i386-pc
709 os=-mingw32
710 ;;
711 mingw32ce)
712 basic_machine=arm-unknown
713 os=-mingw32ce
714 ;;
715 miniframe)
716 basic_machine=m68000-convergent
717 ;;
718 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
719 basic_machine=m68k-atari
720 os=-mint
721 ;;
722 mips3*-*)
723 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
724 ;;
725 mips3*)
726 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
727 ;;
728 monitor)
729 basic_machine=m68k-rom68k
730 os=-coff
731 ;;
732 morphos)
733 basic_machine=powerpc-unknown
734 os=-morphos
735 ;;
736 msdos)
737 basic_machine=i386-pc
738 os=-msdos
739 ;;
740 ms1-*)
741 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
742 ;;
743 mvs)
744 basic_machine=i370-ibm
745 os=-mvs
746 ;;
747 ncr3000)
748 basic_machine=i486-ncr
749 os=-sysv4
750 ;;
751 netbsd386)
752 basic_machine=i386-unknown
753 os=-netbsd
754 ;;
755 netwinder)
756 basic_machine=armv4l-rebel
757 os=-linux
758 ;;
759 news | news700 | news800 | news900)
760 basic_machine=m68k-sony
761 os=-newsos
762 ;;
763 news1000)
764 basic_machine=m68030-sony
765 os=-newsos
766 ;;
767 news-3600 | risc-news)
768 basic_machine=mips-sony
769 os=-newsos
770 ;;
771 necv70)
772 basic_machine=v70-nec
773 os=-sysv
774 ;;
775 next | m*-next )
776 basic_machine=m68k-next
777 case $os in
778 -nextstep* )
779 ;;
780 -ns2*)
781 os=-nextstep2
782 ;;
783 *)
784 os=-nextstep3
785 ;;
786 esac
787 ;;
788 nh3000)
789 basic_machine=m68k-harris
790 os=-cxux
791 ;;
792 nh[45]000)
793 basic_machine=m88k-harris
794 os=-cxux
795 ;;
796 nindy960)
797 basic_machine=i960-intel
798 os=-nindy
799 ;;
800 mon960)
801 basic_machine=i960-intel
802 os=-mon960
803 ;;
804 nonstopux)
805 basic_machine=mips-compaq
806 os=-nonstopux
807 ;;
808 np1)
809 basic_machine=np1-gould
810 ;;
811 nsr-tandem)
812 basic_machine=nsr-tandem
813 ;;
814 op50n-* | op60c-*)
815 basic_machine=hppa1.1-oki
816 os=-proelf
817 ;;
818 openrisc | openrisc-*)
819 basic_machine=or32-unknown
820 ;;
821 os400)
822 basic_machine=powerpc-ibm
823 os=-os400
824 ;;
825 OSE68000 | ose68000)
826 basic_machine=m68000-ericsson
827 os=-ose
828 ;;
829 os68k)
830 basic_machine=m68k-none
831 os=-os68k
832 ;;
833 pa-hitachi)
834 basic_machine=hppa1.1-hitachi
835 os=-hiuxwe2
836 ;;
837 paragon)
838 basic_machine=i860-intel
839 os=-osf
840 ;;
841 parisc)
842 basic_machine=hppa-unknown
843 os=-linux
844 ;;
845 parisc-*)
846 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
847 os=-linux
848 ;;
849 pbd)
850 basic_machine=sparc-tti
851 ;;
852 pbb)
853 basic_machine=m68k-tti
854 ;;
855 pc532 | pc532-*)
856 basic_machine=ns32k-pc532
857 ;;
858 pc98)
859 basic_machine=i386-pc
860 ;;
861 pc98-*)
862 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
863 ;;
864 pentium | p5 | k5 | k6 | nexgen | viac3)
865 basic_machine=i586-pc
866 ;;
867 pentiumpro | p6 | 6x86 | athlon | athlon_*)
868 basic_machine=i686-pc
869 ;;
870 pentiumii | pentium2 | pentiumiii | pentium3)
871 basic_machine=i686-pc
872 ;;
873 pentium4)
874 basic_machine=i786-pc
875 ;;
876 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
877 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
878 ;;
879 pentiumpro-* | p6-* | 6x86-* | athlon-*)
880 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
881 ;;
882 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
883 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
884 ;;
885 pentium4-*)
886 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
887 ;;
888 pn)
889 basic_machine=pn-gould
890 ;;
891 power) basic_machine=power-ibm
892 ;;
893 ppc) basic_machine=powerpc-unknown
894 ;;
895 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
896 ;;
897 ppcle | powerpclittle | ppc-le | powerpc-little)
898 basic_machine=powerpcle-unknown
899 ;;
900 ppcle-* | powerpclittle-*)
901 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
902 ;;
903 ppc64) basic_machine=powerpc64-unknown
904 ;;
905 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
906 ;;
907 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
908 basic_machine=powerpc64le-unknown
909 ;;
910 ppc64le-* | powerpc64little-*)
911 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
912 ;;
913 ps2)
914 basic_machine=i386-ibm
915 ;;
916 pw32)
917 basic_machine=i586-unknown
918 os=-pw32
919 ;;
920 rdos)
921 basic_machine=i386-pc
922 os=-rdos
923 ;;
924 rom68k)
925 basic_machine=m68k-rom68k
926 os=-coff
927 ;;
928 rm[46]00)
929 basic_machine=mips-siemens
930 ;;
931 rtpc | rtpc-*)
932 basic_machine=romp-ibm
933 ;;
934 s390 | s390-*)
935 basic_machine=s390-ibm
936 ;;
937 s390x | s390x-*)
938 basic_machine=s390x-ibm
939 ;;
940 sa29200)
941 basic_machine=a29k-amd
942 os=-udi
943 ;;
944 sb1)
945 basic_machine=mipsisa64sb1-unknown
946 ;;
947 sb1el)
948 basic_machine=mipsisa64sb1el-unknown
949 ;;
950 sde)
951 basic_machine=mipsisa32-sde
952 os=-elf
953 ;;
954 sei)
955 basic_machine=mips-sei
956 os=-seiux
957 ;;
958 sequent)
959 basic_machine=i386-sequent
960 ;;
961 sh)
962 basic_machine=sh-hitachi
963 os=-hms
964 ;;
965 sh5el)
966 basic_machine=sh5le-unknown
967 ;;
968 sh64)
969 basic_machine=sh64-unknown
970 ;;
971 sparclite-wrs | simso-wrs)
972 basic_machine=sparclite-wrs
973 os=-vxworks
974 ;;
975 sps7)
976 basic_machine=m68k-bull
977 os=-sysv2
978 ;;
979 spur)
980 basic_machine=spur-unknown
981 ;;
982 st2000)
983 basic_machine=m68k-tandem
984 ;;
985 stratus)
986 basic_machine=i860-stratus
987 os=-sysv4
988 ;;
989 sun2)
990 basic_machine=m68000-sun
991 ;;
992 sun2os3)
993 basic_machine=m68000-sun
994 os=-sunos3
995 ;;
996 sun2os4)
997 basic_machine=m68000-sun
998 os=-sunos4
999 ;;
1000 sun3os3)
1001 basic_machine=m68k-sun
1002 os=-sunos3
1003 ;;
1004 sun3os4)
1005 basic_machine=m68k-sun
1006 os=-sunos4
1007 ;;
1008 sun4os3)
1009 basic_machine=sparc-sun
1010 os=-sunos3
1011 ;;
1012 sun4os4)
1013 basic_machine=sparc-sun
1014 os=-sunos4
1015 ;;
1016 sun4sol2)
1017 basic_machine=sparc-sun
1018 os=-solaris2
1019 ;;
1020 sun3 | sun3-*)
1021 basic_machine=m68k-sun
1022 ;;
1023 sun4)
1024 basic_machine=sparc-sun
1025 ;;
1026 sun386 | sun386i | roadrunner)
1027 basic_machine=i386-sun
1028 ;;
1029 sv1)
1030 basic_machine=sv1-cray
1031 os=-unicos
1032 ;;
1033 symmetry)
1034 basic_machine=i386-sequent
1035 os=-dynix
1036 ;;
1037 t3e)
1038 basic_machine=alphaev5-cray
1039 os=-unicos
1040 ;;
1041 t90)
1042 basic_machine=t90-cray
1043 os=-unicos
1044 ;;
1045 tic54x | c54x*)
1046 basic_machine=tic54x-unknown
1047 os=-coff
1048 ;;
1049 tic55x | c55x*)
1050 basic_machine=tic55x-unknown
1051 os=-coff
1052 ;;
1053 tic6x | c6x*)
1054 basic_machine=tic6x-unknown
1055 os=-coff
1056 ;;
1057 tile*)
1058 basic_machine=tile-unknown
1059 os=-linux-gnu
1060 ;;
1061 tx39)
1062 basic_machine=mipstx39-unknown
1063 ;;
1064 tx39el)
1065 basic_machine=mipstx39el-unknown
1066 ;;
1067 toad1)
1068 basic_machine=pdp10-xkl
1069 os=-tops20
1070 ;;
1071 tower | tower-32)
1072 basic_machine=m68k-ncr
1073 ;;
1074 tpf)
1075 basic_machine=s390x-ibm
1076 os=-tpf
1077 ;;
1078 udi29k)
1079 basic_machine=a29k-amd
1080 os=-udi
1081 ;;
1082 ultra3)
1083 basic_machine=a29k-nyu
1084 os=-sym1
1085 ;;
1086 v810 | necv810)
1087 basic_machine=v810-nec
1088 os=-none
1089 ;;
1090 vaxv)
1091 basic_machine=vax-dec
1092 os=-sysv
1093 ;;
1094 vms)
1095 basic_machine=vax-dec
1096 os=-vms
1097 ;;
1098 vpp*|vx|vx-*)
1099 basic_machine=f301-fujitsu
1100 ;;
1101 vxworks960)
1102 basic_machine=i960-wrs
1103 os=-vxworks
1104 ;;
1105 vxworks68)
1106 basic_machine=m68k-wrs
1107 os=-vxworks
1108 ;;
1109 vxworks29k)
1110 basic_machine=a29k-wrs
1111 os=-vxworks
1112 ;;
1113 w65*)
1114 basic_machine=w65-wdc
1115 os=-none
1116 ;;
1117 w89k-*)
1118 basic_machine=hppa1.1-winbond
1119 os=-proelf
1120 ;;
1121 xbox)
1122 basic_machine=i686-pc
1123 os=-mingw32
1124 ;;
1125 xps | xps100)
1126 basic_machine=xps100-honeywell
1127 ;;
1128 ymp)
1129 basic_machine=ymp-cray
1130 os=-unicos
1131 ;;
1132 z8k-*-coff)
1133 basic_machine=z8k-unknown
1134 os=-sim
1135 ;;
1136 none)
1137 basic_machine=none-none
1138 os=-none
1139 ;;
1140
1141 # Here we handle the default manufacturer of certain CPU types. It is in
1142 # some cases the only manufacturer, in others, it is the most popular.
1143 w89k)
1144 basic_machine=hppa1.1-winbond
1145 ;;
1146 op50n)
1147 basic_machine=hppa1.1-oki
1148 ;;
1149 op60c)
1150 basic_machine=hppa1.1-oki
1151 ;;
1152 romp)
1153 basic_machine=romp-ibm
1154 ;;
1155 mmix)
1156 basic_machine=mmix-knuth
1157 ;;
1158 rs6000)
1159 basic_machine=rs6000-ibm
1160 ;;
1161 vax)
1162 basic_machine=vax-dec
1163 ;;
1164 pdp10)
1165 # there are many clones, so DEC is not a safe bet
1166 basic_machine=pdp10-unknown
1167 ;;
1168 pdp11)
1169 basic_machine=pdp11-dec
1170 ;;
1171 we32k)
1172 basic_machine=we32k-att
1173 ;;
1174 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1175 basic_machine=sh-unknown
1176 ;;
1177 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1178 basic_machine=sparc-sun
1179 ;;
1180 cydra)
1181 basic_machine=cydra-cydrome
1182 ;;
1183 orion)
1184 basic_machine=orion-highlevel
1185 ;;
1186 orion105)
1187 basic_machine=clipper-highlevel
1188 ;;
1189 mac | mpw | mac-mpw)
1190 basic_machine=m68k-apple
1191 ;;
1192 pmac | pmac-mpw)
1193 basic_machine=powerpc-apple
1194 ;;
1195 *-unknown)
1196 # Make sure to match an already-canonicalized machine name.
1197 ;;
1198 *)
1199 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1200 exit 1
1201 ;;
1202 esac
1203
1204 # Here we canonicalize certain aliases for manufacturers.
1205 case $basic_machine in
1206 *-digital*)
1207 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1208 ;;
1209 *-commodore*)
1210 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1211 ;;
1212 *)
1213 ;;
1214 esac
1215
1216 # Decode manufacturer-specific aliases for certain operating systems.
1217
1218 if [ x"$os" != x"" ]
1219 then
1220 case $os in
1221 # First match some system type aliases
1222 # that might get confused with valid system types.
1223 # -solaris* is a basic system type, with this one exception.
1224 -solaris1 | -solaris1.*)
1225 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1226 ;;
1227 -solaris)
1228 os=-solaris2
1229 ;;
1230 -svr4*)
1231 os=-sysv4
1232 ;;
1233 -unixware*)
1234 os=-sysv4.2uw
1235 ;;
1236 -gnu/linux*)
1237 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1238 ;;
1239 # First accept the basic system types.
1240 # The portable systems comes first.
1241 # Each alternative MUST END IN A *, to match a version number.
1242 # -sysv* is not here because it comes later, after sysvr4.
1243 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1244 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1245 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1246 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1247 | -aos* \
1248 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1249 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1250 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1251 | -openbsd* | -solidbsd* \
1252 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1253 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1254 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1255 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1256 | -chorusos* | -chorusrdb* \
1257 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1258 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1259 | -uxpv* | -beos* | -mpeix* | -udk* \
1260 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1261 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1262 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1263 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1264 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1265 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1266 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1267 # Remember, each alternative MUST END IN *, to match a version number.
1268 ;;
1269 -qnx*)
1270 case $basic_machine in
1271 x86-* | i*86-*)
1272 ;;
1273 *)
1274 os=-nto$os
1275 ;;
1276 esac
1277 ;;
1278 -nto-qnx*)
1279 ;;
1280 -nto*)
1281 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1282 ;;
1283 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1284 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1285 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1286 ;;
1287 -mac*)
1288 os=`echo $os | sed -e 's|mac|macos|'`
1289 ;;
1290 -linux-dietlibc)
1291 os=-linux-dietlibc
1292 ;;
1293 -linux*)
1294 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1295 ;;
1296 -sunos5*)
1297 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1298 ;;
1299 -sunos6*)
1300 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1301 ;;
1302 -opened*)
1303 os=-openedition
1304 ;;
1305 -os400*)
1306 os=-os400
1307 ;;
1308 -wince*)
1309 os=-wince
1310 ;;
1311 -osfrose*)
1312 os=-osfrose
1313 ;;
1314 -osf*)
1315 os=-osf
1316 ;;
1317 -utek*)
1318 os=-bsd
1319 ;;
1320 -dynix*)
1321 os=-bsd
1322 ;;
1323 -acis*)
1324 os=-aos
1325 ;;
1326 -atheos*)
1327 os=-atheos
1328 ;;
1329 -syllable*)
1330 os=-syllable
1331 ;;
1332 -386bsd)
1333 os=-bsd
1334 ;;
1335 -ctix* | -uts*)
1336 os=-sysv
1337 ;;
1338 -nova*)
1339 os=-rtmk-nova
1340 ;;
1341 -ns2 )
1342 os=-nextstep2
1343 ;;
1344 -nsk*)
1345 os=-nsk
1346 ;;
1347 # Preserve the version number of sinix5.
1348 -sinix5.*)
1349 os=`echo $os | sed -e 's|sinix|sysv|'`
1350 ;;
1351 -sinix*)
1352 os=-sysv4
1353 ;;
1354 -tpf*)
1355 os=-tpf
1356 ;;
1357 -triton*)
1358 os=-sysv3
1359 ;;
1360 -oss*)
1361 os=-sysv3
1362 ;;
1363 -svr4)
1364 os=-sysv4
1365 ;;
1366 -svr3)
1367 os=-sysv3
1368 ;;
1369 -sysvr4)
1370 os=-sysv4
1371 ;;
1372 # This must come after -sysvr4.
1373 -sysv*)
1374 ;;
1375 -ose*)
1376 os=-ose
1377 ;;
1378 -es1800*)
1379 os=-ose
1380 ;;
1381 -xenix)
1382 os=-xenix
1383 ;;
1384 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1385 os=-mint
1386 ;;
1387 -aros*)
1388 os=-aros
1389 ;;
1390 -kaos*)
1391 os=-kaos
1392 ;;
1393 -zvmoe)
1394 os=-zvmoe
1395 ;;
1396 -none)
1397 ;;
1398 *)
1399 # Get rid of the `-' at the beginning of $os.
1400 os=`echo $os | sed 's/[^-]*-//'`
1401 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1402 exit 1
1403 ;;
1404 esac
1405 else
1406
1407 # Here we handle the default operating systems that come with various machines.
1408 # The value should be what the vendor currently ships out the door with their
1409 # machine or put another way, the most popular os provided with the machine.
1410
1411 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1412 # "-sun"), then you have to tell the case statement up towards the top
1413 # that MANUFACTURER isn't an operating system. Otherwise, code above
1414 # will signal an error saying that MANUFACTURER isn't an operating
1415 # system, and we'll never get to this point.
1416
1417 case $basic_machine in
1418 score-*)
1419 os=-elf
1420 ;;
1421 spu-*)
1422 os=-elf
1423 ;;
1424 *-acorn)
1425 os=-riscix1.2
1426 ;;
1427 arm*-rebel)
1428 os=-linux
1429 ;;
1430 arm*-semi)
1431 os=-aout
1432 ;;
1433 c4x-* | tic4x-*)
1434 os=-coff
1435 ;;
1436 # This must come before the *-dec entry.
1437 pdp10-*)
1438 os=-tops20
1439 ;;
1440 pdp11-*)
1441 os=-none
1442 ;;
1443 *-dec | vax-*)
1444 os=-ultrix4.2
1445 ;;
1446 m68*-apollo)
1447 os=-domain
1448 ;;
1449 i386-sun)
1450 os=-sunos4.0.2
1451 ;;
1452 m68000-sun)
1453 os=-sunos3
1454 # This also exists in the configure program, but was not the
1455 # default.
1456 # os=-sunos4
1457 ;;
1458 m68*-cisco)
1459 os=-aout
1460 ;;
1461 mep-*)
1462 os=-elf
1463 ;;
1464 mips*-cisco)
1465 os=-elf
1466 ;;
1467 mips*-*)
1468 os=-elf
1469 ;;
1470 or32-*)
1471 os=-coff
1472 ;;
1473 *-tti) # must be before sparc entry or we get the wrong os.
1474 os=-sysv3
1475 ;;
1476 sparc-* | *-sun)
1477 os=-sunos4.1.1
1478 ;;
1479 *-be)
1480 os=-beos
1481 ;;
1482 *-haiku)
1483 os=-haiku
1484 ;;
1485 *-ibm)
1486 os=-aix
1487 ;;
1488 *-knuth)
1489 os=-mmixware
1490 ;;
1491 *-wec)
1492 os=-proelf
1493 ;;
1494 *-winbond)
1495 os=-proelf
1496 ;;
1497 *-oki)
1498 os=-proelf
1499 ;;
1500 *-hp)
1501 os=-hpux
1502 ;;
1503 *-hitachi)
1504 os=-hiux
1505 ;;
1506 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1507 os=-sysv
1508 ;;
1509 *-cbm)
1510 os=-amigaos
1511 ;;
1512 *-dg)
1513 os=-dgux
1514 ;;
1515 *-dolphin)
1516 os=-sysv3
1517 ;;
1518 m68k-ccur)
1519 os=-rtu
1520 ;;
1521 m88k-omron*)
1522 os=-luna
1523 ;;
1524 *-next )
1525 os=-nextstep
1526 ;;
1527 *-sequent)
1528 os=-ptx
1529 ;;
1530 *-crds)
1531 os=-unos
1532 ;;
1533 *-ns)
1534 os=-genix
1535 ;;
1536 i370-*)
1537 os=-mvs
1538 ;;
1539 *-next)
1540 os=-nextstep3
1541 ;;
1542 *-gould)
1543 os=-sysv
1544 ;;
1545 *-highlevel)
1546 os=-bsd
1547 ;;
1548 *-encore)
1549 os=-bsd
1550 ;;
1551 *-sgi)
1552 os=-irix
1553 ;;
1554 *-siemens)
1555 os=-sysv4
1556 ;;
1557 *-masscomp)
1558 os=-rtu
1559 ;;
1560 f30[01]-fujitsu | f700-fujitsu)
1561 os=-uxpv
1562 ;;
1563 *-rom68k)
1564 os=-coff
1565 ;;
1566 *-*bug)
1567 os=-coff
1568 ;;
1569 *-apple)
1570 os=-macos
1571 ;;
1572 *-atari*)
1573 os=-mint
1574 ;;
1575 *)
1576 os=-none
1577 ;;
1578 esac
1579 fi
1580
1581 # Here we handle the case where we know the os, and the CPU type, but not the
1582 # manufacturer. We pick the logical manufacturer.
1583 vendor=unknown
1584 case $basic_machine in
1585 *-unknown)
1586 case $os in
1587 -riscix*)
1588 vendor=acorn
1589 ;;
1590 -sunos*)
1591 vendor=sun
1592 ;;
1593 -aix*)
1594 vendor=ibm
1595 ;;
1596 -beos*)
1597 vendor=be
1598 ;;
1599 -hpux*)
1600 vendor=hp
1601 ;;
1602 -mpeix*)
1603 vendor=hp
1604 ;;
1605 -hiux*)
1606 vendor=hitachi
1607 ;;
1608 -unos*)
1609 vendor=crds
1610 ;;
1611 -dgux*)
1612 vendor=dg
1613 ;;
1614 -luna*)
1615 vendor=omron
1616 ;;
1617 -genix*)
1618 vendor=ns
1619 ;;
1620 -mvs* | -opened*)
1621 vendor=ibm
1622 ;;
1623 -os400*)
1624 vendor=ibm
1625 ;;
1626 -ptx*)
1627 vendor=sequent
1628 ;;
1629 -tpf*)
1630 vendor=ibm
1631 ;;
1632 -vxsim* | -vxworks* | -windiss*)
1633 vendor=wrs
1634 ;;
1635 -aux*)
1636 vendor=apple
1637 ;;
1638 -hms*)
1639 vendor=hitachi
1640 ;;
1641 -mpw* | -macos*)
1642 vendor=apple
1643 ;;
1644 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1645 vendor=atari
1646 ;;
1647 -vos*)
1648 vendor=stratus
1649 ;;
1650 esac
1651 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1652 ;;
1653 esac
1654
1655 echo $basic_machine$os
1656 exit
1657
1658 # Local variables:
1659 # eval: (add-hook 'write-file-hooks 'time-stamp)
1660 # time-stamp-start: "timestamp='"
1661 # time-stamp-format: "%:y-%02m-%02d"
1662 # time-stamp-end: "'"
1663 # End: