2 7633e2f8 2002-03-12 alex # Configuration validation subroutine script.
3 5d5fdfb3 2020-05-10 alex # Copyright 1992-2020 Free Software Foundation, Inc.
5 afb17ff0 2020-01-02 alex timestamp='2020-12-22'
7 4c2acd55 2014-03-18 alex # This file is free software; you can redistribute it and/or modify it
8 4c2acd55 2014-03-18 alex # under the terms of the GNU General Public License as published by
9 4c2acd55 2014-03-18 alex # the Free Software Foundation; either version 3 of the License, or
10 7633e2f8 2002-03-12 alex # (at your option) any later version.
12 4c2acd55 2014-03-18 alex # This program is distributed in the hope that it will be useful, but
13 4c2acd55 2014-03-18 alex # WITHOUT ANY WARRANTY; without even the implied warranty of
14 4c2acd55 2014-03-18 alex # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 4c2acd55 2014-03-18 alex # General Public License for more details.
17 7633e2f8 2002-03-12 alex # You should have received a copy of the GNU General Public License
18 7f2d21f9 2018-04-01 alex # along with this program; if not, see <https://www.gnu.org/licenses/>.
20 7633e2f8 2002-03-12 alex # As a special exception to the GNU General Public License, if you
21 7633e2f8 2002-03-12 alex # distribute this file as part of a program that contains a
22 7633e2f8 2002-03-12 alex # configuration script generated by Autoconf, you may include it under
23 4c2acd55 2014-03-18 alex # the same distribution terms that you use for the rest of that
24 4c2acd55 2014-03-18 alex # program. This Exception is an additional permission under section 7
25 4c2acd55 2014-03-18 alex # of the GNU General Public License, version 3 ("GPLv3").
28 a335e480 2016-11-05 alex # Please send patches to <config-patches@gnu.org>.
30 7633e2f8 2002-03-12 alex # Configuration subroutine to validate and canonicalize a configuration type.
31 7633e2f8 2002-03-12 alex # Supply the specified configuration type as an argument.
32 7633e2f8 2002-03-12 alex # If it is invalid, we print an error message on stderr and exit with code 1.
33 7633e2f8 2002-03-12 alex # Otherwise, we print the canonical config type on stdout and succeed.
35 ef392e7d 2012-02-27 alex # You can get the latest version of this script from:
36 afb17ff0 2020-01-02 alex # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
38 7633e2f8 2002-03-12 alex # This file is supposed to be the same for all GNU packages
39 7633e2f8 2002-03-12 alex # and recognize all the CPU types, system types and aliases
40 7633e2f8 2002-03-12 alex # that are meaningful with *any* GNU software.
41 7633e2f8 2002-03-12 alex # Each package is responsible for reporting which valid configurations
42 7633e2f8 2002-03-12 alex # it does not support. The user should be able to distinguish
43 7633e2f8 2002-03-12 alex # a failure to support a valid configuration from a meaningless
44 7633e2f8 2002-03-12 alex # configuration.
46 7633e2f8 2002-03-12 alex # The goal of this file is to map all the various variations of a given
47 7633e2f8 2002-03-12 alex # machine specification into a single specification in the form:
48 7633e2f8 2002-03-12 alex # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49 7633e2f8 2002-03-12 alex # or in some cases, the newer four-part form:
50 7633e2f8 2002-03-12 alex # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51 7633e2f8 2002-03-12 alex # It is wrong to echo any other type of specification.
53 afb17ff0 2020-01-02 alex me=$(echo "$0" | sed -e 's,.*/,,')
56 a335e480 2016-11-05 alex Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
58 7633e2f8 2002-03-12 alex Canonicalize a configuration name.
61 7633e2f8 2002-03-12 alex -h, --help print this help, then exit
62 7633e2f8 2002-03-12 alex -t, --time-stamp print date of last modification, then exit
63 7633e2f8 2002-03-12 alex -v, --version print version number, then exit
65 7633e2f8 2002-03-12 alex Report bugs and patches to <config-patches@gnu.org>."
68 7633e2f8 2002-03-12 alex GNU config.sub ($timestamp)
70 5d5fdfb3 2020-05-10 alex Copyright 1992-2020 Free Software Foundation, Inc.
72 7633e2f8 2002-03-12 alex This is free software; see the source for copying conditions. There is NO
73 7633e2f8 2002-03-12 alex warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
76 7633e2f8 2002-03-12 alex Try \`$me --help' for more information."
78 7633e2f8 2002-03-12 alex # Parse command line
79 7633e2f8 2002-03-12 alex while test $# -gt 0 ; do
81 7633e2f8 2002-03-12 alex --time-stamp | --time* | -t )
82 ac55a80d 2005-10-15 alex echo "$timestamp" ; exit ;;
83 7633e2f8 2002-03-12 alex --version | -v )
84 ac55a80d 2005-10-15 alex echo "$version" ; exit ;;
85 7633e2f8 2002-03-12 alex --help | --h* | -h )
86 ac55a80d 2005-10-15 alex echo "$usage"; exit ;;
87 7633e2f8 2002-03-12 alex -- ) # Stop option processing
88 7633e2f8 2002-03-12 alex shift; break ;;
89 7633e2f8 2002-03-12 alex - ) # Use stdin as input.
92 5d5fdfb3 2020-05-10 alex echo "$me: invalid option $1$help" >&2
96 7633e2f8 2002-03-12 alex # First pass through any local machine types.
106 7633e2f8 2002-03-12 alex 0) echo "$me: missing argument$help" >&2
109 7633e2f8 2002-03-12 alex *) echo "$me: too many arguments$help" >&2
113 5d5fdfb3 2020-05-10 alex # Split fields of configuration type
114 5d5fdfb3 2020-05-10 alex # shellcheck disable=SC2162
115 5d5fdfb3 2020-05-10 alex IFS="-" read field1 field2 field3 field4 <<EOF
119 5d5fdfb3 2020-05-10 alex # Separate into logical components for further validation
122 5d5fdfb3 2020-05-10 alex echo Invalid configuration \`"$1"\': more than four components >&2
126 5d5fdfb3 2020-05-10 alex basic_machine=$field1-$field2
127 afb17ff0 2020-01-02 alex basic_os=$field3-$field4
130 5d5fdfb3 2020-05-10 alex # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
132 5d5fdfb3 2020-05-10 alex maybe_os=$field2-$field3
133 5d5fdfb3 2020-05-10 alex case $maybe_os in
134 afb17ff0 2020-01-02 alex nto-qnx* | linux-* | uclinux-uclibc* \
135 5d5fdfb3 2020-05-10 alex | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
136 5d5fdfb3 2020-05-10 alex | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
137 5d5fdfb3 2020-05-10 alex | storm-chaos* | os2-emx* | rtmk-nova*)
138 5d5fdfb3 2020-05-10 alex basic_machine=$field1
139 afb17ff0 2020-01-02 alex basic_os=$maybe_os
141 5d5fdfb3 2020-05-10 alex android-linux)
142 5d5fdfb3 2020-05-10 alex basic_machine=$field1-unknown
143 afb17ff0 2020-01-02 alex basic_os=linux-android
146 5d5fdfb3 2020-05-10 alex basic_machine=$field1-$field2
147 afb17ff0 2020-01-02 alex basic_os=$field3
152 5d5fdfb3 2020-05-10 alex # A lone config we happen to match not fitting any pattern
153 5d5fdfb3 2020-05-10 alex case $field1-$field2 in
154 5d5fdfb3 2020-05-10 alex decstation-3100)
155 5d5fdfb3 2020-05-10 alex basic_machine=mips-dec
159 5d5fdfb3 2020-05-10 alex # Second component is usually, but not always the OS
160 5d5fdfb3 2020-05-10 alex case $field2 in
161 5d5fdfb3 2020-05-10 alex # Prevent following clause from handling this valid os
163 5d5fdfb3 2020-05-10 alex basic_machine=$field1
164 afb17ff0 2020-01-02 alex basic_os=$field2
166 5d5fdfb3 2020-05-10 alex # Manufacturers
167 5d5fdfb3 2020-05-10 alex dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
168 5d5fdfb3 2020-05-10 alex | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
169 5d5fdfb3 2020-05-10 alex | unicom* | ibm* | next | hp | isi* | apollo | altos* \
170 5d5fdfb3 2020-05-10 alex | convergent* | ncr* | news | 32* | 3600* | 3100* \
171 5d5fdfb3 2020-05-10 alex | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
172 5d5fdfb3 2020-05-10 alex | ultra | tti* | harris | dolphin | highlevel | gould \
173 5d5fdfb3 2020-05-10 alex | cbm | ns | masscomp | apple | axis | knuth | cray \
174 5d5fdfb3 2020-05-10 alex | microblaze* | sim | cisco \
175 5d5fdfb3 2020-05-10 alex | oki | wec | wrs | winbond)
176 5d5fdfb3 2020-05-10 alex basic_machine=$field1-$field2
180 5d5fdfb3 2020-05-10 alex basic_machine=$field1
181 afb17ff0 2020-01-02 alex basic_os=$field2
188 5d5fdfb3 2020-05-10 alex # Convert single-component short-hands not valid as part of
189 5d5fdfb3 2020-05-10 alex # multi-component configurations.
190 5d5fdfb3 2020-05-10 alex case $field1 in
192 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
193 afb17ff0 2020-01-02 alex basic_os=bsd
196 5d5fdfb3 2020-05-10 alex basic_machine=a29k-amd
197 afb17ff0 2020-01-02 alex basic_os=udi
200 5d5fdfb3 2020-05-10 alex basic_machine=m68010-adobe
201 afb17ff0 2020-01-02 alex basic_os=scout
204 5d5fdfb3 2020-05-10 alex basic_machine=fx80-alliant
207 5d5fdfb3 2020-05-10 alex altos | altos3068)
208 5d5fdfb3 2020-05-10 alex basic_machine=m68k-altos
212 5d5fdfb3 2020-05-10 alex basic_machine=a29k-none
213 afb17ff0 2020-01-02 alex basic_os=bsd
216 5d5fdfb3 2020-05-10 alex basic_machine=580-amdahl
217 afb17ff0 2020-01-02 alex basic_os=sysv
220 5d5fdfb3 2020-05-10 alex basic_machine=m68k-unknown
223 5d5fdfb3 2020-05-10 alex amigaos | amigados)
224 5d5fdfb3 2020-05-10 alex basic_machine=m68k-unknown
225 afb17ff0 2020-01-02 alex basic_os=amigaos
227 5d5fdfb3 2020-05-10 alex amigaunix | amix)
228 5d5fdfb3 2020-05-10 alex basic_machine=m68k-unknown
229 afb17ff0 2020-01-02 alex basic_os=sysv4
232 5d5fdfb3 2020-05-10 alex basic_machine=m68k-apollo
233 afb17ff0 2020-01-02 alex basic_os=sysv
235 5d5fdfb3 2020-05-10 alex apollo68bsd)
236 5d5fdfb3 2020-05-10 alex basic_machine=m68k-apollo
237 afb17ff0 2020-01-02 alex basic_os=bsd
240 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
241 afb17ff0 2020-01-02 alex basic_os=aros
244 5d5fdfb3 2020-05-10 alex basic_machine=m68k-apple
245 afb17ff0 2020-01-02 alex basic_os=aux
248 5d5fdfb3 2020-05-10 alex basic_machine=ns32k-sequent
249 afb17ff0 2020-01-02 alex basic_os=dynix
252 5d5fdfb3 2020-05-10 alex basic_machine=bfin-unknown
253 afb17ff0 2020-01-02 alex basic_os=linux
256 5d5fdfb3 2020-05-10 alex basic_machine=arm-unknown
257 afb17ff0 2020-01-02 alex basic_os=cegcc
260 5d5fdfb3 2020-05-10 alex basic_machine=c1-convex
261 afb17ff0 2020-01-02 alex basic_os=bsd
264 5d5fdfb3 2020-05-10 alex basic_machine=c2-convex
265 afb17ff0 2020-01-02 alex basic_os=bsd
267 5d5fdfb3 2020-05-10 alex convex-c32)
268 5d5fdfb3 2020-05-10 alex basic_machine=c32-convex
269 afb17ff0 2020-01-02 alex basic_os=bsd
271 5d5fdfb3 2020-05-10 alex convex-c34)
272 5d5fdfb3 2020-05-10 alex basic_machine=c34-convex
273 afb17ff0 2020-01-02 alex basic_os=bsd
275 5d5fdfb3 2020-05-10 alex convex-c38)
276 5d5fdfb3 2020-05-10 alex basic_machine=c38-convex
277 afb17ff0 2020-01-02 alex basic_os=bsd
280 5d5fdfb3 2020-05-10 alex basic_machine=j90-cray
281 afb17ff0 2020-01-02 alex basic_os=unicos
283 5d5fdfb3 2020-05-10 alex crds | unos)
284 5d5fdfb3 2020-05-10 alex basic_machine=m68k-crds
288 5d5fdfb3 2020-05-10 alex basic_machine=m68k-da30
291 5d5fdfb3 2020-05-10 alex decstation | pmax | pmin | dec3100 | decstatn)
292 5d5fdfb3 2020-05-10 alex basic_machine=mips-dec
296 5d5fdfb3 2020-05-10 alex basic_machine=m88k-motorola
297 afb17ff0 2020-01-02 alex basic_os=sysv3
300 5d5fdfb3 2020-05-10 alex basic_machine=i686-pc
301 afb17ff0 2020-01-02 alex basic_os=dicos
304 5d5fdfb3 2020-05-10 alex basic_machine=i586-pc
305 afb17ff0 2020-01-02 alex basic_os=msdosdjgpp
308 5d5fdfb3 2020-05-10 alex basic_machine=a29k-amd
309 afb17ff0 2020-01-02 alex basic_os=ebmon
311 5d5fdfb3 2020-05-10 alex es1800 | OSE68k | ose68k | ose | OSE)
312 5d5fdfb3 2020-05-10 alex basic_machine=m68k-ericsson
313 afb17ff0 2020-01-02 alex basic_os=ose
316 5d5fdfb3 2020-05-10 alex basic_machine=tron-gmicro
317 afb17ff0 2020-01-02 alex basic_os=sysv
320 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
321 afb17ff0 2020-01-02 alex basic_os=go32
324 5d5fdfb3 2020-05-10 alex basic_machine=h8300-hitachi
325 afb17ff0 2020-01-02 alex basic_os=hms
328 5d5fdfb3 2020-05-10 alex basic_machine=h8300-hitachi
329 afb17ff0 2020-01-02 alex basic_os=xray
332 5d5fdfb3 2020-05-10 alex basic_machine=h8500-hitachi
333 afb17ff0 2020-01-02 alex basic_os=hms
336 5d5fdfb3 2020-05-10 alex basic_machine=m88k-harris
337 afb17ff0 2020-01-02 alex basic_os=sysv3
339 5d5fdfb3 2020-05-10 alex hp300 | hp300hpux)
340 5d5fdfb3 2020-05-10 alex basic_machine=m68k-hp
341 afb17ff0 2020-01-02 alex basic_os=hpux
344 5d5fdfb3 2020-05-10 alex basic_machine=m68k-hp
345 afb17ff0 2020-01-02 alex basic_os=bsd
348 5d5fdfb3 2020-05-10 alex basic_machine=hppa1.1-hp
349 afb17ff0 2020-01-02 alex basic_os=osf
352 5d5fdfb3 2020-05-10 alex basic_machine=hppa1.1-hp
353 afb17ff0 2020-01-02 alex basic_os=proelf
356 5d5fdfb3 2020-05-10 alex basic_machine=i386-mach
357 afb17ff0 2020-01-02 alex basic_os=mach
359 5d5fdfb3 2020-05-10 alex isi68 | isi)
360 5d5fdfb3 2020-05-10 alex basic_machine=m68k-isi
361 afb17ff0 2020-01-02 alex basic_os=sysv
364 5d5fdfb3 2020-05-10 alex basic_machine=m68k-unknown
365 afb17ff0 2020-01-02 alex basic_os=linux
367 5d5fdfb3 2020-05-10 alex magnum | m3230)
368 5d5fdfb3 2020-05-10 alex basic_machine=mips-mips
369 afb17ff0 2020-01-02 alex basic_os=sysv
372 5d5fdfb3 2020-05-10 alex basic_machine=ns32k-utek
373 afb17ff0 2020-01-02 alex basic_os=sysv
376 5d5fdfb3 2020-05-10 alex basic_machine=x86_64-pc
377 afb17ff0 2020-01-02 alex basic_os=mingw64
380 5d5fdfb3 2020-05-10 alex basic_machine=i686-pc
381 afb17ff0 2020-01-02 alex basic_os=mingw32
384 5d5fdfb3 2020-05-10 alex basic_machine=arm-unknown
385 afb17ff0 2020-01-02 alex basic_os=mingw32ce
388 5d5fdfb3 2020-05-10 alex basic_machine=m68k-rom68k
389 afb17ff0 2020-01-02 alex basic_os=coff
392 5d5fdfb3 2020-05-10 alex basic_machine=powerpc-unknown
393 afb17ff0 2020-01-02 alex basic_os=morphos
396 5d5fdfb3 2020-05-10 alex basic_machine=moxie-unknown
397 afb17ff0 2020-01-02 alex basic_os=moxiebox
400 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
401 afb17ff0 2020-01-02 alex basic_os=msdos
404 5d5fdfb3 2020-05-10 alex basic_machine=i686-pc
405 afb17ff0 2020-01-02 alex basic_os=msys
408 5d5fdfb3 2020-05-10 alex basic_machine=i370-ibm
409 afb17ff0 2020-01-02 alex basic_os=mvs
412 5d5fdfb3 2020-05-10 alex basic_machine=le32-unknown
413 afb17ff0 2020-01-02 alex basic_os=nacl
416 5d5fdfb3 2020-05-10 alex basic_machine=i486-ncr
417 afb17ff0 2020-01-02 alex basic_os=sysv4
420 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
421 afb17ff0 2020-01-02 alex basic_os=netbsd
424 5d5fdfb3 2020-05-10 alex basic_machine=armv4l-rebel
425 afb17ff0 2020-01-02 alex basic_os=linux
427 5d5fdfb3 2020-05-10 alex news | news700 | news800 | news900)
428 5d5fdfb3 2020-05-10 alex basic_machine=m68k-sony
429 afb17ff0 2020-01-02 alex basic_os=newsos
432 5d5fdfb3 2020-05-10 alex basic_machine=m68030-sony
433 afb17ff0 2020-01-02 alex basic_os=newsos
436 5d5fdfb3 2020-05-10 alex basic_machine=v70-nec
437 afb17ff0 2020-01-02 alex basic_os=sysv
440 5d5fdfb3 2020-05-10 alex basic_machine=m68k-harris
441 afb17ff0 2020-01-02 alex basic_os=cxux
444 5d5fdfb3 2020-05-10 alex basic_machine=m88k-harris
445 afb17ff0 2020-01-02 alex basic_os=cxux
448 5d5fdfb3 2020-05-10 alex basic_machine=i960-intel
449 afb17ff0 2020-01-02 alex basic_os=nindy
452 5d5fdfb3 2020-05-10 alex basic_machine=i960-intel
453 afb17ff0 2020-01-02 alex basic_os=mon960
456 5d5fdfb3 2020-05-10 alex basic_machine=mips-compaq
457 afb17ff0 2020-01-02 alex basic_os=nonstopux
460 5d5fdfb3 2020-05-10 alex basic_machine=powerpc-ibm
461 afb17ff0 2020-01-02 alex basic_os=os400
463 5d5fdfb3 2020-05-10 alex OSE68000 | ose68000)
464 5d5fdfb3 2020-05-10 alex basic_machine=m68000-ericsson
465 afb17ff0 2020-01-02 alex basic_os=ose
468 5d5fdfb3 2020-05-10 alex basic_machine=m68k-none
469 afb17ff0 2020-01-02 alex basic_os=os68k
472 5d5fdfb3 2020-05-10 alex basic_machine=i860-intel
473 afb17ff0 2020-01-02 alex basic_os=osf
476 5d5fdfb3 2020-05-10 alex basic_machine=hppa-unknown
477 afb17ff0 2020-01-02 alex basic_os=linux
480 afb17ff0 2020-01-02 alex basic_machine=mipsallegrexel-sony
481 afb17ff0 2020-01-02 alex basic_os=psp
484 5d5fdfb3 2020-05-10 alex basic_machine=i586-unknown
485 afb17ff0 2020-01-02 alex basic_os=pw32
487 5d5fdfb3 2020-05-10 alex rdos | rdos64)
488 5d5fdfb3 2020-05-10 alex basic_machine=x86_64-pc
489 afb17ff0 2020-01-02 alex basic_os=rdos
492 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
493 afb17ff0 2020-01-02 alex basic_os=rdos
496 5d5fdfb3 2020-05-10 alex basic_machine=m68k-rom68k
497 afb17ff0 2020-01-02 alex basic_os=coff
500 5d5fdfb3 2020-05-10 alex basic_machine=a29k-amd
501 afb17ff0 2020-01-02 alex basic_os=udi
504 5d5fdfb3 2020-05-10 alex basic_machine=mips-sei
505 afb17ff0 2020-01-02 alex basic_os=seiux
508 5d5fdfb3 2020-05-10 alex basic_machine=i386-sequent
512 5d5fdfb3 2020-05-10 alex basic_machine=m68k-bull
513 afb17ff0 2020-01-02 alex basic_os=sysv2
516 5d5fdfb3 2020-05-10 alex basic_machine=m68k-tandem
520 5d5fdfb3 2020-05-10 alex basic_machine=i860-stratus
521 afb17ff0 2020-01-02 alex basic_os=sysv4
524 5d5fdfb3 2020-05-10 alex basic_machine=m68000-sun
528 5d5fdfb3 2020-05-10 alex basic_machine=m68000-sun
529 afb17ff0 2020-01-02 alex basic_os=sunos3
532 5d5fdfb3 2020-05-10 alex basic_machine=m68000-sun
533 afb17ff0 2020-01-02 alex basic_os=sunos4
536 5d5fdfb3 2020-05-10 alex basic_machine=m68k-sun
540 5d5fdfb3 2020-05-10 alex basic_machine=m68k-sun
541 afb17ff0 2020-01-02 alex basic_os=sunos3
544 5d5fdfb3 2020-05-10 alex basic_machine=m68k-sun
545 afb17ff0 2020-01-02 alex basic_os=sunos4
548 5d5fdfb3 2020-05-10 alex basic_machine=sparc-sun
552 5d5fdfb3 2020-05-10 alex basic_machine=sparc-sun
553 afb17ff0 2020-01-02 alex basic_os=sunos3
556 5d5fdfb3 2020-05-10 alex basic_machine=sparc-sun
557 afb17ff0 2020-01-02 alex basic_os=sunos4
560 5d5fdfb3 2020-05-10 alex basic_machine=sparc-sun
561 afb17ff0 2020-01-02 alex basic_os=solaris2
563 5d5fdfb3 2020-05-10 alex sun386 | sun386i | roadrunner)
564 5d5fdfb3 2020-05-10 alex basic_machine=i386-sun
568 5d5fdfb3 2020-05-10 alex basic_machine=sv1-cray
569 afb17ff0 2020-01-02 alex basic_os=unicos
572 5d5fdfb3 2020-05-10 alex basic_machine=i386-sequent
573 afb17ff0 2020-01-02 alex basic_os=dynix
576 5d5fdfb3 2020-05-10 alex basic_machine=alphaev5-cray
577 afb17ff0 2020-01-02 alex basic_os=unicos
580 5d5fdfb3 2020-05-10 alex basic_machine=t90-cray
581 afb17ff0 2020-01-02 alex basic_os=unicos
584 5d5fdfb3 2020-05-10 alex basic_machine=pdp10-xkl
585 afb17ff0 2020-01-02 alex basic_os=tops20
588 5d5fdfb3 2020-05-10 alex basic_machine=s390x-ibm
589 afb17ff0 2020-01-02 alex basic_os=tpf
592 5d5fdfb3 2020-05-10 alex basic_machine=a29k-amd
593 afb17ff0 2020-01-02 alex basic_os=udi
596 5d5fdfb3 2020-05-10 alex basic_machine=a29k-nyu
597 afb17ff0 2020-01-02 alex basic_os=sym1
599 5d5fdfb3 2020-05-10 alex v810 | necv810)
600 5d5fdfb3 2020-05-10 alex basic_machine=v810-nec
601 afb17ff0 2020-01-02 alex basic_os=none
604 5d5fdfb3 2020-05-10 alex basic_machine=vax-dec
605 afb17ff0 2020-01-02 alex basic_os=sysv
608 5d5fdfb3 2020-05-10 alex basic_machine=vax-dec
609 afb17ff0 2020-01-02 alex basic_os=vms
612 5d5fdfb3 2020-05-10 alex basic_machine=i386-pc
613 afb17ff0 2020-01-02 alex basic_os=vsta
615 5d5fdfb3 2020-05-10 alex vxworks960)
616 5d5fdfb3 2020-05-10 alex basic_machine=i960-wrs
617 afb17ff0 2020-01-02 alex basic_os=vxworks
620 5d5fdfb3 2020-05-10 alex basic_machine=m68k-wrs
621 afb17ff0 2020-01-02 alex basic_os=vxworks
623 5d5fdfb3 2020-05-10 alex vxworks29k)
624 5d5fdfb3 2020-05-10 alex basic_machine=a29k-wrs
625 afb17ff0 2020-01-02 alex basic_os=vxworks
628 5d5fdfb3 2020-05-10 alex basic_machine=i686-pc
629 afb17ff0 2020-01-02 alex basic_os=mingw32
632 5d5fdfb3 2020-05-10 alex basic_machine=ymp-cray
633 afb17ff0 2020-01-02 alex basic_os=unicos
636 5d5fdfb3 2020-05-10 alex basic_machine=$1
643 5d5fdfb3 2020-05-10 alex # Decode 1-component or ad-hoc basic machines
644 5d5fdfb3 2020-05-10 alex case $basic_machine in
645 5d5fdfb3 2020-05-10 alex # Here we handle the default manufacturer of certain CPU types. It is in
646 5d5fdfb3 2020-05-10 alex # some cases the only manufacturer, in others, it is the most popular.
648 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
649 5d5fdfb3 2020-05-10 alex vendor=winbond
652 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
656 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
664 5d5fdfb3 2020-05-10 alex cpu=clipper
665 5d5fdfb3 2020-05-10 alex vendor=highlevel
667 5d5fdfb3 2020-05-10 alex mac | mpw | mac-mpw)
669 5d5fdfb3 2020-05-10 alex vendor=apple
671 5d5fdfb3 2020-05-10 alex pmac | pmac-mpw)
672 5d5fdfb3 2020-05-10 alex cpu=powerpc
673 5d5fdfb3 2020-05-10 alex vendor=apple
676 7633e2f8 2002-03-12 alex # Recognize the various machine names and aliases which stand
677 7633e2f8 2002-03-12 alex # for a CPU type and a company and sometimes even an OS.
678 7633e2f8 2002-03-12 alex 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
687 5d5fdfb3 2020-05-10 alex cpu=powerpc
689 afb17ff0 2020-01-02 alex basic_os=cnk
691 5d5fdfb3 2020-05-10 alex decsystem10* | dec10*)
694 afb17ff0 2020-01-02 alex basic_os=tops10
696 5d5fdfb3 2020-05-10 alex decsystem20* | dec20*)
699 afb17ff0 2020-01-02 alex basic_os=tops20
701 5d5fdfb3 2020-05-10 alex delta | 3300 | motorola-3300 | motorola-delta \
702 5d5fdfb3 2020-05-10 alex | 3300-motorola | delta-motorola)
704 5d5fdfb3 2020-05-10 alex vendor=motorola
708 5d5fdfb3 2020-05-10 alex vendor=bull
709 afb17ff0 2020-01-02 alex basic_os=sysv3
711 5d5fdfb3 2020-05-10 alex encore | umax | mmax)
713 5d5fdfb3 2020-05-10 alex vendor=encore
717 5d5fdfb3 2020-05-10 alex vendor=elxsi
718 afb17ff0 2020-01-02 alex basic_os=${basic_os:-bsd}
722 5d5fdfb3 2020-05-10 alex vendor=alliant
728 5d5fdfb3 2020-05-10 alex h3050r* | hiux*)
729 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
730 5d5fdfb3 2020-05-10 alex vendor=hitachi
731 afb17ff0 2020-01-02 alex basic_os=hiuxwe2
733 5d5fdfb3 2020-05-10 alex hp3k9[0-9][0-9] | hp9[0-9][0-9])
734 5d5fdfb3 2020-05-10 alex cpu=hppa1.0
737 5d5fdfb3 2020-05-10 alex hp9k2[0-9][0-9] | hp9k31[0-9])
741 5d5fdfb3 2020-05-10 alex hp9k3[2-9][0-9])
745 5d5fdfb3 2020-05-10 alex hp9k6[0-9][0-9] | hp6[0-9][0-9])
746 5d5fdfb3 2020-05-10 alex cpu=hppa1.0
749 5d5fdfb3 2020-05-10 alex hp9k7[0-79][0-9] | hp7[0-79][0-9])
750 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
753 5d5fdfb3 2020-05-10 alex hp9k78[0-9] | hp78[0-9])
754 5d5fdfb3 2020-05-10 alex # FIXME: really hppa2.0-hp
755 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
758 5d5fdfb3 2020-05-10 alex hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
759 5d5fdfb3 2020-05-10 alex # FIXME: really hppa2.0-hp
760 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
763 5d5fdfb3 2020-05-10 alex hp9k8[0-9][13679] | hp8[0-9][13679])
764 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
767 5d5fdfb3 2020-05-10 alex hp9k8[0-9][0-9] | hp8[0-9][0-9])
768 5d5fdfb3 2020-05-10 alex cpu=hppa1.0
772 afb17ff0 2020-01-02 alex cpu=$(echo "$1" | sed -e 's/86.*/86/')
774 afb17ff0 2020-01-02 alex basic_os=sysv32
777 afb17ff0 2020-01-02 alex cpu=$(echo "$1" | sed -e 's/86.*/86/')
779 afb17ff0 2020-01-02 alex basic_os=sysv4
782 afb17ff0 2020-01-02 alex cpu=$(echo "$1" | sed -e 's/86.*/86/')
784 afb17ff0 2020-01-02 alex basic_os=sysv
787 afb17ff0 2020-01-02 alex cpu=$(echo "$1" | sed -e 's/86.*/86/')
789 afb17ff0 2020-01-02 alex basic_os=solaris2
791 5d5fdfb3 2020-05-10 alex j90 | j90-cray)
793 5d5fdfb3 2020-05-10 alex vendor=cray
794 afb17ff0 2020-01-02 alex basic_os=${basic_os:-unicos}
796 5d5fdfb3 2020-05-10 alex iris | iris4d)
799 afb17ff0 2020-01-02 alex case $basic_os in
803 afb17ff0 2020-01-02 alex basic_os=irix4
809 5d5fdfb3 2020-05-10 alex vendor=convergent
811 5d5fdfb3 2020-05-10 alex *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
813 5d5fdfb3 2020-05-10 alex vendor=atari
814 afb17ff0 2020-01-02 alex basic_os=mint
816 5d5fdfb3 2020-05-10 alex news-3600 | risc-news)
818 5d5fdfb3 2020-05-10 alex vendor=sony
819 afb17ff0 2020-01-02 alex basic_os=newsos
821 5d5fdfb3 2020-05-10 alex next | m*-next)
823 5d5fdfb3 2020-05-10 alex vendor=next
824 afb17ff0 2020-01-02 alex case $basic_os in
830 afb17ff0 2020-01-02 alex basic_os=nextstep2
833 afb17ff0 2020-01-02 alex basic_os=nextstep3
839 5d5fdfb3 2020-05-10 alex vendor=gould
841 5d5fdfb3 2020-05-10 alex op50n-* | op60c-*)
842 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
844 afb17ff0 2020-01-02 alex basic_os=proelf
846 5d5fdfb3 2020-05-10 alex pa-hitachi)
847 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
848 5d5fdfb3 2020-05-10 alex vendor=hitachi
849 afb17ff0 2020-01-02 alex basic_os=hiuxwe2
861 5d5fdfb3 2020-05-10 alex vendor=pc532
865 5d5fdfb3 2020-05-10 alex vendor=gould
877 5d5fdfb3 2020-05-10 alex vendor=siemens
879 5d5fdfb3 2020-05-10 alex rtpc | rtpc-*)
884 5d5fdfb3 2020-05-10 alex cpu=mipsisa32
886 afb17ff0 2020-01-02 alex basic_os=${basic_os:-elf}
889 5d5fdfb3 2020-05-10 alex cpu=sparclite
891 afb17ff0 2020-01-02 alex basic_os=vxworks
893 5d5fdfb3 2020-05-10 alex tower | tower-32)
897 5d5fdfb3 2020-05-10 alex vpp*|vx|vx-*)
899 5d5fdfb3 2020-05-10 alex vendor=fujitsu
906 5d5fdfb3 2020-05-10 alex cpu=hppa1.1
907 5d5fdfb3 2020-05-10 alex vendor=winbond
908 afb17ff0 2020-01-02 alex basic_os=proelf
912 5d5fdfb3 2020-05-10 alex vendor=none
914 5d5fdfb3 2020-05-10 alex leon|leon[3-9])
916 5d5fdfb3 2020-05-10 alex vendor=$basic_machine
918 5d5fdfb3 2020-05-10 alex leon-*|leon[3-9]-*)
920 afb17ff0 2020-01-02 alex vendor=$(echo "$basic_machine" | sed 's/-.*//')
924 5d5fdfb3 2020-05-10 alex # shellcheck disable=SC2162
925 5d5fdfb3 2020-05-10 alex IFS="-" read cpu vendor <<EOF
926 5d5fdfb3 2020-05-10 alex $basic_machine
929 5d5fdfb3 2020-05-10 alex # We use `pc' rather than `unknown'
930 5d5fdfb3 2020-05-10 alex # because (1) that's what they normally are, and
931 5d5fdfb3 2020-05-10 alex # (2) the word "unknown" tends to confuse beginning users.
932 5d5fdfb3 2020-05-10 alex i*86 | x86_64)
933 5d5fdfb3 2020-05-10 alex cpu=$basic_machine
936 5d5fdfb3 2020-05-10 alex # These rules are duplicated from below for sake of the special case above;
937 5d5fdfb3 2020-05-10 alex # i.e. things that normalized to x86 arches should also default to "pc"
942 5d5fdfb3 2020-05-10 alex x64 | amd64)
946 5d5fdfb3 2020-05-10 alex # Recognize the basic CPU types without company name.
948 5d5fdfb3 2020-05-10 alex cpu=$basic_machine
949 5d5fdfb3 2020-05-10 alex vendor=unknown
953 5d5fdfb3 2020-05-10 alex unset -v basic_machine
955 5d5fdfb3 2020-05-10 alex # Decode basic machines in the full and proper CPU-Company form.
956 5d5fdfb3 2020-05-10 alex case $cpu-$vendor in
957 5d5fdfb3 2020-05-10 alex # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
958 5d5fdfb3 2020-05-10 alex # some cases the only manufacturer, in others, it is the most popular.
959 5d5fdfb3 2020-05-10 alex craynv-unknown)
960 5d5fdfb3 2020-05-10 alex vendor=cray
961 afb17ff0 2020-01-02 alex basic_os=${basic_os:-unicosmp}
963 5d5fdfb3 2020-05-10 alex c90-unknown | c90-cray)
964 5d5fdfb3 2020-05-10 alex vendor=cray
965 afb17ff0 2020-01-02 alex basic_os=${Basic_os:-unicos}
967 5d5fdfb3 2020-05-10 alex fx80-unknown)
968 5d5fdfb3 2020-05-10 alex vendor=alliant
970 5d5fdfb3 2020-05-10 alex romp-unknown)
973 5d5fdfb3 2020-05-10 alex mmix-unknown)
974 5d5fdfb3 2020-05-10 alex vendor=knuth
976 5d5fdfb3 2020-05-10 alex microblaze-unknown | microblazeel-unknown)
977 5d5fdfb3 2020-05-10 alex vendor=xilinx
979 5d5fdfb3 2020-05-10 alex rs6000-unknown)
982 5d5fdfb3 2020-05-10 alex vax-unknown)
985 5d5fdfb3 2020-05-10 alex pdp11-unknown)
988 5d5fdfb3 2020-05-10 alex we32k-unknown)
991 5d5fdfb3 2020-05-10 alex cydra-unknown)
992 5d5fdfb3 2020-05-10 alex vendor=cydrome
997 5d5fdfb3 2020-05-10 alex orion-unknown)
998 5d5fdfb3 2020-05-10 alex vendor=highlevel
1000 5d5fdfb3 2020-05-10 alex xps-unknown | xps100-unknown)
1001 5d5fdfb3 2020-05-10 alex cpu=xps100
1002 5d5fdfb3 2020-05-10 alex vendor=honeywell
1005 5d5fdfb3 2020-05-10 alex # Here we normalize CPU types with a missing or matching vendor
1006 5d5fdfb3 2020-05-10 alex dpx20-unknown | dpx20-bull)
1007 5d5fdfb3 2020-05-10 alex cpu=rs6000
1008 5d5fdfb3 2020-05-10 alex vendor=bull
1009 afb17ff0 2020-01-02 alex basic_os=${basic_os:-bosx}
1012 5d5fdfb3 2020-05-10 alex # Here we normalize CPU types irrespective of the vendor
1014 5d5fdfb3 2020-05-10 alex cpu=x86_64
1016 5d5fdfb3 2020-05-10 alex blackfin-*)
1018 afb17ff0 2020-01-02 alex basic_os=linux
1021 5d5fdfb3 2020-05-10 alex cpu=tic54x
1024 5d5fdfb3 2020-05-10 alex cpu=tic55x
1029 7071476d 2017-01-20 alex e500v[12]-*)
1030 5d5fdfb3 2020-05-10 alex cpu=powerpc
1031 afb17ff0 2020-01-02 alex basic_os=${basic_os}"spe"
1034 5d5fdfb3 2020-05-10 alex cpu=mips64
1039 5d5fdfb3 2020-05-10 alex m68knommu-*)
1041 afb17ff0 2020-01-02 alex basic_os=linux
1043 5d5fdfb3 2020-05-10 alex m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1046 5d5fdfb3 2020-05-10 alex openrisc-*)
1051 afb17ff0 2020-01-02 alex basic_os=linux
1053 5d5fdfb3 2020-05-10 alex pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1056 5d5fdfb3 2020-05-10 alex pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1059 5d5fdfb3 2020-05-10 alex pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1062 5d5fdfb3 2020-05-10 alex pentium4-*)
1068 5d5fdfb3 2020-05-10 alex ppc-* | ppcbe-*)
1069 5d5fdfb3 2020-05-10 alex cpu=powerpc
1071 5d5fdfb3 2020-05-10 alex ppcle-* | powerpclittle-*)
1072 5d5fdfb3 2020-05-10 alex cpu=powerpcle
1075 5d5fdfb3 2020-05-10 alex cpu=powerpc64
1077 5d5fdfb3 2020-05-10 alex ppc64le-* | powerpc64little-*)
1078 5d5fdfb3 2020-05-10 alex cpu=powerpc64le
1081 5d5fdfb3 2020-05-10 alex cpu=mipsisa64sb1
1084 5d5fdfb3 2020-05-10 alex cpu=mipsisa64sb1el
1086 5d5fdfb3 2020-05-10 alex sh5e[lb]-*)
1087 afb17ff0 2020-01-02 alex cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/')
1092 5d5fdfb3 2020-05-10 alex strongarm-* | thumb-*)
1096 5d5fdfb3 2020-05-10 alex cpu=mipstx39
1099 5d5fdfb3 2020-05-10 alex cpu=mipstx39el
1102 5d5fdfb3 2020-05-10 alex cpu=x86_64
1104 5d5fdfb3 2020-05-10 alex xscale-* | xscalee[bl]-*)
1105 afb17ff0 2020-01-02 alex cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
1108 afb17ff0 2020-01-02 alex cpu=aarch64
1111 5d5fdfb3 2020-05-10 alex # Recognize the canonical CPU Types that limit and/or modify the
1112 5d5fdfb3 2020-05-10 alex # company names they are paired with.
1114 afb17ff0 2020-01-02 alex basic_os=${basic_os:-elf}
1116 5d5fdfb3 2020-05-10 alex crisv32-* | etraxfs*-*)
1117 5d5fdfb3 2020-05-10 alex cpu=crisv32
1118 5d5fdfb3 2020-05-10 alex vendor=axis
1120 5d5fdfb3 2020-05-10 alex cris-* | etrax*-*)
1122 5d5fdfb3 2020-05-10 alex vendor=axis
1125 afb17ff0 2020-01-02 alex basic_os=${basic_os:-elf}
1127 5d5fdfb3 2020-05-10 alex neo-tandem)
1129 5d5fdfb3 2020-05-10 alex vendor=tandem
1131 5d5fdfb3 2020-05-10 alex nse-tandem)
1133 5d5fdfb3 2020-05-10 alex vendor=tandem
1135 5d5fdfb3 2020-05-10 alex nsr-tandem)
1137 5d5fdfb3 2020-05-10 alex vendor=tandem
1139 5d5fdfb3 2020-05-10 alex nsv-tandem)
1141 5d5fdfb3 2020-05-10 alex vendor=tandem
1143 5d5fdfb3 2020-05-10 alex nsx-tandem)
1145 5d5fdfb3 2020-05-10 alex vendor=tandem
1147 afb17ff0 2020-01-02 alex mipsallegrexel-sony)
1148 afb17ff0 2020-01-02 alex cpu=mipsallegrexel
1149 afb17ff0 2020-01-02 alex vendor=sony
1152 afb17ff0 2020-01-02 alex basic_os=${basic_os:-linux-gnu}
1156 5d5fdfb3 2020-05-10 alex # Recognize the canonical CPU types that are allowed with any
1157 5d5fdfb3 2020-05-10 alex # company name.
1158 5d5fdfb3 2020-05-10 alex case $cpu in
1159 5d5fdfb3 2020-05-10 alex 1750a | 580 \
1161 5d5fdfb3 2020-05-10 alex | aarch64 | aarch64_be \
1162 5d5fdfb3 2020-05-10 alex | abacus \
1163 5d5fdfb3 2020-05-10 alex | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1164 5d5fdfb3 2020-05-10 alex | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1165 5d5fdfb3 2020-05-10 alex | alphapca5[67] | alpha64pca5[67] \
1166 5d5fdfb3 2020-05-10 alex | am33_2.0 \
1167 5d5fdfb3 2020-05-10 alex | amdgcn \
1168 5d5fdfb3 2020-05-10 alex | arc | arceb \
1169 afb17ff0 2020-01-02 alex | arm | arm[lb]e | arme[lb] | armv* \
1170 5d5fdfb3 2020-05-10 alex | avr | avr32 \
1173 5d5fdfb3 2020-05-10 alex | be32 | be64 \
1174 5d5fdfb3 2020-05-10 alex | bfin | bpf | bs2000 \
1175 5d5fdfb3 2020-05-10 alex | c[123]* | c30 | [cjt]90 | c4x \
1176 5d5fdfb3 2020-05-10 alex | c8051 | clipper | craynv | csky | cydra \
1177 5d5fdfb3 2020-05-10 alex | d10v | d30v | dlx | dsp16xx \
1178 5d5fdfb3 2020-05-10 alex | e2k | elxsi | epiphany \
1179 5d5fdfb3 2020-05-10 alex | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1180 5d5fdfb3 2020-05-10 alex | h8300 | h8500 \
1181 5d5fdfb3 2020-05-10 alex | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1182 5d5fdfb3 2020-05-10 alex | hexagon \
1183 5d5fdfb3 2020-05-10 alex | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1184 5d5fdfb3 2020-05-10 alex | ip2k | iq2000 \
1186 5d5fdfb3 2020-05-10 alex | le32 | le64 \
1188 afb17ff0 2020-01-02 alex | loongarch32 | loongarch64 | loongarchx32 \
1189 5d5fdfb3 2020-05-10 alex | m32c | m32r | m32rle \
1190 5d5fdfb3 2020-05-10 alex | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1191 5d5fdfb3 2020-05-10 alex | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1192 5d5fdfb3 2020-05-10 alex | m88110 | m88k | maxq | mb | mcore | mep | metag \
1193 5d5fdfb3 2020-05-10 alex | microblaze | microblazeel \
1194 5d5fdfb3 2020-05-10 alex | mips | mipsbe | mipseb | mipsel | mipsle \
1195 5d5fdfb3 2020-05-10 alex | mips16 \
1196 5d5fdfb3 2020-05-10 alex | mips64 | mips64eb | mips64el \
1197 5d5fdfb3 2020-05-10 alex | mips64octeon | mips64octeonel \
1198 5d5fdfb3 2020-05-10 alex | mips64orion | mips64orionel \
1199 5d5fdfb3 2020-05-10 alex | mips64r5900 | mips64r5900el \
1200 5d5fdfb3 2020-05-10 alex | mips64vr | mips64vrel \
1201 5d5fdfb3 2020-05-10 alex | mips64vr4100 | mips64vr4100el \
1202 5d5fdfb3 2020-05-10 alex | mips64vr4300 | mips64vr4300el \
1203 5d5fdfb3 2020-05-10 alex | mips64vr5000 | mips64vr5000el \
1204 5d5fdfb3 2020-05-10 alex | mips64vr5900 | mips64vr5900el \
1205 5d5fdfb3 2020-05-10 alex | mipsisa32 | mipsisa32el \
1206 5d5fdfb3 2020-05-10 alex | mipsisa32r2 | mipsisa32r2el \
1207 5d5fdfb3 2020-05-10 alex | mipsisa32r6 | mipsisa32r6el \
1208 5d5fdfb3 2020-05-10 alex | mipsisa64 | mipsisa64el \
1209 5d5fdfb3 2020-05-10 alex | mipsisa64r2 | mipsisa64r2el \
1210 5d5fdfb3 2020-05-10 alex | mipsisa64r6 | mipsisa64r6el \
1211 5d5fdfb3 2020-05-10 alex | mipsisa64sb1 | mipsisa64sb1el \
1212 5d5fdfb3 2020-05-10 alex | mipsisa64sr71k | mipsisa64sr71kel \
1213 5d5fdfb3 2020-05-10 alex | mipsr5900 | mipsr5900el \
1214 5d5fdfb3 2020-05-10 alex | mipstx39 | mipstx39el \
1216 5d5fdfb3 2020-05-10 alex | mn10200 | mn10300 \
1219 5d5fdfb3 2020-05-10 alex | msp430 \
1220 5d5fdfb3 2020-05-10 alex | nds32 | nds32le | nds32be \
1222 5d5fdfb3 2020-05-10 alex | nios | nios2 | nios2eb | nios2el \
1223 5d5fdfb3 2020-05-10 alex | none | np1 | ns16k | ns32k | nvptx \
1228 5d5fdfb3 2020-05-10 alex | picochip \
1229 5d5fdfb3 2020-05-10 alex | pdp10 | pdp11 | pj | pjl | pn | power \
1230 5d5fdfb3 2020-05-10 alex | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1232 5d5fdfb3 2020-05-10 alex | pyramid \
1233 5d5fdfb3 2020-05-10 alex | riscv | riscv32 | riscv64 \
1234 5d5fdfb3 2020-05-10 alex | rl78 | romp | rs6000 | rx \
1235 afb17ff0 2020-01-02 alex | s390 | s390x \
1237 5d5fdfb3 2020-05-10 alex | sh | shl \
1238 5d5fdfb3 2020-05-10 alex | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1239 5d5fdfb3 2020-05-10 alex | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1240 5d5fdfb3 2020-05-10 alex | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1241 5d5fdfb3 2020-05-10 alex | sparclite \
1242 5d5fdfb3 2020-05-10 alex | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1245 afb17ff0 2020-01-02 alex | thumbv7* \
1246 5d5fdfb3 2020-05-10 alex | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1248 5d5fdfb3 2020-05-10 alex | ubicom32 \
1249 5d5fdfb3 2020-05-10 alex | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1251 5d5fdfb3 2020-05-10 alex | visium \
1253 5d5fdfb3 2020-05-10 alex | wasm32 | wasm64 \
1255 5d5fdfb3 2020-05-10 alex | x86 | x86_64 | xc16x | xgate | xps100 \
1256 5d5fdfb3 2020-05-10 alex | xstormy16 | xtensa* \
1258 5d5fdfb3 2020-05-10 alex | z8k | z80)
1262 5d5fdfb3 2020-05-10 alex echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1269 5d5fdfb3 2020-05-10 alex # Here we canonicalize certain aliases for manufacturers.
1270 5d5fdfb3 2020-05-10 alex case $vendor in
1272 5d5fdfb3 2020-05-10 alex vendor=dec
1274 5d5fdfb3 2020-05-10 alex commodore*)
1275 5d5fdfb3 2020-05-10 alex vendor=cbm
1281 5d5fdfb3 2020-05-10 alex # Decode manufacturer-specific aliases for certain operating systems.
1283 afb17ff0 2020-01-02 alex if test x$basic_os != x
1286 afb17ff0 2020-01-02 alex # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1288 afb17ff0 2020-01-02 alex case $basic_os in
1289 afb17ff0 2020-01-02 alex gnu/linux*)
1290 afb17ff0 2020-01-02 alex kernel=linux
1291 afb17ff0 2020-01-02 alex os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|')
1294 afb17ff0 2020-01-02 alex kernel=os2
1295 afb17ff0 2020-01-02 alex os=$(echo $basic_os | sed -e 's|os2-emx|emx|')
1298 afb17ff0 2020-01-02 alex kernel=nto
1299 afb17ff0 2020-01-02 alex os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|')
1302 afb17ff0 2020-01-02 alex # shellcheck disable=SC2162
1303 afb17ff0 2020-01-02 alex IFS="-" read kernel os <<EOF
1307 afb17ff0 2020-01-02 alex # Default OS when just kernel was specified
1309 afb17ff0 2020-01-02 alex kernel=nto
1310 afb17ff0 2020-01-02 alex os=$(echo $basic_os | sed -e 's|nto|qnx|')
1313 afb17ff0 2020-01-02 alex kernel=linux
1314 afb17ff0 2020-01-02 alex os=$(echo $basic_os | sed -e 's|linux|gnu|')
1318 afb17ff0 2020-01-02 alex os=$basic_os
1322 afb17ff0 2020-01-02 alex # Now, normalize the OS (knowing we just have one component, it's not a kernel,
1324 5d5fdfb3 2020-05-10 alex case $os in
1325 5d5fdfb3 2020-05-10 alex # First match some system type aliases that might get confused
1326 5d5fdfb3 2020-05-10 alex # with valid system types.
1327 5d5fdfb3 2020-05-10 alex # solaris* is a basic system type, with this one exception.
1329 5d5fdfb3 2020-05-10 alex os=auroraux
1331 5d5fdfb3 2020-05-10 alex bluegene*)
1334 5d5fdfb3 2020-05-10 alex solaris1 | solaris1.*)
1335 afb17ff0 2020-01-02 alex os=$(echo $os | sed -e 's|solaris1|sunos4|')
1338 5d5fdfb3 2020-05-10 alex os=solaris2
1340 5d5fdfb3 2020-05-10 alex unixware*)
1341 5d5fdfb3 2020-05-10 alex os=sysv4.2uw
1343 5d5fdfb3 2020-05-10 alex # es1800 is here to avoid being matched by es* (a different OS)
1347 5d5fdfb3 2020-05-10 alex # Some version numbers need modification
1348 5d5fdfb3 2020-05-10 alex chorusos*)
1349 5d5fdfb3 2020-05-10 alex os=chorusos
1358 5d5fdfb3 2020-05-10 alex os=sco3.2v5
1361 5d5fdfb3 2020-05-10 alex os=sco3.2v4
1363 5d5fdfb3 2020-05-10 alex sco3.2.[4-9]*)
1364 afb17ff0 2020-01-02 alex os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
1366 afb17ff0 2020-01-02 alex sco*v* | scout)
1367 5d5fdfb3 2020-05-10 alex # Don't match below
1370 5d5fdfb3 2020-05-10 alex os=sco3.2v2
1379 5d5fdfb3 2020-05-10 alex os=hiuxwe2
1382 5d5fdfb3 2020-05-10 alex os=lynxos178
1385 5d5fdfb3 2020-05-10 alex os=lynxos5
1388 afb17ff0 2020-01-02 alex # don't get caught up in next wildcard
1393 afb17ff0 2020-01-02 alex mac[0-9]*)
1394 afb17ff0 2020-01-02 alex os=$(echo "$os" | sed -e 's|mac|macos|')
1397 5d5fdfb3 2020-05-10 alex os=openedition
1403 afb17ff0 2020-01-02 alex os=$(echo "$os" | sed -e 's|sunos5|solaris2|')
1406 afb17ff0 2020-01-02 alex os=$(echo "$os" | sed -e 's|sunos6|solaris3|')
1423 5d5fdfb3 2020-05-10 alex syllable*)
1424 5d5fdfb3 2020-05-10 alex os=syllable
1429 5d5fdfb3 2020-05-10 alex ctix* | uts*)
1433 5d5fdfb3 2020-05-10 alex os=rtmk-nova
1436 5d5fdfb3 2020-05-10 alex os=nextstep2
1438 5d5fdfb3 2020-05-10 alex # Preserve the version number of sinix5.
1440 afb17ff0 2020-01-02 alex os=$(echo $os | sed -e 's|sinix|sysv|')
1466 5d5fdfb3 2020-05-10 alex *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1473 5d5fdfb3 2020-05-10 alex # Until real need of OS specific support for
1474 5d5fdfb3 2020-05-10 alex # particular features comes up, bare metal
1475 5d5fdfb3 2020-05-10 alex # configurations are quite functional.
1476 5d5fdfb3 2020-05-10 alex case $cpu in
1486 afb17ff0 2020-01-02 alex # No normalization, but not necessarily accepted, that comes below.
1492 5d5fdfb3 2020-05-10 alex # Here we handle the default operating systems that come with various machines.
1493 5d5fdfb3 2020-05-10 alex # The value should be what the vendor currently ships out the door with their
1494 5d5fdfb3 2020-05-10 alex # machine or put another way, the most popular os provided with the machine.
1496 5d5fdfb3 2020-05-10 alex # Note that if you're going to try to match "-MANUFACTURER" here (say,
1497 5d5fdfb3 2020-05-10 alex # "-sun"), then you have to tell the case statement up towards the top
1498 5d5fdfb3 2020-05-10 alex # that MANUFACTURER isn't an operating system. Otherwise, code above
1499 5d5fdfb3 2020-05-10 alex # will signal an error saying that MANUFACTURER isn't an operating
1500 5d5fdfb3 2020-05-10 alex # system, and we'll never get to this point.
1503 5d5fdfb3 2020-05-10 alex case $cpu-$vendor in
1511 5d5fdfb3 2020-05-10 alex os=riscix1.2
1513 5d5fdfb3 2020-05-10 alex arm*-rebel)
1514 afb17ff0 2020-01-02 alex kernel=linux
1517 5d5fdfb3 2020-05-10 alex arm*-semi)
1520 5d5fdfb3 2020-05-10 alex c4x-* | tic4x-*)
1526 5d5fdfb3 2020-05-10 alex clipper-intergraph)
1529 5d5fdfb3 2020-05-10 alex hexagon-*)
1541 5d5fdfb3 2020-05-10 alex # This must come before the *-dec entry.
1548 5d5fdfb3 2020-05-10 alex *-dec | vax-*)
1549 5d5fdfb3 2020-05-10 alex os=ultrix4.2
1551 5d5fdfb3 2020-05-10 alex m68*-apollo)
1555 5d5fdfb3 2020-05-10 alex os=sunos4.0.2
1557 5d5fdfb3 2020-05-10 alex m68000-sun)
1560 5d5fdfb3 2020-05-10 alex m68*-cisco)
1566 5d5fdfb3 2020-05-10 alex mips*-cisco)
1575 5d5fdfb3 2020-05-10 alex *-tti) # must be before sparc entry or we get the wrong os.
1578 5d5fdfb3 2020-05-10 alex sparc-* | *-sun)
1579 5d5fdfb3 2020-05-10 alex os=sunos4.1.1
1591 5d5fdfb3 2020-05-10 alex os=mmixware
1596 5d5fdfb3 2020-05-10 alex *-winbond)
1605 5d5fdfb3 2020-05-10 alex *-hitachi)
1608 5d5fdfb3 2020-05-10 alex i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1612 5d5fdfb3 2020-05-10 alex os=amigaos
1617 5d5fdfb3 2020-05-10 alex *-dolphin)
1620 5d5fdfb3 2020-05-10 alex m68k-ccur)
1623 5d5fdfb3 2020-05-10 alex m88k-omron*)
1627 5d5fdfb3 2020-05-10 alex os=nextstep
1629 5d5fdfb3 2020-05-10 alex *-sequent)
1644 5d5fdfb3 2020-05-10 alex *-highlevel)
1653 5d5fdfb3 2020-05-10 alex *-siemens)
1656 5d5fdfb3 2020-05-10 alex *-masscomp)
1659 5d5fdfb3 2020-05-10 alex f30[01]-fujitsu | f700-fujitsu)
1675 5d5fdfb3 2020-05-10 alex os=vxworks
1684 afb17ff0 2020-01-02 alex # Now, validate our (potentially fixed-up) OS.
1685 afb17ff0 2020-01-02 alex case $os in
1686 afb17ff0 2020-01-02 alex # Sometimes we do "kernel-abi", so those need to count as OSes.
1687 afb17ff0 2020-01-02 alex musl* | newlib* | uclibc*)
1689 afb17ff0 2020-01-02 alex # Likewise for "kernel-libc"
1690 afb17ff0 2020-01-02 alex eabi | eabihf | gnueabi | gnueabihf)
1692 afb17ff0 2020-01-02 alex # Now accept the basic system types.
1693 afb17ff0 2020-01-02 alex # The portable systems comes first.
1694 afb17ff0 2020-01-02 alex # Each alternative MUST end in a * to match a version number.
1695 afb17ff0 2020-01-02 alex gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1696 afb17ff0 2020-01-02 alex | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1697 afb17ff0 2020-01-02 alex | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1698 afb17ff0 2020-01-02 alex | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1699 afb17ff0 2020-01-02 alex | hiux* | abug | nacl* | netware* | windows* \
1700 afb17ff0 2020-01-02 alex | os9* | macos* | osx* | ios* \
1701 afb17ff0 2020-01-02 alex | mpw* | magic* | mmixware* | mon960* | lnews* \
1702 afb17ff0 2020-01-02 alex | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1703 afb17ff0 2020-01-02 alex | aos* | aros* | cloudabi* | sortix* | twizzler* \
1704 afb17ff0 2020-01-02 alex | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1705 afb17ff0 2020-01-02 alex | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1706 afb17ff0 2020-01-02 alex | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1707 afb17ff0 2020-01-02 alex | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
1708 afb17ff0 2020-01-02 alex | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1709 afb17ff0 2020-01-02 alex | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1710 afb17ff0 2020-01-02 alex | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1711 afb17ff0 2020-01-02 alex | udi* | lites* | ieee* | go32* | aux* | hcos* \
1712 afb17ff0 2020-01-02 alex | chorusrdb* | cegcc* | glidix* \
1713 afb17ff0 2020-01-02 alex | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1714 afb17ff0 2020-01-02 alex | midipix* | mingw32* | mingw64* | mint* \
1715 afb17ff0 2020-01-02 alex | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1716 afb17ff0 2020-01-02 alex | interix* | uwin* | mks* | rhapsody* | darwin* \
1717 afb17ff0 2020-01-02 alex | openstep* | oskit* | conix* | pw32* | nonstopux* \
1718 afb17ff0 2020-01-02 alex | storm-chaos* | tops10* | tenex* | tops20* | its* \
1719 afb17ff0 2020-01-02 alex | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1720 afb17ff0 2020-01-02 alex | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1721 afb17ff0 2020-01-02 alex | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1722 afb17ff0 2020-01-02 alex | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1723 afb17ff0 2020-01-02 alex | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1724 afb17ff0 2020-01-02 alex | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1725 afb17ff0 2020-01-02 alex | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
1727 afb17ff0 2020-01-02 alex # This one is extra strict with allowed versions
1728 afb17ff0 2020-01-02 alex sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1729 afb17ff0 2020-01-02 alex # Don't forget version if it is 3.2v4 or newer.
1734 afb17ff0 2020-01-02 alex echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
1739 afb17ff0 2020-01-02 alex # As a final step for OS-related things, validate the OS-kernel combination
1740 afb17ff0 2020-01-02 alex # (given a valid OS), if there is a kernel.
1741 afb17ff0 2020-01-02 alex case $kernel-$os in
1742 afb17ff0 2020-01-02 alex linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
1744 afb17ff0 2020-01-02 alex uclinux-uclibc* )
1746 afb17ff0 2020-01-02 alex -dietlibc* | -newlib* | -musl* | -uclibc* )
1747 afb17ff0 2020-01-02 alex # These are just libc implementations, not actual OSes, and thus
1748 afb17ff0 2020-01-02 alex # require a kernel.
1749 afb17ff0 2020-01-02 alex echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
1752 afb17ff0 2020-01-02 alex kfreebsd*-gnu* | kopensolaris*-gnu*)
1758 afb17ff0 2020-01-02 alex *-eabi* | *-gnueabi*)
1761 afb17ff0 2020-01-02 alex # Blank kernel with real OS is always fine.
1764 afb17ff0 2020-01-02 alex echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
1769 7633e2f8 2002-03-12 alex # Here we handle the case where we know the os, and the CPU type, but not the
1770 7633e2f8 2002-03-12 alex # manufacturer. We pick the logical manufacturer.
1771 5d5fdfb3 2020-05-10 alex case $vendor in
1773 afb17ff0 2020-01-02 alex case $cpu-$os in
1774 afb17ff0 2020-01-02 alex *-riscix*)
1775 7633e2f8 2002-03-12 alex vendor=acorn
1778 7633e2f8 2002-03-12 alex vendor=sun
1780 afb17ff0 2020-01-02 alex *-cnk* | *-aix*)
1781 7633e2f8 2002-03-12 alex vendor=ibm
1793 7633e2f8 2002-03-12 alex vendor=hitachi
1796 7633e2f8 2002-03-12 alex vendor=crds
1802 7633e2f8 2002-03-12 alex vendor=omron
1808 5d5fdfb3 2020-05-10 alex vendor=intergraph
1810 afb17ff0 2020-01-02 alex *-mvs* | *-opened*)
1811 77944629 2004-03-11 alex vendor=ibm
1814 7633e2f8 2002-03-12 alex vendor=ibm
1816 afb17ff0 2020-01-02 alex s390-* | s390x-*)
1817 afb17ff0 2020-01-02 alex vendor=ibm
1820 7633e2f8 2002-03-12 alex vendor=sequent
1823 77944629 2004-03-11 alex vendor=ibm
1825 afb17ff0 2020-01-02 alex *-vxsim* | *-vxworks* | *-windiss*)
1826 7633e2f8 2002-03-12 alex vendor=wrs
1829 7633e2f8 2002-03-12 alex vendor=apple
1832 7633e2f8 2002-03-12 alex vendor=hitachi
1834 afb17ff0 2020-01-02 alex *-mpw* | *-macos*)
1835 7633e2f8 2002-03-12 alex vendor=apple
1837 afb17ff0 2020-01-02 alex *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
1838 7633e2f8 2002-03-12 alex vendor=atari
1841 7633e2f8 2002-03-12 alex vendor=stratus
1847 afb17ff0 2020-01-02 alex echo "$cpu-$vendor-${kernel:+$kernel-}$os"
1850 7633e2f8 2002-03-12 alex # Local variables:
1851 7f2d21f9 2018-04-01 alex # eval: (add-hook 'before-save-hook 'time-stamp)
1852 7633e2f8 2002-03-12 alex # time-stamp-start: "timestamp='"
1853 7633e2f8 2002-03-12 alex # time-stamp-format: "%:y-%02m-%02d"
1854 7633e2f8 2002-03-12 alex # time-stamp-end: "'"