Blob of config.sub (raw blob data)

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='2008-04-14'
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 | metag \
254 | mips | mipsbe | mipseb | mipsel | mipsle \
255 | mips16 \
256 | mips64 | mips64el \
257 | mips64octeon | mips64octeonel \
258 | mips64orion | mips64orionel \
259 | mips64r5900 | mips64r5900el \
260 | mips64vr | mips64vrel \
261 | mips64vr4100 | mips64vr4100el \
262 | mips64vr4300 | mips64vr4300el \
263 | mips64vr5000 | mips64vr5000el \
264 | mips64vr5900 | mips64vr5900el \
265 | mipsisa32 | mipsisa32el \
266 | mipsisa32r2 | mipsisa32r2el \
267 | mipsisa64 | mipsisa64el \
268 | mipsisa64r2 | mipsisa64r2el \
269 | mipsisa64sb1 | mipsisa64sb1el \
270 | mipsisa64sr71k | mipsisa64sr71kel \
271 | mipstx39 | mipstx39el \
272 | mn10200 | mn10300 \
273 | mt \
274 | msp430 \
275 | nios | nios2 \
276 | ns16k | ns32k \
277 | or32 \
278 | pdp10 | pdp11 | pj | pjl \
279 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
280 | pyramid \
281 | score \
282 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
283 | sh64 | sh64le \
284 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
285 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
286 | spu | strongarm \
287 | tahoe | thumb | tic4x | tic80 | tron \
288 | v850 | v850e \
289 | we32k \
290 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
291 | z8k)
292 basic_machine=$basic_machine-unknown
293 ;;
294 m6811 | m68hc11 | m6812 | m68hc12)
295 # Motorola 68HC11/12.
296 basic_machine=$basic_machine-unknown
297 os=-none
298 ;;
299 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
300 ;;
301 ms1)
302 basic_machine=mt-unknown
303 ;;
304
305 # We use `pc' rather than `unknown'
306 # because (1) that's what they normally are, and
307 # (2) the word "unknown" tends to confuse beginning users.
308 i*86 | x86_64)
309 basic_machine=$basic_machine-pc
310 ;;
311 # Object if more than one company name word.
312 *-*-*)
313 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
314 exit 1
315 ;;
316 # Recognize the basic CPU types with company name.
317 580-* \
318 | a29k-* \
319 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
320 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
321 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
322 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
323 | avr-* | avr32-* \
324 | bfin-* | bs2000-* \
325 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
326 | clipper-* | craynv-* | cydra-* \
327 | d10v-* | d30v-* | dlx-* \
328 | elxsi-* \
329 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
330 | h8300-* | h8500-* \
331 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
332 | i*86-* | i860-* | i960-* | ia64-* \
333 | ip2k-* | iq2000-* \
334 | m32c-* | m32r-* | m32rle-* \
335 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
336 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
337 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
338 | mips16-* \
339 | mips64-* | mips64el-* \
340 | mips64octeon-* | mips64octeonel-* \
341 | mips64orion-* | mips64orionel-* \
342 | mips64r5900-* | mips64r5900el-* \
343 | mips64vr-* | mips64vrel-* \
344 | mips64vr4100-* | mips64vr4100el-* \
345 | mips64vr4300-* | mips64vr4300el-* \
346 | mips64vr5000-* | mips64vr5000el-* \
347 | mips64vr5900-* | mips64vr5900el-* \
348 | mipsisa32-* | mipsisa32el-* \
349 | mipsisa32r2-* | mipsisa32r2el-* \
350 | mipsisa64-* | mipsisa64el-* \
351 | mipsisa64r2-* | mipsisa64r2el-* \
352 | mipsisa64sb1-* | mipsisa64sb1el-* \
353 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
354 | mipstx39-* | mipstx39el-* \
355 | mmix-* \
356 | mt-* \
357 | msp430-* \
358 | nios-* | nios2-* \
359 | none-* | np1-* | ns16k-* | ns32k-* \
360 | orion-* \
361 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
362 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
363 | pyramid-* \
364 | romp-* | rs6000-* \
365 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
366 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
367 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
368 | sparclite-* \
369 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
370 | tahoe-* | thumb-* \
371 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
372 | tron-* \
373 | v850-* | v850e-* | vax-* \
374 | we32k-* \
375 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
376 | xstormy16-* | xtensa*-* \
377 | ymp-* \
378 | z8k-*)
379 ;;
380 # Recognize the basic CPU types without company name, with glob match.
381 xtensa*)
382 basic_machine=$basic_machine-unknown
383 ;;
384 # Recognize the various machine names and aliases which stand
385 # for a CPU type and a company and sometimes even an OS.
386 386bsd)
387 basic_machine=i386-unknown
388 os=-bsd
389 ;;
390 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
391 basic_machine=m68000-att
392 ;;
393 3b*)
394 basic_machine=we32k-att
395 ;;
396 a29khif)
397 basic_machine=a29k-amd
398 os=-udi
399 ;;
400 abacus)
401 basic_machine=abacus-unknown
402 ;;
403 adobe68k)
404 basic_machine=m68010-adobe
405 os=-scout
406 ;;
407 alliant | fx80)
408 basic_machine=fx80-alliant
409 ;;
410 altos | altos3068)
411 basic_machine=m68k-altos
412 ;;
413 am29k)
414 basic_machine=a29k-none
415 os=-bsd
416 ;;
417 amd64)
418 basic_machine=x86_64-pc
419 ;;
420 amd64-*)
421 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
422 ;;
423 amdahl)
424 basic_machine=580-amdahl
425 os=-sysv
426 ;;
427 amiga | amiga-*)
428 basic_machine=m68k-unknown
429 ;;
430 amigaos | amigados)
431 basic_machine=m68k-unknown
432 os=-amigaos
433 ;;
434 amigaunix | amix)
435 basic_machine=m68k-unknown
436 os=-sysv4
437 ;;
438 apollo68)
439 basic_machine=m68k-apollo
440 os=-sysv
441 ;;
442 apollo68bsd)
443 basic_machine=m68k-apollo
444 os=-bsd
445 ;;
446 aux)
447 basic_machine=m68k-apple
448 os=-aux
449 ;;
450 balance)
451 basic_machine=ns32k-sequent
452 os=-dynix
453 ;;
454 blackfin)
455 basic_machine=bfin-unknown
456 os=-linux
457 ;;
458 blackfin-*)
459 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
460 os=-linux
461 ;;
462 c90)
463 basic_machine=c90-cray
464 os=-unicos
465 ;;
466 convex-c1)
467 basic_machine=c1-convex
468 os=-bsd
469 ;;
470 convex-c2)
471 basic_machine=c2-convex
472 os=-bsd
473 ;;
474 convex-c32)
475 basic_machine=c32-convex
476 os=-bsd
477 ;;
478 convex-c34)
479 basic_machine=c34-convex
480 os=-bsd
481 ;;
482 convex-c38)
483 basic_machine=c38-convex
484 os=-bsd
485 ;;
486 cray | j90)
487 basic_machine=j90-cray
488 os=-unicos
489 ;;
490 craynv)
491 basic_machine=craynv-cray
492 os=-unicosmp
493 ;;
494 cr16)
495 basic_machine=cr16-unknown
496 os=-elf
497 ;;
498 crds | unos)
499 basic_machine=m68k-crds
500 ;;
501 crisv32 | crisv32-* | etraxfs*)
502 basic_machine=crisv32-axis
503 ;;
504 cris | cris-* | etrax*)
505 basic_machine=cris-axis
506 ;;
507 crx)
508 basic_machine=crx-unknown
509 os=-elf
510 ;;
511 da30 | da30-*)
512 basic_machine=m68k-da30
513 ;;
514 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
515 basic_machine=mips-dec
516 ;;
517 decsystem10* | dec10*)
518 basic_machine=pdp10-dec
519 os=-tops10
520 ;;
521 decsystem20* | dec20*)
522 basic_machine=pdp10-dec
523 os=-tops20
524 ;;
525 delta | 3300 | motorola-3300 | motorola-delta \
526 | 3300-motorola | delta-motorola)
527 basic_machine=m68k-motorola
528 ;;
529 delta88)
530 basic_machine=m88k-motorola
531 os=-sysv3
532 ;;
533 dicos)
534 basic_machine=i686-pc
535 os=-dicos
536 ;;
537 djgpp)
538 basic_machine=i586-pc
539 os=-msdosdjgpp
540 ;;
541 dpx20 | dpx20-*)
542 basic_machine=rs6000-bull
543 os=-bosx
544 ;;
545 dpx2* | dpx2*-bull)
546 basic_machine=m68k-bull
547 os=-sysv3
548 ;;
549 ebmon29k)
550 basic_machine=a29k-amd
551 os=-ebmon
552 ;;
553 elxsi)
554 basic_machine=elxsi-elxsi
555 os=-bsd
556 ;;
557 encore | umax | mmax)
558 basic_machine=ns32k-encore
559 ;;
560 es1800 | OSE68k | ose68k | ose | OSE)
561 basic_machine=m68k-ericsson
562 os=-ose
563 ;;
564 fx2800)
565 basic_machine=i860-alliant
566 ;;
567 genix)
568 basic_machine=ns32k-ns
569 ;;
570 gmicro)
571 basic_machine=tron-gmicro
572 os=-sysv
573 ;;
574 go32)
575 basic_machine=i386-pc
576 os=-go32
577 ;;
578 h3050r* | hiux*)
579 basic_machine=hppa1.1-hitachi
580 os=-hiuxwe2
581 ;;
582 h8300hms)
583 basic_machine=h8300-hitachi
584 os=-hms
585 ;;
586 h8300xray)
587 basic_machine=h8300-hitachi
588 os=-xray
589 ;;
590 h8500hms)
591 basic_machine=h8500-hitachi
592 os=-hms
593 ;;
594 harris)
595 basic_machine=m88k-harris
596 os=-sysv3
597 ;;
598 hp300-*)
599 basic_machine=m68k-hp
600 ;;
601 hp300bsd)
602 basic_machine=m68k-hp
603 os=-bsd
604 ;;
605 hp300hpux)
606 basic_machine=m68k-hp
607 os=-hpux
608 ;;
609 hp3k9[0-9][0-9] | hp9[0-9][0-9])
610 basic_machine=hppa1.0-hp
611 ;;
612 hp9k2[0-9][0-9] | hp9k31[0-9])
613 basic_machine=m68000-hp
614 ;;
615 hp9k3[2-9][0-9])
616 basic_machine=m68k-hp
617 ;;
618 hp9k6[0-9][0-9] | hp6[0-9][0-9])
619 basic_machine=hppa1.0-hp
620 ;;
621 hp9k7[0-79][0-9] | hp7[0-79][0-9])
622 basic_machine=hppa1.1-hp
623 ;;
624 hp9k78[0-9] | hp78[0-9])
625 # FIXME: really hppa2.0-hp
626 basic_machine=hppa1.1-hp
627 ;;
628 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
629 # FIXME: really hppa2.0-hp
630 basic_machine=hppa1.1-hp
631 ;;
632 hp9k8[0-9][13679] | hp8[0-9][13679])
633 basic_machine=hppa1.1-hp
634 ;;
635 hp9k8[0-9][0-9] | hp8[0-9][0-9])
636 basic_machine=hppa1.0-hp
637 ;;
638 hppa-next)
639 os=-nextstep3
640 ;;
641 hppaosf)
642 basic_machine=hppa1.1-hp
643 os=-osf
644 ;;
645 hppro)
646 basic_machine=hppa1.1-hp
647 os=-proelf
648 ;;
649 i370-ibm* | ibm*)
650 basic_machine=i370-ibm
651 ;;
652 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
653 i*86v32)
654 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
655 os=-sysv32
656 ;;
657 i*86v4*)
658 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
659 os=-sysv4
660 ;;
661 i*86v)
662 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
663 os=-sysv
664 ;;
665 i*86sol2)
666 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
667 os=-solaris2
668 ;;
669 i386mach)
670 basic_machine=i386-mach
671 os=-mach
672 ;;
673 i386-vsta | vsta)
674 basic_machine=i386-unknown
675 os=-vsta
676 ;;
677 iris | iris4d)
678 basic_machine=mips-sgi
679 case $os in
680 -irix*)
681 ;;
682 *)
683 os=-irix4
684 ;;
685 esac
686 ;;
687 isi68 | isi)
688 basic_machine=m68k-isi
689 os=-sysv
690 ;;
691 m68knommu)
692 basic_machine=m68k-unknown
693 os=-linux
694 ;;
695 m68knommu-*)
696 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
697 os=-linux
698 ;;
699 m88k-omron*)
700 basic_machine=m88k-omron
701 ;;
702 magnum | m3230)
703 basic_machine=mips-mips
704 os=-sysv
705 ;;
706 merlin)
707 basic_machine=ns32k-utek
708 os=-sysv
709 ;;
710 mingw32)
711 basic_machine=i386-pc
712 os=-mingw32
713 ;;
714 mingw32ce)
715 basic_machine=arm-unknown
716 os=-mingw32ce
717 ;;
718 miniframe)
719 basic_machine=m68000-convergent
720 ;;
721 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
722 basic_machine=m68k-atari
723 os=-mint
724 ;;
725 mips3*-*)
726 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
727 ;;
728 mips3*)
729 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
730 ;;
731 monitor)
732 basic_machine=m68k-rom68k
733 os=-coff
734 ;;
735 morphos)
736 basic_machine=powerpc-unknown
737 os=-morphos
738 ;;
739 msdos)
740 basic_machine=i386-pc
741 os=-msdos
742 ;;
743 ms1-*)
744 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
745 ;;
746 mvs)
747 basic_machine=i370-ibm
748 os=-mvs
749 ;;
750 ncr3000)
751 basic_machine=i486-ncr
752 os=-sysv4
753 ;;
754 netbsd386)
755 basic_machine=i386-unknown
756 os=-netbsd
757 ;;
758 netwinder)
759 basic_machine=armv4l-rebel
760 os=-linux
761 ;;
762 news | news700 | news800 | news900)
763 basic_machine=m68k-sony
764 os=-newsos
765 ;;
766 news1000)
767 basic_machine=m68030-sony
768 os=-newsos
769 ;;
770 news-3600 | risc-news)
771 basic_machine=mips-sony
772 os=-newsos
773 ;;
774 necv70)
775 basic_machine=v70-nec
776 os=-sysv
777 ;;
778 next | m*-next )
779 basic_machine=m68k-next
780 case $os in
781 -nextstep* )
782 ;;
783 -ns2*)
784 os=-nextstep2
785 ;;
786 *)
787 os=-nextstep3
788 ;;
789 esac
790 ;;
791 nh3000)
792 basic_machine=m68k-harris
793 os=-cxux
794 ;;
795 nh[45]000)
796 basic_machine=m88k-harris
797 os=-cxux
798 ;;
799 nindy960)
800 basic_machine=i960-intel
801 os=-nindy
802 ;;
803 mon960)
804 basic_machine=i960-intel
805 os=-mon960
806 ;;
807 nonstopux)
808 basic_machine=mips-compaq
809 os=-nonstopux
810 ;;
811 np1)
812 basic_machine=np1-gould
813 ;;
814 nsr-tandem)
815 basic_machine=nsr-tandem
816 ;;
817 op50n-* | op60c-*)
818 basic_machine=hppa1.1-oki
819 os=-proelf
820 ;;
821 openrisc | openrisc-*)
822 basic_machine=or32-unknown
823 ;;
824 os400)
825 basic_machine=powerpc-ibm
826 os=-os400
827 ;;
828 OSE68000 | ose68000)
829 basic_machine=m68000-ericsson
830 os=-ose
831 ;;
832 os68k)
833 basic_machine=m68k-none
834 os=-os68k
835 ;;
836 pa-hitachi)
837 basic_machine=hppa1.1-hitachi
838 os=-hiuxwe2
839 ;;
840 paragon)
841 basic_machine=i860-intel
842 os=-osf
843 ;;
844 parisc)
845 basic_machine=hppa-unknown
846 os=-linux
847 ;;
848 parisc-*)
849 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
850 os=-linux
851 ;;
852 pbd)
853 basic_machine=sparc-tti
854 ;;
855 pbb)
856 basic_machine=m68k-tti
857 ;;
858 pc532 | pc532-*)
859 basic_machine=ns32k-pc532
860 ;;
861 pc98)
862 basic_machine=i386-pc
863 ;;
864 pc98-*)
865 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
866 ;;
867 pentium | p5 | k5 | k6 | nexgen | viac3)
868 basic_machine=i586-pc
869 ;;
870 pentiumpro | p6 | 6x86 | athlon | athlon_*)
871 basic_machine=i686-pc
872 ;;
873 pentiumii | pentium2 | pentiumiii | pentium3)
874 basic_machine=i686-pc
875 ;;
876 pentium4)
877 basic_machine=i786-pc
878 ;;
879 pentium-* | p5-* |