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, 2009, 2010,
5 # 2011, 2012, 2013 Free Software Foundation, Inc.
9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, see <http://www.gnu.org/licenses/>.
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that
26 # program. This Exception is an additional permission under section 7
27 # of the GNU General Public License, version 3 ("GPLv3").
30 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
32 # Configuration subroutine to validate and canonicalize a configuration type.
33 # Supply the specified configuration type as an argument.
34 # If it is invalid, we print an error message on stderr and exit with code 1.
35 # Otherwise, we print the canonical config type on stdout and succeed.
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
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
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,.*/,,'`
58 Usage: $0 [OPTION] CPU-MFR-OPSYS
61 Canonicalize a configuration name.
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>."
71 GNU config.sub ($timestamp)
73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
74 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
75 2012, 2013 Free Software Foundation, Inc.
77 This is free software; see the source for copying conditions. There is NO
78 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
81 Try \`$me --help' for more information."
84 while test $# -gt 0 ; do
86 --time-stamp |
--time* |
-t )
87 echo "$timestamp" ; exit ;;
89 echo "$version" ; exit ;;
91 echo "$usage"; exit ;;
92 -- ) # Stop option processing
94 - ) # Use stdin as input.
97 echo "$me: invalid option $1$help"
101 # First pass through any local machine types.
111 0) echo "$me: missing argument$help" >&2
114 *) echo "$me: too many arguments$help" >&2
118 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119 # Here we must recognize all the valid KERNEL-OS combinations.
120 maybe_os
=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122 nto-qnx
* | linux-gnu
* | linux-android
* | linux-dietlibc | linux-newlib
* | \
123 linux-musl
* | linux-uclibc
* | uclinux-uclibc
* | uclinux-gnu
* | kfreebsd
*-gnu* | \
124 knetbsd
*-gnu* | netbsd
*-gnu* | \
125 kopensolaris
*-gnu* | \
126 storm-chaos
* | os2-emx
* | rtmk-nova
*)
128 basic_machine
=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
132 basic_machine
=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
135 basic_machine
=`echo $1 | sed 's/-[^-]*$//'`
136 if [ $basic_machine != $1 ]
137 then os
=`echo $1 | sed 's/.*-/-/'`
142 ### Let's recognize common machines as not being operating systems so
143 ### that things like config.sub decstation-3100 work. We also
144 ### recognize some manufacturers as not being operating systems, so we
145 ### can provide default operating systems below.
148 # Prevent following clause from handling this invalid input.
150 -dec* |
-mips* |
-sequent* |
-encore* |
-pc532* |
-sgi* |
-sony* | \
151 -att* |
-7300* |
-3300* |
-delta* |
-motorola* |
-sun[234]* | \
152 -unicom* |
-ibm* |
-next |
-hp |
-isi* |
-apollo |
-altos* | \
153 -convergent* |
-ncr* |
-news |
-32* |
-3600* |
-3100* |
-hitachi* |\
154 -c[123]* |
-convex* |
-sun |
-crds |
-omron* |
-dg |
-ultra |
-tti* | \
155 -harris |
-dolphin |
-highlevel |
-gould |
-cbm |
-ns |
-masscomp | \
156 -apple |
-axis |
-knuth |
-cray |
-microblaze*)
163 -sim |
-cisco |
-oki |
-wec |
-winbond)
186 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 os
=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
198 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 # Don't forget version if it is 3.2v4 or newer.
202 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 # Don't forget version if it is 3.2v4 or newer.
206 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
217 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
220 basic_machine
=clipper-intergraph
223 basic_machine
=`echo $1 | sed -e 's/86-.*/86-pc/'`
235 basic_machine
=`echo $1 | sed -e 's/86-.*/86-sequent/'`
238 os
=`echo $os | sed -e 's/windowsnt/winnt/'`
244 basic_machine
=m68k-atari
249 # Decode aliases for certain CPU-COMPANY combinations.
250 case $basic_machine in
251 # Recognize the basic CPU types without company name.
252 # Some are omitted here because they have special meanings below.
255 | aarch64 | aarch64_be \
256 | alpha | alphaev
[4-8] | alphaev56 | alphaev6
[78] | alphapca5
[67] \
257 | alpha64 | alpha64ev
[4-8] | alpha64ev56 | alpha64ev6
[78] | alpha64pca5
[67] \
260 | arm | arm
[bl
]e | arme
[lb
] | armv
[2-8] | armv
[3-8][lb
] | armv7
[arm
] \
265 | d10v | d30v | dlx | dsp16xx \
266 | fido | fr30 | frv \
267 | h8300 | h8500 | hppa | hppa1.
[01] | hppa2.0 | hppa2.0
[nw
] | hppa64 \
268 | i370 | i860 | i960 | ia64 \
271 | m32c | m32r | m32rle | m68000 | m68k | m88k \
272 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
273 | mips | mipsbe | mipseb | mipsel | mipsle \
275 | mips64 | mips64el \
276 | mips64octeon | mips64octeonel \
277 | mips64orion | mips64orionel \
278 | mips64r5900 | mips64r5900el \
279 | mips64vr | mips64vrel \
280 | mips64vr4100 | mips64vr4100el \
281 | mips64vr4300 | mips64vr4300el \
282 | mips64vr5000 | mips64vr5000el \
283 | mips64vr5900 | mips64vr5900el \
284 | mipsisa32 | mipsisa32el \
285 | mipsisa32r2 | mipsisa32r2el \
286 | mipsisa64 | mipsisa64el \
287 | mipsisa64r2 | mipsisa64r2el \
288 | mipsisa64sb1 | mipsisa64sb1el \
289 | mipsisa64sr71k | mipsisa64sr71kel \
290 | mipsr5900 | mipsr5900el \
291 | mipstx39 | mipstx39el \
292 | mn10200 | mn10300 \
299 | pdp10 | pdp11 | pj | pjl \
300 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
304 | sh | sh
[1234] | sh
[24]a | sh
[24]aeb | sh
[23]e | sh
[34]eb | sheb | shbe | shle | sh
[1234]le | sh3ele \
306 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
307 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309 | tahoe | thumb | tic4x | tic80 | tron \
313 | x86 | xc16x | xscale | xscalee
[bl
] | xstormy16 | xtensa \
315 basic_machine
=$basic_machine-unknown
318 basic_machine
=tic54x-unknown
321 basic_machine
=tic55x-unknown
324 basic_machine
=tic6x-unknown
326 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip
)
327 basic_machine
=$basic_machine-unknown
330 m88110 | m680
[12346]0 | m683?
2 | m68360 | m5200 | v70 | w65 | z8k
)
333 basic_machine
=mt-unknown
336 strongarm | thumb | xscale
)
337 basic_machine
=arm-unknown
340 basic_machine
=$basic_machine-unknown
344 basic_machine
=armeb-unknown
348 basic_machine
=armel-unknown
351 # We use `pc' rather than `unknown'
352 # because (1) that's what they normally are, and
353 # (2) the word "unknown" tends to confuse beginning users.
355 basic_machine
=$basic_machine-pc
357 # Object if more than one company name word.
359 echo Invalid configuration \
`$1\': machine \`$basic_machine\' not recognized
1>&2
362 # Recognize the basic CPU types with company name.
365 | aarch64-
* | aarch64_be-
* \
366 | alpha-
* | alphaev
[4-8]-* | alphaev56-
* | alphaev6
[78]-* \
367 | alpha64-
* | alpha64ev
[4-8]-* | alpha64ev56-
* | alpha64ev6
[78]-* \
368 | alphapca5
[67]-* | alpha64pca5
[67]-* | arc-
* \
369 | arm-
* | armbe-
* | armle-
* | armeb-
* | armv
*-* \
371 | bfin-
* | bs2000-
* \
372 | c
[123]* | c30-
* |
[cjt
]90-* | c4x-
* | c54x-
* | c55x-
* | c6x-
* \
373 | clipper-
* | craynv-
* | cydra-
* \
374 | d10v-
* | d30v-
* | dlx-
* \
376 | f30
[01]-* | f700-
* | fido-
* | fr30-
* | frv-
* | fx80-
* \
377 | h8300-
* | h8500-
* \
378 | hppa-
* | hppa1.
[01]-* | hppa2.0
-* | hppa2.0
[nw
]-* | hppa64-
* \
379 | i
*86-* | i860-
* | i960-
* | ia64-
* \
380 | ip2k-
* | iq2000-
* \
382 | m32c-
* | m32r-
* | m32rle-
* \
383 | m68000-
* | m680
[012346]0-* | m68360-
* | m683?
2-* | m68k-
* \
384 | m88110-
* | m88k-
* | maxq-
* | mcore-
* | metag-
* \
385 | microblaze-
* | microblazeel-
* \
386 | mips-
* | mipsbe-
* | mipseb-
* | mipsel-
* | mipsle-
* \
388 | mips64-
* | mips64el-
* \
389 | mips64octeon-
* | mips64octeonel-
* \
390 | mips64orion-
* | mips64orionel-
* \
391 | mips64r5900-
* | mips64r5900el-
* \
392 | mips64vr-
* | mips64vrel-
* \
393 | mips64vr4100-
* | mips64vr4100el-
* \
394 | mips64vr4300-
* | mips64vr4300el-
* \
395 | mips64vr5000-
* | mips64vr5000el-
* \
396 | mips64vr5900-
* | mips64vr5900el-
* \
397 | mipsisa32-
* | mipsisa32el-
* \
398 | mipsisa32r2-
* | mipsisa32r2el-
* \
399 | mipsisa64-
* | mipsisa64el-
* \
400 | mipsisa64r2-
* | mipsisa64r2el-
* \
401 | mipsisa64sb1-
* | mipsisa64sb1el-
* \
402 | mipsisa64sr71k-
* | mipsisa64sr71kel-
* \
403 | mipsr5900-
* | mipsr5900el-
* \
404 | mipstx39-
* | mipstx39el-
* \
409 | none-
* | np1-
* | ns16k-
* | ns32k-
* \
411 | pdp10-
* | pdp11-
* | pj-
* | pjl-
* | pn-
* | power-
* \
412 | powerpc-
* | powerpc64-
* | powerpc64le-
* | powerpcle-
* | ppcbe-
* \
414 | romp-
* | rs6000-
* | rx-
* \
415 | sh-
* | sh
[1234]-* | sh
[24]a-
* | sh
[24]aeb-
* | sh
[23]e-
* | sh
[34]eb-
* | sheb-
* | shbe-
* \
416 | shle-
* | sh
[1234]le-
* | sh3ele-
* | sh64-
* | sh64le-
* \
417 | sparc-
* | sparc64-
* | sparc64b-
* | sparc64v-
* | sparc86x-
* | sparclet-
* \
419 | sparcv8-
* | sparcv9-
* | sparcv9b-
* | sparcv9v-
* | strongarm-
* | sv1-
* | sx?
-* \
420 | tahoe-
* | thumb-
* \
421 | tic30-
* | tic4x-
* | tic54x-
* | tic55x-
* | tic6x-
* | tic80-
* | tile-
* \
424 | v850-
* | v850e-
* | vax-
* \
426 | x86-
* | x86_64-
* | xc16x-
* | xps100-
* | xscale-
* | xscalee
[bl
]-* \
427 | xstormy16-
* | xtensa
*-* \
431 # Recognize the basic CPU types without company name, with glob match.
433 basic_machine
=$basic_machine-unknown
435 # Recognize the various machine names and aliases which stand
436 # for a CPU type and a company and sometimes even an OS.
438 basic_machine
=i386-unknown
441 3b1 |
7300 |
7300-att | att-7300 | pc7300 | safari | unixpc
)
442 basic_machine
=m68000-att
445 basic_machine
=we32k-att
448 basic_machine
=a29k-amd
452 basic_machine
=abacus-unknown
455 basic_machine
=m68010-adobe
459 basic_machine
=fx80-alliant
462 basic_machine
=m68k-altos
465 basic_machine
=a29k-none
469 basic_machine
=x86_64-pc
472 basic_machine
=x86_64-
`echo $basic_machine | sed 's/^[^-]*-//'`
475 basic_machine
=580-amdahl
479 basic_machine
=m68k-unknown
482 basic_machine
=m68k-unknown
486 basic_machine
=m68k-unknown
490 basic_machine
=m68k-apollo
494 basic_machine
=m68k-apollo
498 basic_machine
=i386-pc
502 basic_machine
=m68k-apple
506 basic_machine
=ns32k-sequent
510 basic_machine
=bfin-unknown
514 basic_machine
=bfin-
`echo $basic_machine | sed 's/^[^-]*-//'`
518 basic_machine
=powerpc-ibm
522 basic_machine
=c90-cray
526 basic_machine
=arm-unknown
530 basic_machine
=c1-convex
534 basic_machine
=c2-convex
538 basic_machine
=c32-convex
542 basic_machine
=c34-convex
546 basic_machine
=c38-convex
550 basic_machine
=j90-cray
554 basic_machine
=craynv-cray
558 basic_machine
=cr16-unknown
562 basic_machine
=m68k-crds
564 crisv32 | crisv32-
* | etraxfs
*)
565 basic_machine
=crisv32-axis
567 cris | cris-
* | etrax
*)
568 basic_machine
=cris-axis
571 basic_machine
=crx-unknown
575 basic_machine
=m68k-da30
577 decstation | decstation-3100 | pmax | pmax-
* | pmin | dec3100 | decstatn
)
578 basic_machine
=mips-dec
580 decsystem10
* | dec10
*)
581 basic_machine
=pdp10-dec
584 decsystem20
* | dec20
*)
585 basic_machine
=pdp10-dec
588 delta |
3300 | motorola-3300 | motorola-delta \
589 |
3300-motorola | delta-motorola
)
590 basic_machine
=m68k-motorola
593 basic_machine
=m88k-motorola
597 basic_machine
=i686-pc
601 basic_machine
=i586-pc
605 basic_machine
=rs6000-bull
609 basic_machine
=m68k-bull
613 basic_machine
=a29k-amd
617 basic_machine
=elxsi-elxsi
620 encore | umax | mmax
)
621 basic_machine
=ns32k-encore
623 es1800 | OSE68k | ose68k | ose | OSE
)
624 basic_machine
=m68k-ericsson
628 basic_machine
=i860-alliant
631 basic_machine
=ns32k-ns
634 basic_machine
=tron-gmicro
638 basic_machine
=i386-pc
642 basic_machine
=hppa1.1
-hitachi
646 basic_machine
=h8300-hitachi
650 basic_machine
=h8300-hitachi
654 basic_machine
=h8500-hitachi
658 basic_machine
=m88k-harris
662 basic_machine
=m68k-hp
665 basic_machine
=m68k-hp
669 basic_machine
=m68k-hp
672 hp3k9
[0-9][0-9] | hp9
[0-9][0-9])
673 basic_machine
=hppa1.0
-hp
675 hp9k2
[0-9][0-9] | hp9k31
[0-9])
676 basic_machine
=m68000-hp
679 basic_machine
=m68k-hp
681 hp9k6
[0-9][0-9] | hp6
[0-9][0-9])
682 basic_machine
=hppa1.0
-hp
684 hp9k7
[0-79][0-9] | hp7
[0-79][0-9])
685 basic_machine
=hppa1.1
-hp
687 hp9k78
[0-9] | hp78
[0-9])
688 # FIXME: really hppa2.0-hp
689 basic_machine
=hppa1.1
-hp
691 hp9k8
[67]1 | hp8
[67]1 | hp9k80
[24] | hp80
[24] | hp9k8
[78]9 | hp8
[78]9 | hp9k893 | hp893
)
692 # FIXME: really hppa2.0-hp
693 basic_machine
=hppa1.1
-hp
695 hp9k8
[0-9][13679] | hp8
[0-9][13679])
696 basic_machine
=hppa1.1
-hp
698 hp9k8
[0-9][0-9] | hp8
[0-9][0-9])
699 basic_machine
=hppa1.0
-hp
705 basic_machine
=hppa1.1
-hp
709 basic_machine
=hppa1.1
-hp
713 basic_machine
=i370-ibm
716 basic_machine
=`echo $1 | sed -e 's/86.*/86-pc/'`
720 basic_machine
=`echo $1 | sed -e 's/86.*/86-pc/'`
724 basic_machine
=`echo $1 | sed -e 's/86.*/86-pc/'`
728 basic_machine
=`echo $1 | sed -e 's/86.*/86-pc/'`
732 basic_machine
=i386-mach
736 basic_machine
=i386-unknown
740 basic_machine
=mips-sgi
750 basic_machine
=m68k-isi
754 basic_machine
=m68k-unknown
758 basic_machine
=m68k-
`echo $basic_machine | sed 's/^[^-]*-//'`
762 basic_machine
=m88k-omron
765 basic_machine
=mips-mips
769 basic_machine
=ns32k-utek
773 basic_machine
=microblaze-xilinx
776 basic_machine
=x86_64-pc
780 basic_machine
=i386-pc
784 basic_machine
=arm-unknown
788 basic_machine
=m68000-convergent
790 *mint |
-mint[0-9]* |
*MiNT |
*MiNT
[0-9]*)
791 basic_machine
=m68k-atari
795 basic_machine
=`echo $basic_machine | sed -e 's/mips3/mips64/'`
798 basic_machine
=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
801 basic_machine
=m68k-rom68k
805 basic_machine
=powerpc-unknown
809 basic_machine
=i386-pc
813 basic_machine
=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
816 basic_machine
=i386-pc
820 basic_machine
=i370-ibm
824 basic_machine
=i486-ncr
828 basic_machine
=i386-unknown
832 basic_machine
=armv4l-rebel
835 news | news700 | news800 | news900
)
836 basic_machine
=m68k-sony
840 basic_machine
=m68030-sony
843 news-3600 | risc-news
)
844 basic_machine
=mips-sony
848 basic_machine
=v70-nec
852 basic_machine
=m68k-next
865 basic_machine
=m68k-harris
869 basic_machine
=m88k-harris
873 basic_machine
=i960-intel
877 basic_machine
=i960-intel
881 basic_machine
=mips-compaq
885 basic_machine
=np1-gould
888 basic_machine
=nsr-tandem
891 basic_machine
=hppa1.1
-oki
894 openrisc | openrisc-
*)
895 basic_machine
=or32-unknown
898 basic_machine
=powerpc-ibm
902 basic_machine
=m68000-ericsson
906 basic_machine
=m68k-none
910 basic_machine
=hppa1.1
-hitachi
914 basic_machine
=i860-intel
918 basic_machine
=hppa-unknown
922 basic_machine
=hppa-
`echo $basic_machine | sed 's/^[^-]*-//'`
926 basic_machine
=sparc-tti
929 basic_machine
=m68k-tti
932 basic_machine
=ns32k-pc532
935 basic_machine
=i386-pc
938 basic_machine
=i386-
`echo $basic_machine | sed 's/^[^-]*-//'`
940 pentium | p5 | k5 | k6 | nexgen | viac3
)
941 basic_machine
=i586-pc
943 pentiumpro | p6 |
6x86 | athlon | athlon_
*)
944 basic_machine
=i686-pc
946 pentiumii | pentium2 | pentiumiii | pentium3
)
947 basic_machine
=i686-pc
950 basic_machine
=i786-pc
952 pentium-
* | p5-
* | k5-
* | k6-
* | nexgen-
* | viac3-
*)
953 basic_machine
=i586-
`echo $basic_machine | sed 's/^[^-]*-//'`
955 pentiumpro-
* | p6-
* |
6x86-
* | athlon-
*)
956 basic_machine
=i686-
`echo $basic_machine | sed 's/^[^-]*-//'`
958 pentiumii-
* | pentium2-
* | pentiumiii-
* | pentium3-
*)
959 basic_machine
=i686-
`echo $basic_machine | sed 's/^[^-]*-//'`
962 basic_machine
=i786-
`echo $basic_machine | sed 's/^[^-]*-//'`
965 basic_machine
=pn-gould
967 power
) basic_machine
=power-ibm
969 ppc
) basic_machine
=powerpc-unknown
971 ppc-
*) basic_machine
=powerpc-
`echo $basic_machine | sed 's/^[^-]*-//'`
973 ppcle | powerpclittle | ppc-le | powerpc-little
)
974 basic_machine
=powerpcle-unknown
976 ppcle-
* | powerpclittle-
*)
977 basic_machine
=powerpcle-
`echo $basic_machine | sed 's/^[^-]*-//'`
979 ppc64
) basic_machine
=powerpc64-unknown
981 ppc64-
*) basic_machine
=powerpc64-
`echo $basic_machine | sed 's/^[^-]*-//'`
983 ppc64le | powerpc64little | ppc64-le | powerpc64-little
)
984 basic_machine
=powerpc64le-unknown
986 ppc64le-
* | powerpc64little-
*)
987 basic_machine
=powerpc64le-
`echo $basic_machine | sed 's/^[^-]*-//'`
990 basic_machine
=i386-ibm
993 basic_machine
=i586-unknown
997 basic_machine
=x86_64-pc
1001 basic_machine
=i386-pc
1005 basic_machine
=m68k-rom68k
1009 basic_machine
=mips-siemens
1012 basic_machine
=romp-ibm
1015 basic_machine
=s390-ibm
1018 basic_machine
=s390x-ibm
1021 basic_machine
=a29k-amd
1025 basic_machine
=mipsisa64sb1-unknown
1028 basic_machine
=mipsisa64sb1el-unknown
1031 basic_machine
=mipsisa32-sde
1035 basic_machine
=mips-sei
1039 basic_machine
=i386-sequent
1042 basic_machine
=sh-hitachi
1046 basic_machine
=sh5le-unknown
1049 basic_machine
=sh64-unknown
1051 sparclite-wrs | simso-wrs
)
1052 basic_machine
=sparclite-wrs
1056 basic_machine
=m68k-bull
1060 basic_machine
=spur-unknown
1063 basic_machine
=m68k-tandem
1066 basic_machine
=i860-stratus
1070 basic_machine
=m68000-sun
1073 basic_machine
=m68000-sun
1077 basic_machine
=m68000-sun
1081 basic_machine
=m68k-sun
1085 basic_machine
=m68k-sun
1089 basic_machine
=sparc-sun
1093 basic_machine
=sparc-sun
1097 basic_machine
=sparc-sun
1101 basic_machine
=m68k-sun
1104 basic_machine
=sparc-sun
1106 sun386 | sun386i | roadrunner
)
1107 basic_machine
=i386-sun
1110 basic_machine
=sv1-cray
1114 basic_machine
=i386-sequent
1118 basic_machine
=alphaev5-cray
1122 basic_machine
=t90-cray
1126 basic_machine
=tic54x-unknown
1130 basic_machine
=tic55x-unknown
1134 basic_machine
=tic6x-unknown
1138 basic_machine
=tile-unknown
1142 basic_machine
=mipstx39-unknown
1145 basic_machine
=mipstx39el-unknown
1148 basic_machine
=pdp10-xkl
1152 basic_machine
=m68k-ncr
1155 basic_machine
=s390x-ibm
1159 basic_machine
=a29k-amd
1163 basic_machine
=a29k-nyu
1167 basic_machine
=v810-nec
1171 basic_machine
=vax-dec
1175 basic_machine
=vax-dec
1179 basic_machine
=f301-fujitsu
1182 basic_machine
=i960-wrs
1186 basic_machine
=m68k-wrs
1190 basic_machine
=a29k-wrs
1194 basic_machine
=w65-wdc
1198 basic_machine
=hppa1.1
-winbond
1202 basic_machine
=i686-pc
1206 basic_machine
=xps100-honeywell
1209 basic_machine
=ymp-cray
1213 basic_machine
=z8k-unknown
1217 basic_machine
=z80-unknown
1221 basic_machine
=none-none
1225 # Here we handle the default manufacturer of certain CPU types. It is in
1226 # some cases the only manufacturer, in others, it is the most popular.
1228 basic_machine
=hppa1.1
-winbond
1231 basic_machine
=hppa1.1
-oki
1234 basic_machine
=hppa1.1
-oki
1237 basic_machine
=romp-ibm
1240 basic_machine
=mmix-knuth
1243 basic_machine
=rs6000-ibm
1246 basic_machine
=vax-dec
1249 # there are many clones, so DEC is not a safe bet
1250 basic_machine
=pdp10-unknown
1253 basic_machine
=pdp11-dec
1256 basic_machine
=we32k-att
1258 sh
[1234] | sh
[24]a | sh
[24]aeb | sh
[34]eb | sh
[1234]le | sh
[23]ele
)
1259 basic_machine
=sh-unknown
1261 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v
)
1262 basic_machine
=sparc-sun
1265 basic_machine
=cydra-cydrome
1268 basic_machine
=orion-highlevel
1271 basic_machine
=clipper-highlevel
1273 mac | mpw | mac-mpw
)
1274 basic_machine
=m68k-apple
1277 basic_machine
=powerpc-apple
1280 # Make sure to match an already-canonicalized machine name.
1283 echo Invalid configuration \
`$1\': machine \`$basic_machine\' not recognized
1>&2
1288 # Here we canonicalize certain aliases for manufacturers.
1289 case $basic_machine in
1291 basic_machine
=`echo $basic_machine | sed 's/digital.*/dec/'`
1294 basic_machine
=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1300 # Decode manufacturer-specific aliases for certain operating systems.
1302 if [ x
"$os" != x
"" ]
1305 # First match some system type aliases
1306 # that might get confused with valid system types.
1307 # -solaris* is a basic system type, with this one exception.
1311 -solaris1 |
-solaris1.
*)
1312 os
=`echo $os | sed -e 's|solaris1|sunos4|'`
1324 os
=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1326 # First accept the basic system types.
1327 # The portable systems comes first.
1328 # Each alternative MUST END IN A *, to match a version number.
1329 # -sysv* is not here because it comes later, after sysvr4.
1330 -gnu* |
-bsd* |
-mach* |
-minix* |
-genix* |
-ultrix* |
-irix* \
1331 |
-*vms
* |
-sco* |
-esix* |
-isc* |
-aix* |
-cnk* |
-sunos |
-sunos[34]*\
1332 |
-hpux* |
-unos* |
-osf* |
-luna* |
-dgux* |
-auroraux* |
-solaris* \
1333 |
-sym* |
-kopensolaris* |
-plan9* \
1334 |
-amigaos* |
-amigados* |
-msdos* |
-newsos* |
-unicos* |
-aof* \
1336 |
-nindy* |
-vxsim* |
-vxworks* |
-ebmon* |
-hms* |
-mvs* \
1337 |
-clix* |
-riscos* |
-uniplus* |
-iris* |
-rtu* |
-xenix* \
1338 |
-hiux* |
-386bsd* |
-knetbsd* |
-mirbsd* |
-netbsd* \
1339 |
-bitrig* |
-openbsd* |
-solidbsd* \
1340 |
-ekkobsd* |
-kfreebsd* |
-freebsd* |
-riscix* |
-lynxos* \
1341 |
-bosx* |
-nextstep* |
-cxux* |
-aout* |
-elf* |
-oabi* \
1342 |
-ptx* |
-coff* |
-ecoff* |
-winnt* |
-domain* |
-vsta* \
1343 |
-udi* |
-eabi* |
-lites* |
-ieee* |
-go32* |
-aux* \
1344 |
-chorusos* |
-chorusrdb* |
-cegcc* \
1345 |
-cygwin* |
-msys* |
-pe* |
-psos* |
-moss* |
-proelf* |
-rtems* \
1346 |
-mingw32* |
-mingw64* |
-linux-gnu* |
-linux-android* \
1347 |
-linux-newlib* |
-linux-musl* |
-linux-uclibc* \
1348 |
-uxpv* |
-beos* |
-mpeix* |
-udk* \
1349 |
-interix* |
-uwin* |
-mks* |
-rhapsody* |
-darwin* |
-opened* \
1350 |
-openstep* |
-oskit* |
-conix* |
-pw32* |
-nonstopux* \
1351 |
-storm-chaos* |
-tops10* |
-tenex* |
-tops20* |
-its* \
1352 |
-os2* |
-vos* |
-palmos* |
-uclinux* |
-nucleus* \
1353 |
-morphos* |
-superux* |
-rtmk* |
-rtmk-nova* |
-windiss* \
1354 |
-powermax* |
-dnix* |
-nx6 |
-nx7 |
-sei* |
-dragonfly* \
1355 |
-skyos* |
-haiku* |
-rdos* |
-toppers* |
-drops* |
-es*)
1356 # Remember, each alternative MUST END IN *, to match a version number.
1359 case $basic_machine in
1370 os
=`echo $os | sed -e 's|nto|nto-qnx|'`
1372 -sim |
-es1800* |
-hms* |
-xray |
-os68k* |
-none* |
-v88r* \
1373 |
-windows* |
-osx |
-abug |
-netware* |
-os9* |
-beos* |
-haiku* \
1374 |
-macos* |
-mpw* |
-magic* |
-mmixware* |
-mon960* |
-lnews*)
1377 os
=`echo $os | sed -e 's|mac|macos|'`
1383 os
=`echo $os | sed -e 's|linux|linux-gnu|'`
1386 os
=`echo $os | sed -e 's|sunos5|solaris2|'`
1389 os
=`echo $os | sed -e 's|sunos6|solaris3|'`
1436 # Preserve the version number of sinix5.
1438 os
=`echo $os | sed -e 's|sinix|sysv|'`
1461 # This must come after -sysvr4.
1473 -*mint |
-mint[0-9]* |
-*MiNT |
-MiNT[0-9]*)
1488 # Get rid of the `-' at the beginning of $os.
1489 os
=`echo $os | sed 's/[^-]*-//'`
1490 echo Invalid configuration \
`$1\': system \`$os\' not recognized
1>&2
1496 # Here we handle the default operating systems that come with various machines.
1497 # The value should be what the vendor currently ships out the door with their
1498 # machine or put another way, the most popular os provided with the machine.
1500 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1501 # "-sun"), then you have to tell the case statement up towards the top
1502 # that MANUFACTURER isn't an operating system. Otherwise, code above
1503 # will signal an error saying that MANUFACTURER isn't an operating
1504 # system, and we'll never get to this point.
1506 case $basic_machine in
1537 # This must come before the *-dec entry.
1571 *-tti) # must be before sparc entry or we get the wrong os.
1604 i860-
* |
*-att |
*-ncr |
*-altos |
*-motorola |
*-convergent)
1658 f30
[01]-fujitsu | f700-fujitsu
)
1679 # Here we handle the case where we know the os, and the CPU type, but not the
1680 # manufacturer. We pick the logical manufacturer.
1682 case $basic_machine in
1730 -vxsim* |
-vxworks* |
-windiss*)
1742 -*mint |
-mint[0-9]* |
-*MiNT |
-MiNT[0-9]*)
1749 basic_machine
=`echo $basic_machine | sed "s/unknown/$vendor/"`
1753 echo $basic_machine$os
1757 # eval: (add-hook 'write-file-hooks 'time-stamp)
1758 # time-stamp-start: "timestamp='"
1759 # time-stamp-format: "%:y-%02m-%02d"
1760 # time-stamp-end: "'"