2 # Configuration validation subroutine script.
3 # Copyright 1992-2018 Free Software Foundation, Inc.
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <https://www.gnu.org/licenses/>.
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that
24 # program. This Exception is an additional permission under section 7
25 # of the GNU General Public License, version 3 ("GPLv3").
28 # Please send patches to <config-patches@gnu.org>.
30 # Configuration subroutine to validate and canonicalize a configuration type.
31 # Supply the specified configuration type as an argument.
32 # If it is invalid, we print an error message on stderr and exit with code 1.
33 # Otherwise, we print the canonical config type on stdout and succeed.
35 # You can get the latest version of this script from:
36 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
38 # This file is supposed to be the same for all GNU packages
39 # and recognize all the CPU types, system types and aliases
40 # that are meaningful with *any* GNU software.
41 # Each package is responsible for reporting which valid configurations
42 # it does not support. The user should be able to distinguish
43 # a failure to support a valid configuration from a meaningless
46 # The goal of this file is to map all the various variations of a given
47 # machine specification into a single specification in the form:
48 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49 # or in some cases, the newer four-part form:
50 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51 # It is wrong to echo any other type of specification.
53 me
=`echo "$0" | sed -e 's,.*/,,'`
56 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
58 Canonicalize a configuration name.
61 -h, --help print this help, then exit
62 -t, --time-stamp print date of last modification, then exit
63 -v, --version print version number, then exit
65 Report bugs and patches to <config-patches@gnu.org>."
68 GNU config.sub ($timestamp)
70 Copyright 1992-2018 Free Software Foundation, Inc.
72 This is free software; see the source for copying conditions. There is NO
73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
76 Try \`$me --help' for more information."
79 while test $# -gt 0 ; do
81 --time-stamp |
--time* |
-t )
82 echo "$timestamp" ; exit ;;
84 echo "$version" ; exit ;;
86 echo "$usage"; exit ;;
87 -- ) # Stop option processing
89 - ) # Use stdin as input.
92 echo "$me: invalid option $1$help"
96 # First pass through any local machine types.
106 0) echo "$me: missing argument$help" >&2
109 *) echo "$me: too many arguments$help" >&2
113 # Split fields of configuration type
114 IFS
="-" read -r field1 field2 field3 field4
<<EOF
118 # Separate into logical components for further validation
121 echo Invalid configuration \
`"$1"\': more than four components >&2
125 basic_machine=$field1-$field2
129 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
131 maybe_os=$field2-$field3
133 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
134 | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
135 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
136 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
137 | storm-chaos* | os2-emx* | rtmk-nova*)
138 basic_machine=$field1
142 basic_machine=$field1-unknown
146 basic_machine=$field1-$field2
152 basic_machine=$field1
156 # Convert single-component short-hands not valid as part of
157 # multi-component configurations.
160 basic_machine=i386-pc
164 basic_machine=a29k-amd
168 basic_machine=m68010-adobe
172 basic_machine=a29k-none
176 basic_machine=580-amdahl
180 basic_machine=m68k-unknown
184 basic_machine=m68k-unknown
188 basic_machine=m68k-apollo
192 basic_machine=m68k-apollo
196 basic_machine=i386-pc
200 basic_machine=m68k-apple
204 basic_machine=ns32k-sequent
208 basic_machine=bfin-unknown
212 basic_machine=arm-unknown
216 basic_machine=j90-cray
220 basic_machine=craynv-cray
224 basic_machine=m88k-motorola
228 basic_machine=i686-pc
232 basic_machine=i586-pc
236 basic_machine=a29k-amd
239 es1800 | OSE68k | ose68k | ose | OSE)
240 basic_machine=m68k-ericsson
244 basic_machine=tron-gmicro
248 basic_machine=i386-pc
252 basic_machine=h8300-hitachi
256 basic_machine=h8300-hitachi
260 basic_machine=h8500-hitachi
264 basic_machine=m88k-harris
268 basic_machine=m68k-hp
272 basic_machine=m68k-hp
276 basic_machine=hppa1.1-hp
280 basic_machine=hppa1.1-hp
284 basic_machine=i386-mach
288 basic_machine=i386-unknown
292 basic_machine=m68k-isi
296 basic_machine=m68k-unknown
300 basic_machine=mips-mips
304 basic_machine=ns32k-utek
308 basic_machine=x86_64-pc
312 basic_machine=i686-pc
316 basic_machine=arm-unknown
320 basic_machine=m68k-rom68k
324 basic_machine=powerpc-unknown
328 basic_machine=moxie-unknown
332 basic_machine=i386-pc
336 basic_machine=i686-pc
340 basic_machine=i370-ibm
344 basic_machine=le32-unknown
348 basic_machine=i486-ncr
352 basic_machine=i386-unknown
356 basic_machine=armv4l-rebel
359 news | news700 | news800 | news900)
360 basic_machine=m68k-sony
364 basic_machine=m68030-sony
368 basic_machine=v70-nec
372 basic_machine=m68k-harris
376 basic_machine=m88k-harris
380 basic_machine=i960-intel
384 basic_machine=i960-intel
388 basic_machine=mips-compaq
392 basic_machine=powerpc-ibm
396 basic_machine=m68000-ericsson
400 basic_machine=m68k-none
404 basic_machine=i860-intel
408 basic_machine=hppa-unknown
412 basic_machine=i586-unknown
416 basic_machine=x86_64-pc
420 basic_machine=i386-pc
424 basic_machine=m68k-rom68k
428 basic_machine=a29k-amd
432 basic_machine=mips-sei
436 basic_machine=m68k-bull
440 basic_machine=i860-stratus
444 basic_machine=m68000-sun
448 basic_machine=m68000-sun
452 basic_machine=m68k-sun
456 basic_machine=m68k-sun
460 basic_machine=sparc-sun
464 basic_machine=sparc-sun
468 basic_machine=sparc-sun
472 basic_machine=sv1-cray
476 basic_machine=i386-sequent
480 basic_machine=alphaev5-cray
484 basic_machine=t90-cray
488 basic_machine=pdp10-xkl
492 basic_machine=s390x-ibm
496 basic_machine=a29k-amd
500 basic_machine=a29k-nyu
504 basic_machine=v810-nec
508 basic_machine=vax-dec
512 basic_machine=vax-dec
516 basic_machine=i960-wrs
520 basic_machine=m68k-wrs
524 basic_machine=a29k-wrs
528 basic_machine=i686-pc
532 basic_machine=ymp-cray
543 ### Let's recognize common machines as not being operating systems so
544 ### that things like config.sub decstation-3100 work. We also
545 ### recognize some manufacturers as not being operating systems, so we
546 ### can provide default operating systems below.
549 # Prevent following clause from handling this invalid input.
551 dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* | \
552 att* | 7300* | 3300* | delta* | motorola* | sun[234]* | \
553 unicom* | ibm* | next | hp | isi* | apollo | altos* | \
554 convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* |\
555 c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* | \
556 harris | dolphin | highlevel | gould | cbm | ns | masscomp | \
557 apple | axis | knuth | cray | microblaze*)
564 sim | cisco | oki | wec | winbond)
587 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
591 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
595 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
598 os=`echo $os |
sed -e 's/sco3.2./sco3.2v/'`
599 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
602 # Don't forget version if it is 3.2v4 or newer.
603 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
606 # Don't forget version if it is 3.2v4 or newer.
607 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
611 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
614 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
618 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
621 basic_machine=clipper-intergraph
624 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-pc/'`
636 basic_machine=`echo "$1" |
sed -e 's/86-.*/86-sequent/'`
642 basic_machine=m68k-atari
647 # Decode aliases for certain CPU-COMPANY combinations.
648 case $basic_machine in
649 # Recognize the basic CPU types without company name.
650 # Some are omitted here because they have special meanings below.
653 | aarch64 | aarch64_be \
654 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
655 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
658 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
663 | c4x | c8051 | clipper | csky \
664 | d10v | d30v | dlx | dsp16xx \
666 | fido | fr30 | frv | ft32 \
667 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
669 | i370 | i860 | i960 | ia16 | ia64 \
674 | m32c | m32r | m32rle | m68000 | m68k | m88k \
675 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
676 | mips | mipsbe | mipseb | mipsel | mipsle \
678 | mips64 | mips64el \
679 | mips64octeon | mips64octeonel \
680 | mips64orion | mips64orionel \
681 | mips64r5900 | mips64r5900el \
682 | mips64vr | mips64vrel \
683 | mips64vr4100 | mips64vr4100el \
684 | mips64vr4300 | mips64vr4300el \
685 | mips64vr5000 | mips64vr5000el \
686 | mips64vr5900 | mips64vr5900el \
687 | mipsisa32 | mipsisa32el \
688 | mipsisa32r2 | mipsisa32r2el \
689 | mipsisa32r6 | mipsisa32r6el \
690 | mipsisa64 | mipsisa64el \
691 | mipsisa64r2 | mipsisa64r2el \
692 | mipsisa64r6 | mipsisa64r6el \
693 | mipsisa64sb1 | mipsisa64sb1el \
694 | mipsisa64sr71k | mipsisa64sr71kel \
695 | mipsr5900 | mipsr5900el \
696 | mipstx39 | mipstx39el \
697 | mn10200 | mn10300 \
701 | nds32 | nds32le | nds32be \
703 | nios | nios2 | nios2eb | nios2el \
705 | open8 | or1k | or1knd | or32 \
707 | powerpc | powerpc64 | powerpc64le | powerpcle \
710 | riscv32 | riscv64 \
713 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
715 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
716 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
718 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
720 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
723 | x86 | xc16x | xstormy16 | xtensa \
725 basic_machine=$basic_machine-unknown
728 basic_machine=tic54x-unknown
731 basic_machine=tic55x-unknown
734 basic_machine=tic6x-unknown
737 basic_machine=sparc-$basic_machine
739 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
740 basic_machine=$basic_machine-unknown
743 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
745 m9s12z | m68hcs12z | hcs12z | s12z)
746 basic_machine=s12z-unknown
750 basic_machine=mt-unknown
752 strongarm | thumb | xscale)
753 basic_machine=arm-unknown
756 basic_machine=$basic_machine-unknown
760 basic_machine=armeb-unknown
764 basic_machine=armel-unknown
767 # We use `pc
' rather than `unknown'
768 # because (1) that's what they normally are, and
769 # (2) the word "unknown" tends to confuse beginning users.
771 basic_machine
=$basic_machine-pc
773 # Recognize the basic CPU types with company name.
776 | aarch64-
* | aarch64_be-
* \
777 | alpha-
* | alphaev
[4-8]-* | alphaev56-
* | alphaev6
[78]-* \
778 | alpha64-
* | alpha64ev
[4-8]-* | alpha64ev56-
* | alpha64ev6
[78]-* \
779 | alphapca5
[67]-* | alpha64pca5
[67]-* | arc-
* | arceb-
* \
780 | arm-
* | armbe-
* | armle-
* | armeb-
* | armv
*-* \
784 | bfin-
* | bs2000-
* \
785 | c
[123]* | c30-
* |
[cjt
]90-* | c4x-
* \
786 | c8051-
* | clipper-
* | craynv-
* | csky-
* | cydra-
* \
787 | d10v-
* | d30v-
* | dlx-
* \
789 | f30
[01]-* | f700-
* | fido-
* | fr30-
* | frv-
* | fx80-
* \
790 | h8300-
* | h8500-
* \
791 | hppa-
* | hppa1.
[01]-* | hppa2.0
-* | hppa2.0
[nw
]-* | hppa64-
* \
793 | i
*86-* | i860-
* | i960-
* | ia16-
* | ia64-
* \
794 | ip2k-
* | iq2000-
* \
798 | m32c-
* | m32r-
* | m32rle-
* \
799 | m68000-
* | m680
[012346]0-* | m68360-
* | m683?
2-* | m68k-
* \
800 | m88110-
* | m88k-
* | maxq-
* | mcore-
* | metag-
* \
801 | microblaze-
* | microblazeel-
* \
802 | mips-
* | mipsbe-
* | mipseb-
* | mipsel-
* | mipsle-
* \
804 | mips64-
* | mips64el-
* \
805 | mips64octeon-
* | mips64octeonel-
* \
806 | mips64orion-
* | mips64orionel-
* \
807 | mips64r5900-
* | mips64r5900el-
* \
808 | mips64vr-
* | mips64vrel-
* \
809 | mips64vr4100-
* | mips64vr4100el-
* \
810 | mips64vr4300-
* | mips64vr4300el-
* \
811 | mips64vr5000-
* | mips64vr5000el-
* \
812 | mips64vr5900-
* | mips64vr5900el-
* \
813 | mipsisa32-
* | mipsisa32el-
* \
814 | mipsisa32r2-
* | mipsisa32r2el-
* \
815 | mipsisa32r6-
* | mipsisa32r6el-
* \
816 | mipsisa64-
* | mipsisa64el-
* \
817 | mipsisa64r2-
* | mipsisa64r2el-
* \
818 | mipsisa64r6-
* | mipsisa64r6el-
* \
819 | mipsisa64sb1-
* | mipsisa64sb1el-
* \
820 | mipsisa64sr71k-
* | mipsisa64sr71kel-
* \
821 | mipsr5900-
* | mipsr5900el-
* \
822 | mipstx39-
* | mipstx39el-
* \
826 | nds32-
* | nds32le-
* | nds32be-
* \
828 | nios-
* | nios2-
* | nios2eb-
* | nios2el-
* \
829 | none-
* | np1-
* | ns16k-
* | ns32k-
* \
833 | pdp10-
* | pdp11-
* | pj-
* | pjl-
* | pn-
* | power-
* \
834 | powerpc-
* | powerpc64-
* | powerpc64le-
* | powerpcle-
* \
837 | riscv32-
* | riscv64-
* \
838 | rl78-
* | romp-
* | rs6000-
* | rx-
* \
839 | sh-
* | sh
[1234]-* | sh
[24]a-
* | sh
[24]aeb-
* | sh
[23]e-
* | sh
[34]eb-
* | sheb-
* | shbe-
* \
840 | shle-
* | sh
[1234]le-
* | sh3ele-
* | sh64-
* | sh64le-
* \
841 | sparc-
* | sparc64-
* | sparc64b-
* | sparc64v-
* | sparc86x-
* | sparclet-
* \
843 | sparcv8-
* | sparcv9-
* | sparcv9b-
* | sparcv9v-
* | sv1-
* | sx
*-* \
845 | tic30-
* | tic4x-
* | tic54x-
* | tic55x-
* | tic6x-
* | tic80-
* \
849 | v850-
* | v850e-
* | v850e1-
* | v850es-
* | v850e2-
* | v850e2v3-
* \
854 | x86-
* | x86_64-
* | xc16x-
* | xps100-
* \
855 | xstormy16-
* | xtensa
*-* \
859 # Recognize the basic CPU types without company name, with glob match.
861 basic_machine
=$basic_machine-unknown
863 # Recognize the various machine names and aliases which stand
864 # for a CPU type and a company and sometimes even an OS.
865 3b1 |
7300 |
7300-att | att-7300 | pc7300 | safari | unixpc
)
866 basic_machine
=m68000-att
869 basic_machine
=we32k-att
872 basic_machine
=abacus-unknown
875 basic_machine
=fx80-alliant
878 basic_machine
=m68k-altos
881 basic_machine
=x86_64-pc
884 basic_machine
=x86_64-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
887 basic_machine
=m68k-unknown
890 basic_machine
=asmjs-unknown
893 basic_machine
=bfin-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
897 basic_machine
=powerpc-ibm
901 basic_machine
=tic54x-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
904 basic_machine
=tic55x-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
907 basic_machine
=tic6x-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
910 basic_machine
=c90-cray
914 basic_machine
=c1-convex
918 basic_machine
=c2-convex
922 basic_machine
=c32-convex
926 basic_machine
=c34-convex
930 basic_machine
=c38-convex
934 basic_machine
=cr16-unknown
938 basic_machine
=m68k-crds
940 crisv32 | crisv32-
* | etraxfs
*)
941 basic_machine
=crisv32-axis
943 cris | cris-
* | etrax
*)
944 basic_machine
=cris-axis
947 basic_machine
=crx-unknown
951 basic_machine
=m68k-da30
953 decstation | decstation-3100 | pmax | pmax-
* | pmin | dec3100 | decstatn
)
954 basic_machine
=mips-dec
956 decsystem10
* | dec10
*)
957 basic_machine
=pdp10-dec
960 decsystem20
* | dec20
*)
961 basic_machine
=pdp10-dec
964 delta |
3300 | motorola-3300 | motorola-delta \
965 |
3300-motorola | delta-motorola
)
966 basic_machine
=m68k-motorola
969 basic_machine
=rs6000-bull
973 basic_machine
=m68k-bull
977 basic_machine
=powerpc-unknown
981 basic_machine
=powerpc-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
984 encore | umax | mmax
)
985 basic_machine
=ns32k-encore
988 basic_machine
=elxsi-elxsi
992 basic_machine
=i860-alliant
995 basic_machine
=ns32k-ns
998 basic_machine
=hppa1.1
-hitachi
1002 basic_machine
=m68k-hp
1004 hp3k9
[0-9][0-9] | hp9
[0-9][0-9])
1005 basic_machine
=hppa1.0
-hp
1007 hp9k2
[0-9][0-9] | hp9k31
[0-9])
1008 basic_machine
=m68000-hp
1011 basic_machine
=m68k-hp
1013 hp9k6
[0-9][0-9] | hp6
[0-9][0-9])
1014 basic_machine
=hppa1.0
-hp
1016 hp9k7
[0-79][0-9] | hp7
[0-79][0-9])
1017 basic_machine
=hppa1.1
-hp
1019 hp9k78
[0-9] | hp78
[0-9])
1020 # FIXME: really hppa2.0-hp
1021 basic_machine
=hppa1.1
-hp
1023 hp9k8
[67]1 | hp8
[67]1 | hp9k80
[24] | hp80
[24] | hp9k8
[78]9 | hp8
[78]9 | hp9k893 | hp893
)
1024 # FIXME: really hppa2.0-hp
1025 basic_machine
=hppa1.1
-hp
1027 hp9k8
[0-9][13679] | hp8
[0-9][13679])
1028 basic_machine
=hppa1.1
-hp
1030 hp9k8
[0-9][0-9] | hp8
[0-9][0-9])
1031 basic_machine
=hppa1.0
-hp
1034 basic_machine
=i370-ibm
1037 basic_machine
=`echo "$1" | sed -e 's/86.*/86-pc/'`
1041 basic_machine
=`echo "$1" | sed -e 's/86.*/86-pc/'`
1045 basic_machine
=`echo "$1" | sed -e 's/86.*/86-pc/'`
1049 basic_machine
=`echo "$1" | sed -e 's/86.*/86-pc/'`
1053 basic_machine
=j90-cray
1057 basic_machine
=mips-sgi
1067 basic_machine
=sparc-
`echo "$basic_machine" | sed 's/-.*//'`
1070 basic_machine
=m68k-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1074 basic_machine
=microblaze-xilinx
1077 basic_machine
=m68000-convergent
1079 *mint | mint
[0-9]* |
*MiNT |
*MiNT
[0-9]*)
1080 basic_machine
=m68k-atari
1084 basic_machine
=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
1087 basic_machine
=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
1090 basic_machine
=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
1092 news-3600 | risc-news
)
1093 basic_machine
=mips-sony
1097 basic_machine
=m68k-next
1110 basic_machine
=np1-gould
1113 basic_machine
=neo-tandem
1116 basic_machine
=nse-tandem
1119 basic_machine
=nsr-tandem
1122 basic_machine
=nsv-tandem
1125 basic_machine
=nsx-tandem
1128 basic_machine
=hppa1.1
-oki
1131 openrisc | openrisc-
*)
1132 basic_machine
=or32-unknown
1135 basic_machine
=hppa1.1
-hitachi
1139 basic_machine
=hppa-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1143 basic_machine
=sparc-tti
1146 basic_machine
=m68k-tti
1149 basic_machine
=ns32k-pc532
1152 basic_machine
=i386-pc
1155 basic_machine
=i386-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1157 pentium | p5 | k5 | k6 | nexgen | viac3
)
1158 basic_machine
=i586-pc
1160 pentiumpro | p6 |
6x86 | athlon | athlon_
*)
1161 basic_machine
=i686-pc
1163 pentiumii | pentium2 | pentiumiii | pentium3
)
1164 basic_machine
=i686-pc
1167 basic_machine
=i786-pc
1169 pentium-
* | p5-
* | k5-
* | k6-
* | nexgen-
* | viac3-
*)
1170 basic_machine
=i586-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1172 pentiumpro-
* | p6-
* |
6x86-
* | athlon-
*)
1173 basic_machine
=i686-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1175 pentiumii-
* | pentium2-
* | pentiumiii-
* | pentium3-
*)
1176 basic_machine
=i686-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1179 basic_machine
=i786-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1182 basic_machine
=pn-gould
1184 power
) basic_machine
=power-ibm
1186 ppc | ppcbe
) basic_machine
=powerpc-unknown
1189 basic_machine
=powerpc-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1191 ppcle | powerpclittle
)
1192 basic_machine
=powerpcle-unknown
1194 ppcle-
* | powerpclittle-
*)
1195 basic_machine
=powerpcle-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1197 ppc64
) basic_machine
=powerpc64-unknown
1199 ppc64-
*) basic_machine
=powerpc64-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1201 ppc64le | powerpc64little
)
1202 basic_machine
=powerpc64le-unknown
1204 ppc64le-
* | powerpc64little-
*)
1205 basic_machine
=powerpc64le-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1208 basic_machine
=i386-ibm
1211 basic_machine
=mips-siemens
1214 basic_machine
=romp-ibm
1217 basic_machine
=s390-ibm
1220 basic_machine
=s390x-ibm
1223 basic_machine
=mipsisa64sb1-unknown
1226 basic_machine
=mipsisa64sb1el-unknown
1229 basic_machine
=mipsisa32-sde
1233 basic_machine
=i386-sequent
1236 basic_machine
=sh5le-unknown
1239 basic_machine
=sparclite-wrs
1243 basic_machine
=spur-unknown
1246 basic_machine
=m68k-tandem
1248 strongarm-
* | thumb-
*)
1249 basic_machine
=arm-
`echo "$basic_machine" | sed 's/^[^-]*-//'`
1252 basic_machine
=m68000-sun
1255 basic_machine
=m68k-sun
1258 basic_machine
=sparc-sun
1260 sun386 | sun386i | roadrunner
)
1261 basic_machine
=i386-sun
1264 basic_machine
=$basic_machine-unknown
1268 basic_machine
=mipstx39-unknown
1271 basic_machine
=mipstx39el-unknown
1274 basic_machine
=m68k-ncr
1277 basic_machine
=f301-fujitsu
1280 basic_machine
=w65-wdc
1284 basic_machine
=hppa1.1
-winbond
1288 basic_machine
=x86_64-pc
1291 basic_machine
=xps100-honeywell
1293 xscale-
* | xscalee
[bl
]-*)
1294 basic_machine
=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1297 basic_machine
=none-none
1301 # Here we handle the default manufacturer of certain CPU types. It is in
1302 # some cases the only manufacturer, in others, it is the most popular.
1304 basic_machine
=hppa1.1
-winbond
1307 basic_machine
=hppa1.1
-oki
1310 basic_machine
=hppa1.1
-oki
1313 basic_machine
=romp-ibm
1316 basic_machine
=mmix-knuth
1319 basic_machine
=rs6000-ibm
1322 basic_machine
=vax-dec
1325 basic_machine
=pdp11-dec
1328 basic_machine
=we32k-att
1330 sh
[1234] | sh
[24]a | sh
[24]aeb | sh
[34]eb | sh
[1234]le | sh
[23]ele
)
1331 basic_machine
=sh-unknown
1334 basic_machine
=cydra-cydrome
1337 basic_machine
=orion-highlevel
1340 basic_machine
=clipper-highlevel
1342 mac | mpw | mac-mpw
)
1343 basic_machine
=m68k-apple
1346 basic_machine
=powerpc-apple
1349 # Make sure to match an already-canonicalized machine name.
1352 echo Invalid configuration \
`"$1"\': machine \`"$basic_machine"\' not recognized
1>&2
1357 # Here we canonicalize certain aliases for manufacturers.
1358 case $basic_machine in
1360 basic_machine
=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1363 basic_machine
=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1369 # Decode manufacturer-specific aliases for certain operating systems.
1374 # First match some system type aliases that might get confused
1375 # with valid system types.
1376 # solaris* is a basic system type, with this one exception.
1380 solaris1 | solaris1.
*)
1381 os
=`echo $os | sed -e 's|solaris1|sunos4|'`
1390 os
=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1392 # es1800 is here to avoid being matched by es* (a different OS)
1396 # Now accept the basic system types.
1397 # The portable systems comes first.
1398 # Each alternative MUST end in a * to match a version number.
1399 # sysv* is not here because it comes later, after sysvr4.
1400 gnu
* | bsd
* | mach
* | minix
* | genix
* | ultrix
* | irix
* \
1401 |
*vms
* | sco
* | esix
* | isc
* | aix
* | cnk
* | sunos | sunos
[34]*\
1402 | hpux
* | unos
* | osf
* | luna
* | dgux
* | auroraux
* | solaris
* \
1403 | sym
* | kopensolaris
* | plan9
* \
1404 | amigaos
* | amigados
* | msdos
* | newsos
* | unicos
* | aof
* \
1405 | aos
* | aros
* | cloudabi
* | sortix
* \
1406 | nindy
* | vxsim
* | vxworks
* | ebmon
* | hms
* | mvs
* \
1407 | clix
* | riscos
* | uniplus
* | iris
* | rtu
* | xenix
* \
1408 | hiux
* | knetbsd
* | mirbsd
* | netbsd
* \
1409 | bitrig
* | openbsd
* | solidbsd
* | libertybsd
* \
1410 | ekkobsd
* | kfreebsd
* | freebsd
* | riscix
* | lynxos
* \
1411 | bosx
* | nextstep
* | cxux
* | aout
* | elf
* | oabi
* \
1412 |
ptx* | coff
* | ecoff
* | winnt
* | domain
* | vsta
* \
1413 | udi
* | eabi
* | lites
* | ieee
* | go32
* | aux
* | hcos
* \
1414 | chorusos
* | chorusrdb
* | cegcc
* | glidix
* \
1415 | cygwin
* | msys
* | pe
* | psos
* | moss
* | proelf
* | rtems
* \
1416 | midipix
* | mingw32
* | mingw64
* | linux-gnu
* | linux-android
* \
1417 | linux-newlib
* | linux-musl
* | linux-uclibc
* \
1418 | uxpv
* | beos
* | mpeix
* | udk
* | moxiebox
* \
1419 | interix
* | uwin
* | mks
* | rhapsody
* | darwin
* \
1420 | openstep
* | oskit
* | conix
* | pw32
* | nonstopux
* \
1421 | storm-chaos
* | tops10
* | tenex
* | tops20
* | its
* \
1422 | os2
* | vos
* | palmos
* | uclinux
* | nucleus
* \
1423 | morphos
* | superux
* | rtmk
* | windiss
* \
1424 | powermax
* | dnix
* | nx6 | nx7 | sei
* | dragonfly
* \
1425 | skyos
* | haiku
* | rdos
* | toppers
* | drops
* | es
* \
1426 | onefs
* | tirtos
* | phoenix
* | fuchsia
* | redox
* | bme
* \
1428 # Remember, each alternative MUST END IN *, to match a version number.
1431 case $basic_machine in
1442 os
=`echo $os | sed -e 's|nto|nto-qnx|'`
1444 sim | xray | os68k
* | v88r
* \
1445 | windows
* | osx | abug | netware
* | os9
* \
1446 | macos
* | mpw
* | magic
* | mmixware
* | mon960
* | lnews
*)
1449 os
=`echo "$os" | sed -e 's|mac|macos|'`
1455 os
=`echo $os | sed -e 's|linux|linux-gnu|'`
1458 os
=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1461 os
=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1502 # Preserve the version number of sinix5.
1504 os
=`echo $os | sed -e 's|sinix|sysv|'`
1527 # This must come after sysvr4.
1533 *mint | mint
[0-9]* |
*MiNT | MiNT
[0-9]*)
1543 # Until real need of OS specific support for
1544 # particular features comes up, bare metal
1545 # configurations are quite functional.
1546 case $basic_machine in
1564 echo Invalid configuration \
`"$1"\': system \`"$os"\' not recognized
1>&2
1570 # Here we handle the default operating systems that come with various machines.
1571 # The value should be what the vendor currently ships out the door with their
1572 # machine or put another way, the most popular os provided with the machine.
1574 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1575 # "-sun"), then you have to tell the case statement up towards the top
1576 # that MANUFACTURER isn't an operating system. Otherwise, code above
1577 # will signal an error saying that MANUFACTURER isn't an operating
1578 # system, and we'll never get to this point.
1580 case $basic_machine in
1614 # This must come before the *-dec entry.
1648 *-tti) # must be before sparc entry or we get the wrong os.
1681 i860-
* |
*-att |
*-ncr |
*-altos |
*-motorola |
*-convergent)
1732 f30
[01]-fujitsu | f700-fujitsu
)
1753 # Here we handle the case where we know the os, and the CPU type, but not the
1754 # manufacturer. We pick the logical manufacturer.
1756 case $basic_machine in
1804 vxsim
* | vxworks
* | windiss
*)
1816 *mint | mint
[0-9]* |
*MiNT | MiNT
[0-9]*)
1823 basic_machine
=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
1827 echo "$basic_machine-$os"
1831 # eval: (add-hook 'before-save-hook 'time-stamp)
1832 # time-stamp-start: "timestamp='"
1833 # time-stamp-format: "%:y-%02m-%02d"
1834 # time-stamp-end: "'"