Warning and partial fix for gcc -freorder-blocks-and-partition related problem.
[binutils.git] / config.sub
blobc2262a72984cdb11e2eef776ed81d6c44e2d9e8a
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 Free Software Foundation, Inc.
6 timestamp='2005-04-22'
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place - Suite 330,
25 # Boston, MA 02111-1307, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # Please send patches to <config-patches@gnu.org>. Submit a context
33 # diff and a properly formatted ChangeLog entry.
35 # Configuration subroutine to validate and canonicalize a configuration type.
36 # Supply the specified configuration type as an argument.
37 # If it is invalid, we print an error message on stderr and exit with code 1.
38 # Otherwise, we print the canonical config type on stdout and succeed.
40 # This file is supposed to be the same for all GNU packages
41 # and recognize all the CPU types, system types and aliases
42 # that are meaningful with *any* GNU software.
43 # Each package is responsible for reporting which valid configurations
44 # it does not support. The user should be able to distinguish
45 # a failure to support a valid configuration from a meaningless
46 # configuration.
48 # The goal of this file is to map all the various variations of a given
49 # machine specification into a single specification in the form:
50 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
51 # or in some cases, the newer four-part form:
52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
53 # It is wrong to echo any other type of specification.
55 me=`echo "$0" | sed -e 's,.*/,,'`
57 usage="\
58 Usage: $0 [OPTION] CPU-MFR-OPSYS
59 $0 [OPTION] ALIAS
61 Canonicalize a configuration name.
63 Operation modes:
64 -h, --help print this help, then exit
65 -t, --time-stamp print date of last modification, then exit
66 -v, --version print version number, then exit
68 Report bugs and patches to <config-patches@gnu.org>."
70 version="\
71 GNU config.sub ($timestamp)
73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
74 Free Software Foundation, Inc.
76 This is free software; see the source for copying conditions. There is NO
77 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
79 help="
80 Try \`$me --help' for more information."
82 # Parse command line
83 while test $# -gt 0 ; do
84 case $1 in
85 --time-stamp | --time* | -t )
86 echo "$timestamp" ; exit 0 ;;
87 --version | -v )
88 echo "$version" ; exit 0 ;;
89 --help | --h* | -h )
90 echo "$usage"; exit 0 ;;
91 -- ) # Stop option processing
92 shift; break ;;
93 - ) # Use stdin as input.
94 break ;;
95 -* )
96 echo "$me: invalid option $1$help"
97 exit 1 ;;
99 *local*)
100 # First pass through any local machine types.
101 echo $1
102 exit 0;;
105 break ;;
106 esac
107 done
109 case $# in
110 0) echo "$me: missing argument$help" >&2
111 exit 1;;
112 1) ;;
113 *) echo "$me: too many arguments$help" >&2
114 exit 1;;
115 esac
117 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
118 # Here we must recognize all the valid KERNEL-OS combinations.
119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120 case $maybe_os in
121 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
122 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
123 os=-$maybe_os
124 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
127 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
128 if [ $basic_machine != $1 ]
129 then os=`echo $1 | sed 's/.*-/-/'`
130 else os=; fi
132 esac
134 ### Let's recognize common machines as not being operating systems so
135 ### that things like config.sub decstation-3100 work. We also
136 ### recognize some manufacturers as not being operating systems, so we
137 ### can provide default operating systems below.
138 case $os in
139 -sun*os*)
140 # Prevent following clause from handling this invalid input.
142 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
143 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
144 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
145 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
146 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
147 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
148 -apple | -axis | -knuth | -cray)
150 basic_machine=$1
152 -sim | -cisco | -oki | -wec | -winbond)
154 basic_machine=$1
156 -scout)
158 -wrs)
159 os=-vxworks
160 basic_machine=$1
162 -chorusos*)
163 os=-chorusos
164 basic_machine=$1
166 -chorusrdb)
167 os=-chorusrdb
168 basic_machine=$1
170 -hiux*)
171 os=-hiuxwe2
173 -sco5)
174 os=-sco3.2v5
175 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
177 -sco4)
178 os=-sco3.2v4
179 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
181 -sco3.2.[4-9]*)
182 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
183 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185 -sco3.2v[4-9]*)
186 # Don't forget version if it is 3.2v4 or newer.
187 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 -sco*)
190 os=-sco3.2v2
191 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 -udk*)
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196 -isc)
197 os=-isc2.2
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200 -clix*)
201 basic_machine=clipper-intergraph
203 -isc*)
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 -lynx*)
207 os=-lynxos
209 -ptx*)
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
212 -windowsnt*)
213 os=`echo $os | sed -e 's/windowsnt/winnt/'`
215 -psos*)
216 os=-psos
218 -mint | -mint[0-9]*)
219 basic_machine=m68k-atari
220 os=-mint
222 esac
224 # Decode aliases for certain CPU-COMPANY combinations.
225 case $basic_machine in
226 # Recognize the basic CPU types without company name.
227 # Some are omitted here because they have special meanings below.
228 1750a | 580 \
229 | a29k \
230 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
231 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
232 | am33_2.0 \
233 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
234 | bfin \
235 | c4x | clipper \
236 | d10v | d30v | dlx | dsp16xx \
237 | fr30 | frv \
238 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
239 | i370 | i860 | i960 | ia64 \
240 | ip2k | iq2000 \
241 | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
242 | mips | mipsbe | mipseb | mipsel | mipsle \
243 | mips16 \
244 | mips64 | mips64el \
245 | mips64vr | mips64vrel \
246 | mips64orion | mips64orionel \
247 | mips64vr4100 | mips64vr4100el \
248 | mips64vr4300 | mips64vr4300el \
249 | mips64vr5000 | mips64vr5000el \
250 | mipsisa32 | mipsisa32el \
251 | mipsisa32r2 | mipsisa32r2el \
252 | mipsisa64 | mipsisa64el \
253 | mipsisa64r2 | mipsisa64r2el \
254 | mipsisa64sb1 | mipsisa64sb1el \
255 | mipsisa64sr71k | mipsisa64sr71kel \
256 | mipstx39 | mipstx39el \
257 | mn10200 | mn10300 \
258 | msp430 \
259 | ns16k | ns32k \
260 | openrisc | or32 \
261 | pdp10 | pdp11 | pj | pjl \
262 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
263 | pyramid \
264 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
265 | sh64 | sh64le \
266 | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
267 | sparcv8 | sparcv9 | sparcv9b \
268 | strongarm \
269 | tahoe | thumb | tic4x | tic80 | tron \
270 | v850 | v850e \
271 | we32k \
272 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
273 | z8k)
274 basic_machine=$basic_machine-unknown
276 m32c)
277 basic_machine=$basic_machine-unknown
279 m6811 | m68hc11 | m6812 | m68hc12)
280 # Motorola 68HC11/12.
281 basic_machine=$basic_machine-unknown
282 os=-none
284 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
287 # We use `pc' rather than `unknown'
288 # because (1) that's what they normally are, and
289 # (2) the word "unknown" tends to confuse beginning users.
290 i*86 | x86_64)
291 basic_machine=$basic_machine-pc
293 # Object if more than one company name word.
294 *-*-*)
295 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
296 exit 1
298 # Recognize the basic CPU types with company name.
299 580-* \
300 | a29k-* \
301 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
302 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
303 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
304 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
305 | avr-* \
306 | bfin-* | bs2000-* \
307 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
308 | clipper-* | craynv-* | cydra-* \
309 | d10v-* | d30v-* | dlx-* \
310 | elxsi-* \
311 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
312 | h8300-* | h8500-* \
313 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
314 | i*86-* | i860-* | i960-* | ia64-* \
315 | ip2k-* | iq2000-* \
316 | m32r-* | m32rle-* \
317 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
318 | m88110-* | m88k-* | maxq-* | mcore-* \
319 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
320 | mips16-* \
321 | mips64-* | mips64el-* \
322 | mips64vr-* | mips64vrel-* \
323 | mips64orion-* | mips64orionel-* \
324 | mips64vr4100-* | mips64vr4100el-* \
325 | mips64vr4300-* | mips64vr4300el-* \
326 | mips64vr5000-* | mips64vr5000el-* \
327 | mipsisa32-* | mipsisa32el-* \
328 | mipsisa32r2-* | mipsisa32r2el-* \
329 | mipsisa64-* | mipsisa64el-* \
330 | mipsisa64r2-* | mipsisa64r2el-* \
331 | mipsisa64sb1-* | mipsisa64sb1el-* \
332 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
333 | mipstx39-* | mipstx39el-* \
334 | mmix-* \
335 | msp430-* \
336 | none-* | np1-* | ns16k-* | ns32k-* \
337 | orion-* \
338 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
339 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
340 | pyramid-* \
341 | romp-* | rs6000-* \
342 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
343 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
344 | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
345 | sparclite-* \
346 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
347 | tahoe-* | thumb-* \
348 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
349 | tron-* \
350 | v850-* | v850e-* | vax-* \
351 | we32k-* \
352 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
353 | xstormy16-* | xtensa-* \
354 | ymp-* \
355 | z8k-*)
357 m32c-*)
359 # Recognize the various machine names and aliases which stand
360 # for a CPU type and a company and sometimes even an OS.
361 386bsd)
362 basic_machine=i386-unknown
363 os=-bsd
365 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
366 basic_machine=m68000-att
368 3b*)
369 basic_machine=we32k-att
371 a29khif)
372 basic_machine=a29k-amd
373 os=-udi
375 abacus)
376 basic_machine=abacus-unknown
378 adobe68k)
379 basic_machine=m68010-adobe
380 os=-scout
382 alliant | fx80)
383 basic_machine=fx80-alliant
385 altos | altos3068)
386 basic_machine=m68k-altos
388 am29k)
389 basic_machine=a29k-none
390 os=-bsd
392 amd64)
393 basic_machine=x86_64-pc
395 amd64-*)
396 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
398 amdahl)
399 basic_machine=580-amdahl
400 os=-sysv
402 amiga | amiga-*)
403 basic_machine=m68k-unknown
405 amigaos | amigados)
406 basic_machine=m68k-unknown
407 os=-amigaos
409 amigaunix | amix)
410 basic_machine=m68k-unknown
411 os=-sysv4
413 apollo68)
414 basic_machine=m68k-apollo
415 os=-sysv
417 apollo68bsd)
418 basic_machine=m68k-apollo
419 os=-bsd
421 aux)
422 basic_machine=m68k-apple
423 os=-aux
425 balance)
426 basic_machine=ns32k-sequent
427 os=-dynix
429 c90)
430 basic_machine=c90-cray
431 os=-unicos
433 convex-c1)
434 basic_machine=c1-convex
435 os=-bsd
437 convex-c2)
438 basic_machine=c2-convex
439 os=-bsd
441 convex-c32)
442 basic_machine=c32-convex
443 os=-bsd
445 convex-c34)
446 basic_machine=c34-convex
447 os=-bsd
449 convex-c38)
450 basic_machine=c38-convex
451 os=-bsd
453 cray | j90)
454 basic_machine=j90-cray
455 os=-unicos
457 craynv)
458 basic_machine=craynv-cray
459 os=-unicosmp
461 cr16c)
462 basic_machine=cr16c-unknown
463 os=-elf
465 crds | unos)
466 basic_machine=m68k-crds
468 crisv32 | crisv32-* | etraxfs*)
469 basic_machine=crisv32-axis
471 cris | cris-* | etrax*)
472 basic_machine=cris-axis
474 crx)
475 basic_machine=crx-unknown
476 os=-elf
478 da30 | da30-*)
479 basic_machine=m68k-da30
481 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
482 basic_machine=mips-dec
484 decsystem10* | dec10*)
485 basic_machine=pdp10-dec
486 os=-tops10
488 decsystem20* | dec20*)
489 basic_machine=pdp10-dec
490 os=-tops20
492 delta | 3300 | motorola-3300 | motorola-delta \
493 | 3300-motorola | delta-motorola)
494 basic_machine=m68k-motorola
496 delta88)
497 basic_machine=m88k-motorola
498 os=-sysv3
500 djgpp)
501 basic_machine=i586-pc
502 os=-msdosdjgpp
504 dpx20 | dpx20-*)
505 basic_machine=rs6000-bull
506 os=-bosx
508 dpx2* | dpx2*-bull)
509 basic_machine=m68k-bull
510 os=-sysv3
512 ebmon29k)
513 basic_machine=a29k-amd
514 os=-ebmon
516 elxsi)
517 basic_machine=elxsi-elxsi
518 os=-bsd
520 encore | umax | mmax)
521 basic_machine=ns32k-encore
523 es1800 | OSE68k | ose68k | ose | OSE)
524 basic_machine=m68k-ericsson
525 os=-ose
527 fx2800)
528 basic_machine=i860-alliant
530 genix)
531 basic_machine=ns32k-ns
533 gmicro)
534 basic_machine=tron-gmicro
535 os=-sysv
537 go32)
538 basic_machine=i386-pc
539 os=-go32
541 h3050r* | hiux*)
542 basic_machine=hppa1.1-hitachi
543 os=-hiuxwe2
545 h8300hms)
546 basic_machine=h8300-hitachi
547 os=-hms
549 h8300xray)
550 basic_machine=h8300-hitachi
551 os=-xray
553 h8500hms)
554 basic_machine=h8500-hitachi
555 os=-hms
557 harris)
558 basic_machine=m88k-harris
559 os=-sysv3
561 hp300-*)
562 basic_machine=m68k-hp
564 hp300bsd)
565 basic_machine=m68k-hp
566 os=-bsd
568 hp300hpux)
569 basic_machine=m68k-hp
570 os=-hpux
572 hp3k9[0-9][0-9] | hp9[0-9][0-9])
573 basic_machine=hppa1.0-hp
575 hp9k2[0-9][0-9] | hp9k31[0-9])
576 basic_machine=m68000-hp
578 hp9k3[2-9][0-9])
579 basic_machine=m68k-hp
581 hp9k6[0-9][0-9] | hp6[0-9][0-9])
582 basic_machine=hppa1.0-hp
584 hp9k7[0-79][0-9] | hp7[0-79][0-9])
585 basic_machine=hppa1.1-hp
587 hp9k78[0-9] | hp78[0-9])
588 # FIXME: really hppa2.0-hp
589 basic_machine=hppa1.1-hp
591 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
592 # FIXME: really hppa2.0-hp
593 basic_machine=hppa1.1-hp
595 hp9k8[0-9][13679] | hp8[0-9][13679])
596 basic_machine=hppa1.1-hp
598 hp9k8[0-9][0-9] | hp8[0-9][0-9])
599 basic_machine=hppa1.0-hp
601 hppa-next)
602 os=-nextstep3
604 hppaosf)
605 basic_machine=hppa1.1-hp
606 os=-osf
608 hppro)
609 basic_machine=hppa1.1-hp
610 os=-proelf
612 i370-ibm* | ibm*)
613 basic_machine=i370-ibm
615 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
616 i*86v32)
617 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
618 os=-sysv32
620 i*86v4*)
621 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
622 os=-sysv4
624 i*86v)
625 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
626 os=-sysv
628 i*86sol2)
629 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
630 os=-solaris2
632 i386mach)
633 basic_machine=i386-mach
634 os=-mach
636 i386-vsta | vsta)
637 basic_machine=i386-unknown
638 os=-vsta
640 iris | iris4d)
641 basic_machine=mips-sgi
642 case $os in
643 -irix*)
646 os=-irix4
648 esac
650 isi68 | isi)
651 basic_machine=m68k-isi
652 os=-sysv
654 m88k-omron*)
655 basic_machine=m88k-omron
657 magnum | m3230)
658 basic_machine=mips-mips
659 os=-sysv
661 merlin)
662 basic_machine=ns32k-utek
663 os=-sysv
665 mingw32)
666 basic_machine=i386-pc
667 os=-mingw32
669 miniframe)
670 basic_machine=m68000-convergent
672 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
673 basic_machine=m68k-atari
674 os=-mint
676 mips3*-*)
677 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
679 mips3*)
680 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
682 monitor)
683 basic_machine=m68k-rom68k
684 os=-coff
686 morphos)
687 basic_machine=powerpc-unknown
688 os=-morphos
690 msdos)
691 basic_machine=i386-pc
692 os=-msdos
694 mvs)
695 basic_machine=i370-ibm
696 os=-mvs
698 ncr3000)
699 basic_machine=i486-ncr
700 os=-sysv4
702 netbsd386)
703 basic_machine=i386-unknown
704 os=-netbsd
706 netwinder)
707 basic_machine=armv4l-rebel
708 os=-linux
710 news | news700 | news800 | news900)
711 basic_machine=m68k-sony
712 os=-newsos
714 news1000)
715 basic_machine=m68030-sony
716 os=-newsos
718 news-3600 | risc-news)
719 basic_machine=mips-sony
720 os=-newsos
722 necv70)
723 basic_machine=v70-nec
724 os=-sysv
726 next | m*-next )
727 basic_machine=m68k-next
728 case $os in
729 -nextstep* )
731 -ns2*)
732 os=-nextstep2
735 os=-nextstep3
737 esac
739 nh3000)
740 basic_machine=m68k-harris
741 os=-cxux
743 nh[45]000)
744 basic_machine=m88k-harris
745 os=-cxux
747 nindy960)
748 basic_machine=i960-intel
749 os=-nindy
751 mon960)
752 basic_machine=i960-intel
753 os=-mon960
755 nonstopux)
756 basic_machine=mips-compaq
757 os=-nonstopux
759 np1)
760 basic_machine=np1-gould
762 nsr-tandem)
763 basic_machine=nsr-tandem
765 op50n-* | op60c-*)
766 basic_machine=hppa1.1-oki
767 os=-proelf
769 or32 | or32-*)
770 basic_machine=or32-unknown
771 os=-coff
773 os400)
774 basic_machine=powerpc-ibm
775 os=-os400
777 OSE68000 | ose68000)
778 basic_machine=m68000-ericsson
779 os=-ose
781 os68k)
782 basic_machine=m68k-none
783 os=-os68k
785 pa-hitachi)
786 basic_machine=hppa1.1-hitachi
787 os=-hiuxwe2
789 paragon)
790 basic_machine=i860-intel
791 os=-osf
793 pbd)
794 basic_machine=sparc-tti
796 pbb)
797 basic_machine=m68k-tti
799 pc532 | pc532-*)
800 basic_machine=ns32k-pc532
802 pentium | p5 | k5 | k6 | nexgen | viac3)
803 basic_machine=i586-pc
805 pentiumpro | p6 | 6x86 | athlon | athlon_*)
806 basic_machine=i686-pc
808 pentiumii | pentium2 | pentiumiii | pentium3)
809 basic_machine=i686-pc
811 pentium4)
812 basic_machine=i786-pc
814 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
815 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
817 pentiumpro-* | p6-* | 6x86-* | athlon-*)
818 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
820 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
821 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
823 pentium4-*)
824 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
827 basic_machine=pn-gould
829 power) basic_machine=power-ibm
831 ppc) basic_machine=powerpc-unknown
833 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
835 ppcle | powerpclittle | ppc-le | powerpc-little)
836 basic_machine=powerpcle-unknown
838 ppcle-* | powerpclittle-*)
839 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
841 ppc64) basic_machine=powerpc64-unknown
843 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
845 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
846 basic_machine=powerpc64le-unknown
848 ppc64le-* | powerpc64little-*)
849 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
851 ps2)
852 basic_machine=i386-ibm
854 pw32)
855 basic_machine=i586-unknown
856 os=-pw32
858 rom68k)
859 basic_machine=m68k-rom68k
860 os=-coff
862 rm[46]00)
863 basic_machine=mips-siemens
865 rtpc | rtpc-*)
866 basic_machine=romp-ibm
868 s390 | s390-*)
869 basic_machine=s390-ibm
871 s390x | s390x-*)
872 basic_machine=s390x-ibm
874 sa29200)
875 basic_machine=a29k-amd
876 os=-udi
878 sb1)
879 basic_machine=mipsisa64sb1-unknown
881 sb1el)
882 basic_machine=mipsisa64sb1el-unknown
884 sei)
885 basic_machine=mips-sei
886 os=-seiux
888 sequent)
889 basic_machine=i386-sequent
892 basic_machine=sh-hitachi
893 os=-hms
895 sh64)
896 basic_machine=sh64-unknown
898 sparclite-wrs | simso-wrs)
899 basic_machine=sparclite-wrs
900 os=-vxworks
902 sps7)
903 basic_machine=m68k-bull
904 os=-sysv2
906 spur)
907 basic_machine=spur-unknown
909 st2000)
910 basic_machine=m68k-tandem
912 stratus)
913 basic_machine=i860-stratus
914 os=-sysv4
916 sun2)
917 basic_machine=m68000-sun
919 sun2os3)
920 basic_machine=m68000-sun
921 os=-sunos3
923 sun2os4)
924 basic_machine=m68000-sun
925 os=-sunos4
927 sun3os3)
928 basic_machine=m68k-sun
929 os=-sunos3
931 sun3os4)
932 basic_machine=m68k-sun
933 os=-sunos4
935 sun4os3)
936 basic_machine=sparc-sun
937 os=-sunos3
939 sun4os4)
940 basic_machine=sparc-sun
941 os=-sunos4
943 sun4sol2)
944 basic_machine=sparc-sun
945 os=-solaris2
947 sun3 | sun3-*)
948 basic_machine=m68k-sun
950 sun4)
951 basic_machine=sparc-sun
953 sun386 | sun386i | roadrunner)
954 basic_machine=i386-sun
956 sv1)
957 basic_machine=sv1-cray
958 os=-unicos
960 symmetry)
961 basic_machine=i386-sequent
962 os=-dynix
964 t3e)
965 basic_machine=alphaev5-cray
966 os=-unicos
968 t90)
969 basic_machine=t90-cray
970 os=-unicos
972 tic54x | c54x*)
973 basic_machine=tic54x-unknown
974 os=-coff
976 tic55x | c55x*)
977 basic_machine=tic55x-unknown
978 os=-coff
980 tic6x | c6x*)
981 basic_machine=tic6x-unknown
982 os=-coff
984 tx39)
985 basic_machine=mipstx39-unknown
987 tx39el)
988 basic_machine=mipstx39el-unknown
990 toad1)
991 basic_machine=pdp10-xkl
992 os=-tops20
994 tower | tower-32)
995 basic_machine=m68k-ncr
997 tpf)
998 basic_machine=s390x-ibm
999 os=-tpf
1001 udi29k)
1002 basic_machine=a29k-amd
1003 os=-udi
1005 ultra3)
1006 basic_machine=a29k-nyu
1007 os=-sym1
1009 v810 | necv810)
1010 basic_machine=v810-nec
1011 os=-none
1013 vaxv)
1014 basic_machine=vax-dec
1015 os=-sysv
1017 vms)
1018 basic_machine=vax-dec
1019 os=-vms
1021 vpp*|vx|vx-*)
1022 basic_machine=f301-fujitsu
1024 vxworks960)
1025 basic_machine=i960-wrs
1026 os=-vxworks
1028 vxworks68)
1029 basic_machine=m68k-wrs
1030 os=-vxworks
1032 vxworks29k)
1033 basic_machine=a29k-wrs
1034 os=-vxworks
1036 w65*)
1037 basic_machine=w65-wdc
1038 os=-none
1040 w89k-*)
1041 basic_machine=hppa1.1-winbond
1042 os=-proelf
1044 xbox)
1045 basic_machine=i686-pc
1046 os=-mingw32
1048 xps | xps100)
1049 basic_machine=xps100-honeywell
1051 ymp)
1052 basic_machine=ymp-cray
1053 os=-unicos
1055 z8k-*-coff)
1056 basic_machine=z8k-unknown
1057 os=-sim
1059 none)
1060 basic_machine=none-none
1061 os=-none
1064 # Here we handle the default manufacturer of certain CPU types. It is in
1065 # some cases the only manufacturer, in others, it is the most popular.
1066 w89k)
1067 basic_machine=hppa1.1-winbond
1069 op50n)
1070 basic_machine=hppa1.1-oki
1072 op60c)
1073 basic_machine=hppa1.1-oki
1075 romp)
1076 basic_machine=romp-ibm
1078 mmix)
1079 basic_machine=mmix-knuth
1081 rs6000)
1082 basic_machine=rs6000-ibm
1084 vax)
1085 basic_machine=vax-dec
1087 pdp10)
1088 # there are many clones, so DEC is not a safe bet
1089 basic_machine=pdp10-unknown
1091 pdp11)
1092 basic_machine=pdp11-dec
1094 we32k)
1095 basic_machine=we32k-att
1097 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1098 basic_machine=sh-unknown
1100 sh64)
1101 basic_machine=sh64-unknown
1103 sparc | sparcv8 | sparcv9 | sparcv9b)
1104 basic_machine=sparc-sun
1106 cydra)
1107 basic_machine=cydra-cydrome
1109 orion)
1110 basic_machine=orion-highlevel
1112 orion105)
1113 basic_machine=clipper-highlevel
1115 mac | mpw | mac-mpw)
1116 basic_machine=m68k-apple
1118 pmac | pmac-mpw)
1119 basic_machine=powerpc-apple
1121 *-unknown)
1122 # Make sure to match an already-canonicalized machine name.
1125 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1126 exit 1
1128 esac
1130 # Here we canonicalize certain aliases for manufacturers.
1131 case $basic_machine in
1132 *-digital*)
1133 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1135 *-commodore*)
1136 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1140 esac
1142 # Decode manufacturer-specific aliases for certain operating systems.
1144 if [ x"$os" != x"" ]
1145 then
1146 case $os in
1147 # First match some system type aliases
1148 # that might get confused with valid system types.
1149 # -solaris* is a basic system type, with this one exception.
1150 -solaris1 | -solaris1.*)
1151 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1153 -solaris)
1154 os=-solaris2
1156 -svr4*)
1157 os=-sysv4
1159 -unixware*)
1160 os=-sysv4.2uw
1162 -gnu/linux*)
1163 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1165 # First accept the basic system types.
1166 # The portable systems comes first.
1167 # Each alternative MUST END IN A *, to match a version number.
1168 # -sysv* is not here because it comes later, after sysvr4.
1169 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1170 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1171 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1172 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1173 | -aos* \
1174 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1175 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1176 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1177 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1178 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1179 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1180 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1181 | -chorusos* | -chorusrdb* \
1182 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1183 | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1184 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1185 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1186 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1187 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1188 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1189 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
1190 # Remember, each alternative MUST END IN *, to match a version number.
1192 -qnx*)
1193 case $basic_machine in
1194 x86-* | i*86-*)
1197 os=-nto$os
1199 esac
1201 -nto-qnx*)
1203 -nto*)
1204 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1206 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1207 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1208 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1210 -mac*)
1211 os=`echo $os | sed -e 's|mac|macos|'`
1213 -linux-dietlibc)
1214 os=-linux-dietlibc
1216 -linux*)
1217 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1219 -sunos5*)
1220 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1222 -sunos6*)
1223 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1225 -opened*)
1226 os=-openedition
1228 -os400*)
1229 os=-os400
1231 -wince*)
1232 os=-wince
1234 -osfrose*)
1235 os=-osfrose
1237 -osf*)
1238 os=-osf
1240 -utek*)
1241 os=-bsd
1243 -dynix*)
1244 os=-bsd
1246 -acis*)
1247 os=-aos
1249 -atheos*)
1250 os=-atheos
1252 -syllable*)
1253 os=-syllable
1255 -386bsd)
1256 os=-bsd
1258 -ctix* | -uts*)
1259 os=-sysv
1261 -nova*)
1262 os=-rtmk-nova
1264 -ns2 )
1265 os=-nextstep2
1267 -nsk*)
1268 os=-nsk
1270 # Preserve the version number of sinix5.
1271 -sinix5.*)
1272 os=`echo $os | sed -e 's|sinix|sysv|'`
1274 -sinix*)
1275 os=-sysv4
1277 -tpf*)
1278 os=-tpf
1280 -triton*)
1281 os=-sysv3
1283 -oss*)
1284 os=-sysv3
1286 -svr4)
1287 os=-sysv4
1289 -svr3)
1290 os=-sysv3
1292 -sysvr4)
1293 os=-sysv4
1295 # This must come after -sysvr4.
1296 -sysv*)
1298 -ose*)
1299 os=-ose
1301 -es1800*)
1302 os=-ose
1304 -xenix)
1305 os=-xenix
1307 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1308 os=-mint
1310 -aros*)
1311 os=-aros
1313 -kaos*)
1314 os=-kaos
1316 -zvmoe)
1317 os=-zvmoe
1319 -none)
1322 # Get rid of the `-' at the beginning of $os.
1323 os=`echo $os | sed 's/[^-]*-//'`
1324 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1325 exit 1
1327 esac
1328 else
1330 # Here we handle the default operating systems that come with various machines.
1331 # The value should be what the vendor currently ships out the door with their
1332 # machine or put another way, the most popular os provided with the machine.
1334 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1335 # "-sun"), then you have to tell the case statement up towards the top
1336 # that MANUFACTURER isn't an operating system. Otherwise, code above
1337 # will signal an error saying that MANUFACTURER isn't an operating
1338 # system, and we'll never get to this point.
1340 case $basic_machine in
1341 *-acorn)
1342 os=-riscix1.2
1344 arm*-rebel)
1345 os=-linux
1347 arm*-semi)
1348 os=-aout
1350 c4x-* | tic4x-*)
1351 os=-coff
1353 # This must come before the *-dec entry.
1354 pdp10-*)
1355 os=-tops20
1357 pdp11-*)
1358 os=-none
1360 *-dec | vax-*)
1361 os=-ultrix4.2
1363 m68*-apollo)
1364 os=-domain
1366 i386-sun)
1367 os=-sunos4.0.2
1369 m68000-sun)
1370 os=-sunos3
1371 # This also exists in the configure program, but was not the
1372 # default.
1373 # os=-sunos4
1375 m68*-cisco)
1376 os=-aout
1378 mips*-cisco)
1379 os=-elf
1381 mips*-*)
1382 os=-elf
1384 or32-*)
1385 os=-coff
1387 *-tti) # must be before sparc entry or we get the wrong os.
1388 os=-sysv3
1390 sparc-* | *-sun)
1391 os=-sunos4.1.1
1393 *-be)
1394 os=-beos
1396 *-ibm)
1397 os=-aix
1399 *-knuth)
1400 os=-mmixware
1402 *-wec)
1403 os=-proelf
1405 *-winbond)
1406 os=-proelf
1408 *-oki)
1409 os=-proelf
1411 *-hp)
1412 os=-hpux
1414 *-hitachi)
1415 os=-hiux
1417 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1418 os=-sysv
1420 *-cbm)
1421 os=-amigaos
1423 *-dg)
1424 os=-dgux
1426 *-dolphin)
1427 os=-sysv3
1429 m68k-ccur)
1430 os=-rtu
1432 m88k-omron*)
1433 os=-luna
1435 *-next )
1436 os=-nextstep
1438 *-sequent)
1439 os=-ptx
1441 *-crds)
1442 os=-unos
1444 *-ns)
1445 os=-genix
1447 i370-*)
1448 os=-mvs
1450 *-next)
1451 os=-nextstep3
1453 *-gould)
1454 os=-sysv
1456 *-highlevel)
1457 os=-bsd
1459 *-encore)
1460 os=-bsd
1462 *-sgi)
1463 os=-irix
1465 *-siemens)
1466 os=-sysv4
1468 *-masscomp)
1469 os=-rtu
1471 f30[01]-fujitsu | f700-fujitsu)
1472 os=-uxpv
1474 *-rom68k)
1475 os=-coff
1477 *-*bug)
1478 os=-coff
1480 *-apple)
1481 os=-macos
1483 *-atari*)
1484 os=-mint
1487 os=-none
1489 esac
1492 # Here we handle the case where we know the os, and the CPU type, but not the
1493 # manufacturer. We pick the logical manufacturer.
1494 vendor=unknown
1495 case $basic_machine in
1496 *-unknown)
1497 case $os in
1498 -riscix*)
1499 vendor=acorn
1501 -sunos*)
1502 vendor=sun
1504 -aix*)
1505 vendor=ibm
1507 -beos*)
1508 vendor=be
1510 -hpux*)
1511 vendor=hp
1513 -mpeix*)
1514 vendor=hp
1516 -hiux*)
1517 vendor=hitachi
1519 -unos*)
1520 vendor=crds
1522 -dgux*)
1523 vendor=dg
1525 -luna*)
1526 vendor=omron
1528 -genix*)
1529 vendor=ns
1531 -mvs* | -opened*)
1532 vendor=ibm
1534 -os400*)
1535 vendor=ibm
1537 -ptx*)
1538 vendor=sequent
1540 -tpf*)
1541 vendor=ibm
1543 -vxsim* | -vxworks* | -windiss*)
1544 vendor=wrs
1546 -aux*)
1547 vendor=apple
1549 -hms*)
1550 vendor=hitachi
1552 -mpw* | -macos*)
1553 vendor=apple
1555 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1556 vendor=atari
1558 -vos*)
1559 vendor=stratus
1561 esac
1562 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1564 esac
1566 echo $basic_machine$os
1567 exit 0
1569 # Local variables:
1570 # eval: (add-hook 'write-file-hooks 'time-stamp)
1571 # time-stamp-start: "timestamp='"
1572 # time-stamp-format: "%:y-%02m-%02d"
1573 # time-stamp-end: "'"
1574 # End: