Lines Matching +full:1 +full:- +full:cpu
3 # Copyright 1992-2023 Free Software Foundation, Inc.
7 timestamp='2023-12-02'
30 # Please send patches to <config-patches@gnu.org>.
34 # If it is invalid, we print an error message on stderr and exit with code 1.
41 # and recognize all the CPU types, system types and aliases
50 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
51 # or in some cases, the newer four-part form:
52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
58 # variety of pre-POSIX systems that do not have POSIX shells at all, and
59 # even some reasonably current systems (Solaris 10 as case-in-point) still
60 # have a pre-POSIX /bin/sh.
62 me=`echo "$0" | sed -e 's,.*/,,'`
65 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
70 -h, --help print this help, then exit
71 -t, --time-stamp print date of last modification, then exit
72 -v, --version print version number, then exit
74 Report bugs and patches to <config-patches@gnu.org>."
79 Copyright 1992-2023 Free Software Foundation, Inc.
85 Try '$me --help' for more information."
88 while test $# -gt 0 ; do
89 case $1 in
90 --time-stamp | --time* | -t )
92 --version | -v )
94 --help | --h* | -h )
96 -- ) # Stop option processing
98 - ) # Use stdin as input.
100 -* )
101 echo "$me: invalid option $1$help" >&2
102 exit 1 ;;
106 echo "$1"
116 exit 1;;
117 1) ;;
119 exit 1;;
125 IFS="-" read field1 field2 field3 field4 <<EOF
126 $1
131 case $1 in
132 *-*-*-*-*)
133 echo "Invalid configuration '$1': more than four components" >&2
134 exit 1
136 *-*-*-*)
137 basic_machine=$field1-$field2
138 basic_os=$field3-$field4
140 *-*-*)
141 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
143 maybe_os=$field2-$field3
145 nto-qnx* | linux-* | uclinux-uclibc* \
146 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
147 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
148 | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
149 | windows-* )
153 android-linux)
154 basic_machine=$field1-unknown
155 basic_os=linux-android
158 basic_machine=$field1-$field2
163 *-*)
165 case $field1-$field2 in
166 decstation-3100)
167 basic_machine=mips-dec
170 *-*)
179 basic_machine=$field1-unknown
192 basic_machine=$field1-$field2
204 # Convert single-component short-hands not valid as part of
205 # multi-component configurations.
208 basic_machine=i386-pc
212 basic_machine=a29k-amd
216 basic_machine=m68010-adobe
220 basic_machine=fx80-alliant
224 basic_machine=m68k-altos
228 basic_machine=a29k-none
232 basic_machine=580-amdahl
236 basic_machine=m68k-unknown
240 basic_machine=m68k-unknown
244 basic_machine=m68k-unknown
248 basic_machine=m68k-apollo
252 basic_machine=m68k-apollo
256 basic_machine=i386-pc
260 basic_machine=m68k-apple
264 basic_machine=ns32k-sequent
268 basic_machine=bfin-unknown
272 basic_machine=arm-unknown
275 convex-c1)
276 basic_machine=c1-convex
279 convex-c2)
280 basic_machine=c2-convex
283 convex-c32)
284 basic_machine=c32-convex
287 convex-c34)
288 basic_machine=c34-convex
291 convex-c38)
292 basic_machine=c38-convex
296 basic_machine=j90-cray
300 basic_machine=m68k-crds
304 basic_machine=m68k-da30
308 basic_machine=mips-dec
312 basic_machine=m88k-motorola
316 basic_machine=i686-pc
320 basic_machine=i586-pc
324 basic_machine=a29k-amd
328 basic_machine=m68k-ericsson
332 basic_machine=tron-gmicro
336 basic_machine=i386-pc
340 basic_machine=h8300-hitachi
344 basic_machine=h8300-hitachi
348 basic_machine=h8500-hitachi
352 basic_machine=m88k-harris
356 basic_machine=m68k-hp
360 basic_machine=m68k-hp
364 basic_machine=hppa1.1-hp
368 basic_machine=hppa1.1-hp
372 basic_machine=i386-mach
376 basic_machine=m68k-isi
380 basic_machine=m68k-unknown
384 basic_machine=mips-mips
388 basic_machine=ns32k-utek
392 basic_machine=x86_64-pc
396 basic_machine=i686-pc
400 basic_machine=arm-unknown
404 basic_machine=m68k-rom68k
408 basic_machine=powerpc-unknown
412 basic_machine=moxie-unknown
416 basic_machine=i386-pc
420 basic_machine=i686-pc
424 basic_machine=i370-ibm
428 basic_machine=le32-unknown
432 basic_machine=i486-ncr
436 basic_machine=i386-pc
440 basic_machine=armv4l-rebel
444 basic_machine=m68k-sony
448 basic_machine=m68030-sony
452 basic_machine=v70-nec
456 basic_machine=m68k-harris
460 basic_machine=m88k-harris
464 basic_machine=i960-intel
468 basic_machine=i960-intel
472 basic_machine=mips-compaq
476 basic_machine=powerpc-ibm
480 basic_machine=m68000-ericsson
484 basic_machine=m68k-none
488 basic_machine=i860-intel
492 basic_machine=hppa-unknown
496 basic_machine=mipsallegrexel-sony
500 basic_machine=i586-unknown
504 basic_machine=x86_64-pc
508 basic_machine=i386-pc
512 basic_machine=m68k-rom68k
516 basic_machine=a29k-amd
520 basic_machine=mips-sei
524 basic_machine=i386-sequent
528 basic_machine=m68k-bull
532 basic_machine=m68k-tandem
536 basic_machine=i860-stratus
540 basic_machine=m68000-sun
544 basic_machine=m68000-sun
548 basic_machine=m68000-sun
552 basic_machine=m68k-sun
556 basic_machine=m68k-sun
560 basic_machine=m68k-sun
564 basic_machine=sparc-sun
568 basic_machine=sparc-sun
572 basic_machine=sparc-sun
576 basic_machine=sparc-sun
580 basic_machine=i386-sun
584 basic_machine=sv1-cray
588 basic_machine=i386-sequent
592 basic_machine=alphaev5-cray
596 basic_machine=t90-cray
600 basic_machine=pdp10-xkl
604 basic_machine=s390x-ibm
608 basic_machine=a29k-amd
612 basic_machine=a29k-nyu
616 basic_machine=v810-nec
620 basic_machine=vax-dec
624 basic_machine=vax-dec
628 basic_machine=i386-pc
632 basic_machine=i960-wrs
636 basic_machine=m68k-wrs
640 basic_machine=a29k-wrs
644 basic_machine=i686-pc
648 basic_machine=ymp-cray
652 basic_machine=$1
659 # Decode 1-component or ad-hoc basic machines
661 # Here we handle the default manufacturer of certain CPU types. It is in
664 cpu=hppa1.1
668 cpu=hppa1.1
672 cpu=hppa1.1
676 cpu=i370
680 cpu=clipper
683 mac | mpw | mac-mpw)
684 cpu=m68k
687 pmac | pmac-mpw)
688 cpu=powerpc
693 # for a CPU type and a company and sometimes even an OS.
694 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
695 cpu=m68000
699 cpu=we32k
703 cpu=powerpc
708 cpu=pdp10
713 cpu=pdp10
717 delta | 3300 | motorola-3300 | motorola-delta \
718 | 3300-motorola | delta-motorola)
719 cpu=m68k
723 cpu=m68k
728 cpu=ns32k
732 cpu=elxsi
734 basic_os=${basic_os:-bsd}
737 cpu=i860
741 cpu=ns32k
745 cpu=hppa1.1
749 hp3k9[0-9][0-9] | hp9[0-9][0-9])
750 cpu=hppa1.0
753 hp9k2[0-9][0-9] | hp9k31[0-9])
754 cpu=m68000
757 hp9k3[2-9][0-9])
758 cpu=m68k
761 hp9k6[0-9][0-9] | hp6[0-9][0-9])
762 cpu=hppa1.0
765 hp9k7[0-79][0-9] | hp7[0-79][0-9])
766 cpu=hppa1.1
769 hp9k78[0-9] | hp78[0-9])
770 # FIXME: really hppa2.0-hp
771 cpu=hppa1.1
774 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
775 # FIXME: really hppa2.0-hp
776 cpu=hppa1.1
779 hp9k8[0-9][13679] | hp8[0-9][13679])
780 cpu=hppa1.1
783 hp9k8[0-9][0-9] | hp8[0-9][0-9])
784 cpu=hppa1.0
788 cpu=`echo "$1" | sed -e 's/86.*/86/'`
793 cpu=`echo "$1" | sed -e 's/86.*/86/'`
798 cpu=`echo "$1" | sed -e 's/86.*/86/'`
803 cpu=`echo "$1" | sed -e 's/86.*/86/'`
807 j90 | j90-cray)
808 cpu=j90
810 basic_os=${basic_os:-unicos}
813 cpu=mips
824 cpu=m68000
827 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
828 cpu=m68k
832 news-3600 | risc-news)
833 cpu=mips
837 next | m*-next)
838 cpu=m68k
854 cpu=np1
857 op50n-* | op60c-*)
858 cpu=hppa1.1
862 pa-hitachi)
863 cpu=hppa1.1
868 cpu=sparc
872 cpu=m68k
876 cpu=ns32k
880 cpu=pn
884 cpu=power
888 cpu=i386
892 cpu=mips
895 rtpc | rtpc-*)
896 cpu=romp
900 cpu=mipsisa32
902 basic_os=${basic_os:-elf}
904 simso-wrs)
905 cpu=sparclite
909 tower | tower-32)
910 cpu=m68k
913 vpp*|vx|vx-*)
914 cpu=f301
918 cpu=w65
921 w89k-*)
922 cpu=hppa1.1
927 cpu=none
930 leon|leon[3-9])
931 cpu=sparc
934 leon-*|leon[3-9]-*)
935 cpu=sparc
936 vendor=`echo "$basic_machine" | sed 's/-.*//'`
939 *-*)
942 IFS="-" read cpu vendor <<EOF
948 # because (1) that's what they normally are, and
951 cpu=$basic_machine
957 cpu=i386
961 cpu=x86_64
964 # Recognize the basic CPU types without company name.
966 cpu=$basic_machine
971 unset -v basic_machine
973 # Decode basic machines in the full and proper CPU-Company form.
974 case $cpu-$vendor in
975 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
977 craynv-unknown)
979 basic_os=${basic_os:-unicosmp}
981 c90-unknown | c90-cray)
983 basic_os=${Basic_os:-unicos}
985 fx80-unknown)
988 romp-unknown)
991 mmix-unknown)
994 microblaze-unknown | microblazeel-unknown)
997 rs6000-unknown)
1000 vax-unknown)
1003 pdp11-unknown)
1006 we32k-unknown)
1009 cydra-unknown)
1012 i370-ibm*)
1015 orion-unknown)
1018 xps-unknown | xps100-unknown)
1019 cpu=xps100
1023 # Here we normalize CPU types with a missing or matching vendor
1024 armh-unknown | armh-alt)
1025 cpu=armv7l
1027 basic_os=${basic_os:-linux-gnueabihf}
1029 dpx20-unknown | dpx20-bull)
1030 cpu=rs6000
1032 basic_os=${basic_os:-bosx}
1035 # Here we normalize CPU types irrespective of the vendor
1036 amd64-*)
1037 cpu=x86_64
1039 blackfin-*)
1040 cpu=bfin
1043 c54x-*)
1044 cpu=tic54x
1046 c55x-*)
1047 cpu=tic55x
1049 c6x-*)
1050 cpu=tic6x
1052 e500v[12]-*)
1053 cpu=powerpc
1056 mips3*-*)
1057 cpu=mips64
1059 ms1-*)
1060 cpu=mt
1062 m68knommu-*)
1063 cpu=m68k
1066 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1067 cpu=s12z
1069 openrisc-*)
1070 cpu=or32
1072 parisc-*)
1073 cpu=hppa
1076 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1077 cpu=i586
1079 pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
1080 cpu=i686
1082 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1083 cpu=i686
1085 pentium4-*)
1086 cpu=i786
1088 pc98-*)
1089 cpu=i386
1091 ppc-* | ppcbe-*)
1092 cpu=powerpc
1094 ppcle-* | powerpclittle-*)
1095 cpu=powerpcle
1097 ppc64-*)
1098 cpu=powerpc64
1100 ppc64le-* | powerpc64little-*)
1101 cpu=powerpc64le
1103 sb1-*)
1104 cpu=mipsisa64sb1
1106 sb1el-*)
1107 cpu=mipsisa64sb1el
1109 sh5e[lb]-*)
1110 cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1112 spur-*)
1113 cpu=spur
1115 strongarm-* | thumb-*)
1116 cpu=arm
1118 tx39-*)
1119 cpu=mipstx39
1121 tx39el-*)
1122 cpu=mipstx39el
1124 x64-*)
1125 cpu=x86_64
1127 xscale-* | xscalee[bl]-*)
1128 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1130 arm64-* | aarch64le-*)
1131 cpu=aarch64
1134 # Recognize the canonical CPU Types that limit and/or modify the
1136 cr16-*)
1137 basic_os=${basic_os:-elf}
1139 crisv32-* | etraxfs*-*)
1140 cpu=crisv32
1143 cris-* | etrax*-*)
1144 cpu=cris
1147 crx-*)
1148 basic_os=${basic_os:-elf}
1150 neo-tandem)
1151 cpu=neo
1154 nse-tandem)
1155 cpu=nse
1158 nsr-tandem)
1159 cpu=nsr
1162 nsv-tandem)
1163 cpu=nsv
1166 nsx-tandem)
1167 cpu=nsx
1170 mipsallegrexel-sony)
1171 cpu=mipsallegrexel
1174 tile*-*)
1175 basic_os=${basic_os:-linux-gnu}
1179 # Recognize the canonical CPU types that are allowed with any
1181 case $cpu in
1186 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1187 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1269 echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
1270 exit 1
1288 # Decode manufacturer-specific aliases for certain operating systems.
1293 # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
1299 os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1301 os2-emx)
1303 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
1305 nto-qnx*)
1307 os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1309 *-*)
1312 IFS="-" read kernel os <<EOF
1320 os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
1324 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1328 os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1349 os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
1377 sco3.2.[4-9]*)
1378 os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
1407 mac[0-9]*)
1408 os=`echo "$os" | sed -e 's|mac|macos|'`
1417 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1420 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1447 os=rtmk-nova
1454 os=`echo "$os" | sed -e 's|sinix|sysv|'`
1480 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1490 case $cpu in
1516 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1517 # "-sun"), then you have to tell the case statement up towards the top
1524 case $cpu-$vendor in
1525 score-*)
1529 spu-*)
1533 *-acorn)
1536 arm*-rebel)
1540 arm*-semi)
1544 c4x-* | tic4x-*)
1548 c8051-*)
1552 clipper-intergraph)
1555 hexagon-*)
1559 tic54x-*)
1563 tic55x-*)
1567 tic6x-*)
1571 # This must come before the *-dec entry.
1572 pdp10-*)
1575 pdp11-*)
1578 *-dec | vax-*)
1581 m68*-apollo)
1584 i386-sun)
1587 m68000-sun)
1590 m68*-cisco)
1594 mep-*)
1598 mips*-cisco)
1602 mips*-*|nanomips*-*)
1606 or32-*)
1610 *-tti) # must be before sparc entry or we get the wrong os.
1613 sparc-* | *-sun)
1616 pru-*)
1620 *-be)
1623 *-ibm)
1626 *-knuth)
1629 *-wec)
1632 *-winbond)
1635 *-oki)
1638 *-hp)
1641 *-hitachi)
1644 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1647 *-cbm)
1650 *-dg)
1653 *-dolphin)
1656 m68k-ccur)
1659 m88k-omron*)
1662 *-next)
1665 *-sequent)
1668 *-crds)
1671 *-ns)
1674 i370-*)
1677 *-gould)
1680 *-highlevel)
1683 *-encore)
1686 *-sgi)
1689 *-siemens)
1692 *-masscomp)
1695 f30[01]-fujitsu | f700-fujitsu)
1698 *-rom68k)
1702 *-*bug)
1706 *-apple)
1709 *-atari*)
1712 *-wrs)
1722 # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
1725 # Sometimes we do "kernel-libc", so those need to count as OSes.
1728 # Likewise for "kernel-abi"
1731 # VxWorks passes extra cpu info in the 4th filed.
1734 # See `case $cpu-$os` validation below
1763 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1774 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1780 # different file format than that of GNU-EFI
1781 # (x86_64-w64-mingw32).
1792 …echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>…
1796 echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
1797 exit 1
1808 echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
1809 exit 1
1813 # Here we handle the constraint that a (synthetic) cpu and os are
1815 case $cpu-$os in
1816 # The "javascript-unknown-ghcjs" triple is used by GHC; we
1819 javascript-ghcjs)
1821 javascript-* | *-ghcjs)
1822 echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
1823 exit 1
1827 # As a final step for OS-related things, validate the OS-kernel combination
1829 case $kernel-$os-$obj in
1830 linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
1831 | linux-mlibc*- | linux-musl*- | linux-newlib*- \
1832 | linux-relibc*- | linux-uclibc*- )
1834 uclinux-uclibc*- )
1836 managarm-mlibc*- | managarm-kernel*- )
1838 windows*-msvc*-)
1840 -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
1841 | -uclibc*- )
1844 echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
1845 exit 1
1847 -kernel*- )
1848 echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
1849 exit 1
1851 *-kernel*- )
1852 echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
1853 exit 1
1855 *-msvc*- )
1856 echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
1857 exit 1
1859 kfreebsd*-gnu*- | kopensolaris*-gnu*-)
1861 vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
1863 nto-qnx*-)
1865 os2-emx-)
1867 *-eabi*- | *-gnueabi*-)
1869 none--*)
1873 -*-)
1876 --*)
1879 *-*-*)
1880 echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
1881 exit 1
1885 # Here we handle the case where we know the os, and the CPU type, but not the
1889 case $cpu-$os in
1890 *-riscix*)
1893 *-sunos*)
1896 *-cnk* | *-aix*)
1899 *-beos*)
1902 *-hpux*)
1905 *-mpeix*)
1908 *-hiux*)
1911 *-unos*)
1914 *-dgux*)
1917 *-luna*)
1920 *-genix*)
1923 *-clix*)
1926 *-mvs* | *-opened*)
1929 *-os400*)
1932 s390-* | s390x-*)
1935 *-ptx*)
1938 *-tpf*)
1941 *-vxsim* | *-vxworks* | *-windiss*)
1944 *-aux*)
1947 *-hms*)
1950 *-mpw* | *-macos*)
1953 *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
1956 *-vos*)
1963 echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
1967 # eval: (add-hook 'before-save-hook 'time-stamp)
1968 # time-stamp-start: "timestamp='"
1969 # time-stamp-format: "%:y-%02m-%02d"
1970 # time-stamp-end: "'"