Lines Matching +full:1 +full:- +full:cpu

3 #   Copyright 1992-2023 Free Software Foundation, Inc.
7 timestamp='2023-09-15'
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] \
1267 echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
1268 exit 1
1286 # Decode manufacturer-specific aliases for certain operating systems.
1291 # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
1297 os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1299 os2-emx)
1301 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
1303 nto-qnx*)
1305 os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1307 *-*)
1310 IFS="-" read kernel os <<EOF
1318 os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
1322 os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1326 os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
1347 os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
1375 sco3.2.[4-9]*)
1376 os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
1405 mac[0-9]*)
1406 os=`echo "$os" | sed -e 's|mac|macos|'`
1415 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1418 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1445 os=rtmk-nova
1452 os=`echo "$os" | sed -e 's|sinix|sysv|'`
1478 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1488 case $cpu in
1514 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1515 # "-sun"), then you have to tell the case statement up towards the top
1522 case $cpu-$vendor in
1523 score-*)
1527 spu-*)
1531 *-acorn)
1534 arm*-rebel)
1538 arm*-semi)
1542 c4x-* | tic4x-*)
1546 c8051-*)
1550 clipper-intergraph)
1553 hexagon-*)
1557 tic54x-*)
1561 tic55x-*)
1565 tic6x-*)
1569 # This must come before the *-dec entry.
1570 pdp10-*)
1573 pdp11-*)
1576 *-dec | vax-*)
1579 m68*-apollo)
1582 i386-sun)
1585 m68000-sun)
1588 m68*-cisco)
1592 mep-*)
1596 mips*-cisco)
1600 mips*-*)
1604 or32-*)
1608 *-tti) # must be before sparc entry or we get the wrong os.
1611 sparc-* | *-sun)
1614 pru-*)
1618 *-be)
1621 *-ibm)
1624 *-knuth)
1627 *-wec)
1630 *-winbond)
1633 *-oki)
1636 *-hp)
1639 *-hitachi)
1642 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1645 *-cbm)
1648 *-dg)
1651 *-dolphin)
1654 m68k-ccur)
1657 m88k-omron*)
1660 *-next)
1663 *-sequent)
1666 *-crds)
1669 *-ns)
1672 i370-*)
1675 *-gould)
1678 *-highlevel)
1681 *-encore)
1684 *-sgi)
1687 *-siemens)
1690 *-masscomp)
1693 f30[01]-fujitsu | f700-fujitsu)
1696 *-rom68k)
1700 *-*bug)
1704 *-apple)
1707 *-atari*)
1710 *-wrs)
1720 # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
1723 # Sometimes we do "kernel-libc", so those need to count as OSes.
1726 # Likewise for "kernel-abi"
1729 # VxWorks passes extra cpu info in the 4th filed.
1732 # See `case $cpu-$os` validation below
1761 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1772 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1783 …echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>…
1787 echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
1788 exit 1
1799 echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
1800 exit 1
1804 # Here we handle the constraint that a (synthetic) cpu and os are
1806 case $cpu-$os in
1807 # The "javascript-unknown-ghcjs" triple is used by GHC; we
1810 javascript-ghcjs)
1812 javascript-* | *-ghcjs)
1813 echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
1814 exit 1
1818 # As a final step for OS-related things, validate the OS-kernel combination
1820 case $kernel-$os-$obj in
1821 linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \
1822 | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- )
1824 uclinux-uclibc*- )
1826 managarm-mlibc*- | managarm-kernel*- )
1828 windows*-gnu*- | windows*-msvc*-)
1830 -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- )
1833 echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
1834 exit 1
1836 -kernel*- )
1837 echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
1838 exit 1
1840 *-kernel*- )
1841 echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
1842 exit 1
1844 *-msvc*- )
1845 echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
1846 exit 1
1848 kfreebsd*-gnu*- | kopensolaris*-gnu*-)
1850 vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
1852 nto-qnx*-)
1854 os2-emx-)
1856 *-eabi*- | *-gnueabi*-)
1858 none--*)
1862 -*-)
1865 --*)
1868 *-*-*)
1869 echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
1870 exit 1
1874 # Here we handle the case where we know the os, and the CPU type, but not the
1878 case $cpu-$os in
1879 *-riscix*)
1882 *-sunos*)
1885 *-cnk* | *-aix*)
1888 *-beos*)
1891 *-hpux*)
1894 *-mpeix*)
1897 *-hiux*)
1900 *-unos*)
1903 *-dgux*)
1906 *-luna*)
1909 *-genix*)
1912 *-clix*)
1915 *-mvs* | *-opened*)
1918 *-os400*)
1921 s390-* | s390x-*)
1924 *-ptx*)
1927 *-tpf*)
1930 *-vxsim* | *-vxworks* | *-windiss*)
1933 *-aux*)
1936 *-hms*)
1939 *-mpw* | *-macos*)
1942 *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
1945 *-vos*)
1952 echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
1956 # eval: (add-hook 'before-save-hook 'time-stamp)
1957 # time-stamp-start: "timestamp='"
1958 # time-stamp-format: "%:y-%02m-%02d"
1959 # time-stamp-end: "'"