config.sub revision 1.6 1 1.1 tron #! /bin/sh
2 1.1 tron # Configuration validation subroutine script.
3 1.6 wiz # Copyright 1992-2022 Free Software Foundation, Inc.
4 1.2 sevan
5 1.6 wiz # shellcheck disable=SC2006,SC2268 # see below for rationale
6 1.6 wiz
7 1.6 wiz timestamp='2022-01-03'
8 1.2 sevan
9 1.2 sevan # This file is free software; you can redistribute it and/or modify it
10 1.2 sevan # under the terms of the GNU General Public License as published by
11 1.6 wiz # the Free Software Foundation, either version 3 of the License, or
12 1.1 tron # (at your option) any later version.
13 1.1 tron #
14 1.2 sevan # This program is distributed in the hope that it will be useful, but
15 1.2 sevan # WITHOUT ANY WARRANTY; without even the implied warranty of
16 1.2 sevan # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 1.2 sevan # General Public License for more details.
18 1.1 tron #
19 1.1 tron # You should have received a copy of the GNU General Public License
20 1.4 maya # along with this program; if not, see <https://www.gnu.org/licenses/>.
21 1.1 tron #
22 1.1 tron # As a special exception to the GNU General Public License, if you
23 1.1 tron # distribute this file as part of a program that contains a
24 1.1 tron # configuration script generated by Autoconf, you may include it under
25 1.2 sevan # the same distribution terms that you use for the rest of that
26 1.2 sevan # program. This Exception is an additional permission under section 7
27 1.2 sevan # of the GNU General Public License, version 3 ("GPLv3").
28 1.1 tron
29 1.1 tron
30 1.2 sevan # Please send patches to <config-patches (at] gnu.org>.
31 1.1 tron #
32 1.1 tron # Configuration subroutine to validate and canonicalize a configuration type.
33 1.1 tron # Supply the specified configuration type as an argument.
34 1.1 tron # If it is invalid, we print an error message on stderr and exit with code 1.
35 1.1 tron # Otherwise, we print the canonical config type on stdout and succeed.
36 1.1 tron
37 1.2 sevan # You can get the latest version of this script from:
38 1.5 christos # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
39 1.2 sevan
40 1.1 tron # This file is supposed to be the same for all GNU packages
41 1.1 tron # and recognize all the CPU types, system types and aliases
42 1.1 tron # that are meaningful with *any* GNU software.
43 1.1 tron # Each package is responsible for reporting which valid configurations
44 1.1 tron # it does not support. The user should be able to distinguish
45 1.1 tron # a failure to support a valid configuration from a meaningless
46 1.1 tron # configuration.
47 1.1 tron
48 1.1 tron # The goal of this file is to map all the various variations of a given
49 1.1 tron # machine specification into a single specification in the form:
50 1.1 tron # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
51 1.1 tron # or in some cases, the newer four-part form:
52 1.1 tron # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
53 1.1 tron # It is wrong to echo any other type of specification.
54 1.1 tron
55 1.6 wiz # The "shellcheck disable" line above the timestamp inhibits complaints
56 1.6 wiz # about features and limitations of the classic Bourne shell that were
57 1.6 wiz # superseded or lifted in POSIX. However, this script identifies a wide
58 1.6 wiz # variety of pre-POSIX systems that do not have POSIX shells at all, and
59 1.6 wiz # even some reasonably current systems (Solaris 10 as case-in-point) still
60 1.6 wiz # have a pre-POSIX /bin/sh.
61 1.6 wiz
62 1.6 wiz me=`echo "$0" | sed -e 's,.*/,,'`
63 1.1 tron
64 1.1 tron usage="\
65 1.2 sevan Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
66 1.1 tron
67 1.1 tron Canonicalize a configuration name.
68 1.1 tron
69 1.4 maya Options:
70 1.1 tron -h, --help print this help, then exit
71 1.1 tron -t, --time-stamp print date of last modification, then exit
72 1.1 tron -v, --version print version number, then exit
73 1.1 tron
74 1.1 tron Report bugs and patches to <config-patches (at] gnu.org>."
75 1.1 tron
76 1.1 tron version="\
77 1.1 tron GNU config.sub ($timestamp)
78 1.1 tron
79 1.6 wiz Copyright 1992-2022 Free Software Foundation, Inc.
80 1.1 tron
81 1.1 tron This is free software; see the source for copying conditions. There is NO
82 1.1 tron warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83 1.1 tron
84 1.1 tron help="
85 1.1 tron Try \`$me --help' for more information."
86 1.1 tron
87 1.1 tron # Parse command line
88 1.1 tron while test $# -gt 0 ; do
89 1.1 tron case $1 in
90 1.1 tron --time-stamp | --time* | -t )
91 1.1 tron echo "$timestamp" ; exit ;;
92 1.1 tron --version | -v )
93 1.1 tron echo "$version" ; exit ;;
94 1.1 tron --help | --h* | -h )
95 1.1 tron echo "$usage"; exit ;;
96 1.1 tron -- ) # Stop option processing
97 1.1 tron shift; break ;;
98 1.1 tron - ) # Use stdin as input.
99 1.1 tron break ;;
100 1.1 tron -* )
101 1.5 christos echo "$me: invalid option $1$help" >&2
102 1.1 tron exit 1 ;;
103 1.1 tron
104 1.1 tron *local*)
105 1.1 tron # First pass through any local machine types.
106 1.5 christos echo "$1"
107 1.1 tron exit ;;
108 1.1 tron
109 1.1 tron * )
110 1.1 tron break ;;
111 1.1 tron esac
112 1.1 tron done
113 1.1 tron
114 1.1 tron case $# in
115 1.1 tron 0) echo "$me: missing argument$help" >&2
116 1.1 tron exit 1;;
117 1.1 tron 1) ;;
118 1.1 tron *) echo "$me: too many arguments$help" >&2
119 1.1 tron exit 1;;
120 1.1 tron esac
121 1.1 tron
122 1.5 christos # Split fields of configuration type
123 1.5 christos # shellcheck disable=SC2162
124 1.6 wiz saved_IFS=$IFS
125 1.5 christos IFS="-" read field1 field2 field3 field4 <<EOF
126 1.5 christos $1
127 1.5 christos EOF
128 1.6 wiz IFS=$saved_IFS
129 1.5 christos
130 1.5 christos # Separate into logical components for further validation
131 1.5 christos case $1 in
132 1.5 christos *-*-*-*-*)
133 1.5 christos echo Invalid configuration \`"$1"\': more than four components >&2
134 1.5 christos exit 1
135 1.1 tron ;;
136 1.5 christos *-*-*-*)
137 1.5 christos basic_machine=$field1-$field2
138 1.5 christos basic_os=$field3-$field4
139 1.1 tron ;;
140 1.5 christos *-*-*)
141 1.5 christos # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
142 1.5 christos # parts
143 1.5 christos maybe_os=$field2-$field3
144 1.5 christos case $maybe_os in
145 1.5 christos nto-qnx* | linux-* | uclinux-uclibc* \
146 1.5 christos | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
147 1.5 christos | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
148 1.5 christos | storm-chaos* | os2-emx* | rtmk-nova*)
149 1.5 christos basic_machine=$field1
150 1.5 christos basic_os=$maybe_os
151 1.5 christos ;;
152 1.5 christos android-linux)
153 1.5 christos basic_machine=$field1-unknown
154 1.5 christos basic_os=linux-android
155 1.5 christos ;;
156 1.5 christos *)
157 1.5 christos basic_machine=$field1-$field2
158 1.5 christos basic_os=$field3
159 1.5 christos ;;
160 1.5 christos esac
161 1.1 tron ;;
162 1.5 christos *-*)
163 1.5 christos # A lone config we happen to match not fitting any pattern
164 1.5 christos case $field1-$field2 in
165 1.5 christos decstation-3100)
166 1.5 christos basic_machine=mips-dec
167 1.5 christos basic_os=
168 1.5 christos ;;
169 1.5 christos *-*)
170 1.5 christos # Second component is usually, but not always the OS
171 1.5 christos case $field2 in
172 1.5 christos # Prevent following clause from handling this valid os
173 1.5 christos sun*os*)
174 1.5 christos basic_machine=$field1
175 1.5 christos basic_os=$field2
176 1.5 christos ;;
177 1.6 wiz zephyr*)
178 1.6 wiz basic_machine=$field1-unknown
179 1.6 wiz basic_os=$field2
180 1.6 wiz ;;
181 1.5 christos # Manufacturers
182 1.5 christos dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
183 1.5 christos | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
184 1.5 christos | unicom* | ibm* | next | hp | isi* | apollo | altos* \
185 1.5 christos | convergent* | ncr* | news | 32* | 3600* | 3100* \
186 1.5 christos | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
187 1.5 christos | ultra | tti* | harris | dolphin | highlevel | gould \
188 1.5 christos | cbm | ns | masscomp | apple | axis | knuth | cray \
189 1.5 christos | microblaze* | sim | cisco \
190 1.5 christos | oki | wec | wrs | winbond)
191 1.5 christos basic_machine=$field1-$field2
192 1.5 christos basic_os=
193 1.5 christos ;;
194 1.5 christos *)
195 1.5 christos basic_machine=$field1
196 1.5 christos basic_os=$field2
197 1.5 christos ;;
198 1.5 christos esac
199 1.5 christos ;;
200 1.5 christos esac
201 1.1 tron ;;
202 1.5 christos *)
203 1.5 christos # Convert single-component short-hands not valid as part of
204 1.5 christos # multi-component configurations.
205 1.5 christos case $field1 in
206 1.5 christos 386bsd)
207 1.5 christos basic_machine=i386-pc
208 1.5 christos basic_os=bsd
209 1.5 christos ;;
210 1.5 christos a29khif)
211 1.5 christos basic_machine=a29k-amd
212 1.5 christos basic_os=udi
213 1.5 christos ;;
214 1.5 christos adobe68k)
215 1.5 christos basic_machine=m68010-adobe
216 1.5 christos basic_os=scout
217 1.5 christos ;;
218 1.5 christos alliant)
219 1.5 christos basic_machine=fx80-alliant
220 1.5 christos basic_os=
221 1.5 christos ;;
222 1.5 christos altos | altos3068)
223 1.5 christos basic_machine=m68k-altos
224 1.5 christos basic_os=
225 1.5 christos ;;
226 1.5 christos am29k)
227 1.5 christos basic_machine=a29k-none
228 1.5 christos basic_os=bsd
229 1.5 christos ;;
230 1.5 christos amdahl)
231 1.5 christos basic_machine=580-amdahl
232 1.5 christos basic_os=sysv
233 1.5 christos ;;
234 1.5 christos amiga)
235 1.5 christos basic_machine=m68k-unknown
236 1.5 christos basic_os=
237 1.5 christos ;;
238 1.5 christos amigaos | amigados)
239 1.5 christos basic_machine=m68k-unknown
240 1.5 christos basic_os=amigaos
241 1.5 christos ;;
242 1.5 christos amigaunix | amix)
243 1.5 christos basic_machine=m68k-unknown
244 1.5 christos basic_os=sysv4
245 1.5 christos ;;
246 1.5 christos apollo68)
247 1.5 christos basic_machine=m68k-apollo
248 1.5 christos basic_os=sysv
249 1.5 christos ;;
250 1.5 christos apollo68bsd)
251 1.5 christos basic_machine=m68k-apollo
252 1.5 christos basic_os=bsd
253 1.5 christos ;;
254 1.5 christos aros)
255 1.5 christos basic_machine=i386-pc
256 1.5 christos basic_os=aros
257 1.5 christos ;;
258 1.5 christos aux)
259 1.5 christos basic_machine=m68k-apple
260 1.5 christos basic_os=aux
261 1.5 christos ;;
262 1.5 christos balance)
263 1.5 christos basic_machine=ns32k-sequent
264 1.5 christos basic_os=dynix
265 1.5 christos ;;
266 1.5 christos blackfin)
267 1.5 christos basic_machine=bfin-unknown
268 1.5 christos basic_os=linux
269 1.5 christos ;;
270 1.5 christos cegcc)
271 1.5 christos basic_machine=arm-unknown
272 1.5 christos basic_os=cegcc
273 1.5 christos ;;
274 1.5 christos convex-c1)
275 1.5 christos basic_machine=c1-convex
276 1.5 christos basic_os=bsd
277 1.5 christos ;;
278 1.5 christos convex-c2)
279 1.5 christos basic_machine=c2-convex
280 1.5 christos basic_os=bsd
281 1.5 christos ;;
282 1.5 christos convex-c32)
283 1.5 christos basic_machine=c32-convex
284 1.5 christos basic_os=bsd
285 1.5 christos ;;
286 1.5 christos convex-c34)
287 1.5 christos basic_machine=c34-convex
288 1.5 christos basic_os=bsd
289 1.5 christos ;;
290 1.5 christos convex-c38)
291 1.5 christos basic_machine=c38-convex
292 1.5 christos basic_os=bsd
293 1.5 christos ;;
294 1.5 christos cray)
295 1.5 christos basic_machine=j90-cray
296 1.5 christos basic_os=unicos
297 1.5 christos ;;
298 1.5 christos crds | unos)
299 1.5 christos basic_machine=m68k-crds
300 1.5 christos basic_os=
301 1.5 christos ;;
302 1.5 christos da30)
303 1.5 christos basic_machine=m68k-da30
304 1.5 christos basic_os=
305 1.5 christos ;;
306 1.5 christos decstation | pmax | pmin | dec3100 | decstatn)
307 1.5 christos basic_machine=mips-dec
308 1.5 christos basic_os=
309 1.5 christos ;;
310 1.5 christos delta88)
311 1.5 christos basic_machine=m88k-motorola
312 1.5 christos basic_os=sysv3
313 1.5 christos ;;
314 1.5 christos dicos)
315 1.5 christos basic_machine=i686-pc
316 1.5 christos basic_os=dicos
317 1.5 christos ;;
318 1.5 christos djgpp)
319 1.5 christos basic_machine=i586-pc
320 1.5 christos basic_os=msdosdjgpp
321 1.5 christos ;;
322 1.5 christos ebmon29k)
323 1.5 christos basic_machine=a29k-amd
324 1.5 christos basic_os=ebmon
325 1.5 christos ;;
326 1.5 christos es1800 | OSE68k | ose68k | ose | OSE)
327 1.5 christos basic_machine=m68k-ericsson
328 1.5 christos basic_os=ose
329 1.5 christos ;;
330 1.5 christos gmicro)
331 1.5 christos basic_machine=tron-gmicro
332 1.5 christos basic_os=sysv
333 1.5 christos ;;
334 1.5 christos go32)
335 1.5 christos basic_machine=i386-pc
336 1.5 christos basic_os=go32
337 1.5 christos ;;
338 1.5 christos h8300hms)
339 1.5 christos basic_machine=h8300-hitachi
340 1.5 christos basic_os=hms
341 1.5 christos ;;
342 1.5 christos h8300xray)
343 1.5 christos basic_machine=h8300-hitachi
344 1.5 christos basic_os=xray
345 1.5 christos ;;
346 1.5 christos h8500hms)
347 1.5 christos basic_machine=h8500-hitachi
348 1.5 christos basic_os=hms
349 1.5 christos ;;
350 1.5 christos harris)
351 1.5 christos basic_machine=m88k-harris
352 1.5 christos basic_os=sysv3
353 1.5 christos ;;
354 1.5 christos hp300 | hp300hpux)
355 1.5 christos basic_machine=m68k-hp
356 1.5 christos basic_os=hpux
357 1.5 christos ;;
358 1.5 christos hp300bsd)
359 1.5 christos basic_machine=m68k-hp
360 1.5 christos basic_os=bsd
361 1.5 christos ;;
362 1.5 christos hppaosf)
363 1.5 christos basic_machine=hppa1.1-hp
364 1.5 christos basic_os=osf
365 1.5 christos ;;
366 1.5 christos hppro)
367 1.5 christos basic_machine=hppa1.1-hp
368 1.5 christos basic_os=proelf
369 1.5 christos ;;
370 1.5 christos i386mach)
371 1.5 christos basic_machine=i386-mach
372 1.5 christos basic_os=mach
373 1.5 christos ;;
374 1.5 christos isi68 | isi)
375 1.5 christos basic_machine=m68k-isi
376 1.5 christos basic_os=sysv
377 1.5 christos ;;
378 1.5 christos m68knommu)
379 1.5 christos basic_machine=m68k-unknown
380 1.5 christos basic_os=linux
381 1.5 christos ;;
382 1.5 christos magnum | m3230)
383 1.5 christos basic_machine=mips-mips
384 1.5 christos basic_os=sysv
385 1.5 christos ;;
386 1.5 christos merlin)
387 1.5 christos basic_machine=ns32k-utek
388 1.5 christos basic_os=sysv
389 1.5 christos ;;
390 1.5 christos mingw64)
391 1.5 christos basic_machine=x86_64-pc
392 1.5 christos basic_os=mingw64
393 1.5 christos ;;
394 1.5 christos mingw32)
395 1.5 christos basic_machine=i686-pc
396 1.5 christos basic_os=mingw32
397 1.5 christos ;;
398 1.5 christos mingw32ce)
399 1.5 christos basic_machine=arm-unknown
400 1.5 christos basic_os=mingw32ce
401 1.5 christos ;;
402 1.5 christos monitor)
403 1.5 christos basic_machine=m68k-rom68k
404 1.5 christos basic_os=coff
405 1.5 christos ;;
406 1.5 christos morphos)
407 1.5 christos basic_machine=powerpc-unknown
408 1.5 christos basic_os=morphos
409 1.5 christos ;;
410 1.5 christos moxiebox)
411 1.5 christos basic_machine=moxie-unknown
412 1.5 christos basic_os=moxiebox
413 1.5 christos ;;
414 1.5 christos msdos)
415 1.5 christos basic_machine=i386-pc
416 1.5 christos basic_os=msdos
417 1.5 christos ;;
418 1.5 christos msys)
419 1.5 christos basic_machine=i686-pc
420 1.5 christos basic_os=msys
421 1.5 christos ;;
422 1.5 christos mvs)
423 1.5 christos basic_machine=i370-ibm
424 1.5 christos basic_os=mvs
425 1.5 christos ;;
426 1.5 christos nacl)
427 1.5 christos basic_machine=le32-unknown
428 1.5 christos basic_os=nacl
429 1.5 christos ;;
430 1.5 christos ncr3000)
431 1.5 christos basic_machine=i486-ncr
432 1.5 christos basic_os=sysv4
433 1.5 christos ;;
434 1.5 christos netbsd386)
435 1.5 christos basic_machine=i386-pc
436 1.5 christos basic_os=netbsd
437 1.5 christos ;;
438 1.5 christos netwinder)
439 1.5 christos basic_machine=armv4l-rebel
440 1.5 christos basic_os=linux
441 1.5 christos ;;
442 1.5 christos news | news700 | news800 | news900)
443 1.5 christos basic_machine=m68k-sony
444 1.5 christos basic_os=newsos
445 1.5 christos ;;
446 1.5 christos news1000)
447 1.5 christos basic_machine=m68030-sony
448 1.5 christos basic_os=newsos
449 1.5 christos ;;
450 1.5 christos necv70)
451 1.5 christos basic_machine=v70-nec
452 1.5 christos basic_os=sysv
453 1.5 christos ;;
454 1.5 christos nh3000)
455 1.5 christos basic_machine=m68k-harris
456 1.5 christos basic_os=cxux
457 1.5 christos ;;
458 1.5 christos nh[45]000)
459 1.5 christos basic_machine=m88k-harris
460 1.5 christos basic_os=cxux
461 1.5 christos ;;
462 1.5 christos nindy960)
463 1.5 christos basic_machine=i960-intel
464 1.5 christos basic_os=nindy
465 1.5 christos ;;
466 1.5 christos mon960)
467 1.5 christos basic_machine=i960-intel
468 1.5 christos basic_os=mon960
469 1.5 christos ;;
470 1.5 christos nonstopux)
471 1.5 christos basic_machine=mips-compaq
472 1.5 christos basic_os=nonstopux
473 1.5 christos ;;
474 1.5 christos os400)
475 1.5 christos basic_machine=powerpc-ibm
476 1.5 christos basic_os=os400
477 1.5 christos ;;
478 1.5 christos OSE68000 | ose68000)
479 1.5 christos basic_machine=m68000-ericsson
480 1.5 christos basic_os=ose
481 1.5 christos ;;
482 1.5 christos os68k)
483 1.5 christos basic_machine=m68k-none
484 1.5 christos basic_os=os68k
485 1.5 christos ;;
486 1.5 christos paragon)
487 1.5 christos basic_machine=i860-intel
488 1.5 christos basic_os=osf
489 1.5 christos ;;
490 1.5 christos parisc)
491 1.5 christos basic_machine=hppa-unknown
492 1.5 christos basic_os=linux
493 1.5 christos ;;
494 1.5 christos psp)
495 1.5 christos basic_machine=mipsallegrexel-sony
496 1.5 christos basic_os=psp
497 1.5 christos ;;
498 1.5 christos pw32)
499 1.5 christos basic_machine=i586-unknown
500 1.5 christos basic_os=pw32
501 1.5 christos ;;
502 1.5 christos rdos | rdos64)
503 1.5 christos basic_machine=x86_64-pc
504 1.5 christos basic_os=rdos
505 1.5 christos ;;
506 1.5 christos rdos32)
507 1.5 christos basic_machine=i386-pc
508 1.5 christos basic_os=rdos
509 1.5 christos ;;
510 1.5 christos rom68k)
511 1.5 christos basic_machine=m68k-rom68k
512 1.5 christos basic_os=coff
513 1.5 christos ;;
514 1.5 christos sa29200)
515 1.5 christos basic_machine=a29k-amd
516 1.5 christos basic_os=udi
517 1.5 christos ;;
518 1.5 christos sei)
519 1.5 christos basic_machine=mips-sei
520 1.5 christos basic_os=seiux
521 1.5 christos ;;
522 1.5 christos sequent)
523 1.5 christos basic_machine=i386-sequent
524 1.5 christos basic_os=
525 1.5 christos ;;
526 1.5 christos sps7)
527 1.5 christos basic_machine=m68k-bull
528 1.5 christos basic_os=sysv2
529 1.5 christos ;;
530 1.5 christos st2000)
531 1.5 christos basic_machine=m68k-tandem
532 1.5 christos basic_os=
533 1.5 christos ;;
534 1.5 christos stratus)
535 1.5 christos basic_machine=i860-stratus
536 1.5 christos basic_os=sysv4
537 1.5 christos ;;
538 1.5 christos sun2)
539 1.5 christos basic_machine=m68000-sun
540 1.5 christos basic_os=
541 1.5 christos ;;
542 1.5 christos sun2os3)
543 1.5 christos basic_machine=m68000-sun
544 1.5 christos basic_os=sunos3
545 1.5 christos ;;
546 1.5 christos sun2os4)
547 1.5 christos basic_machine=m68000-sun
548 1.5 christos basic_os=sunos4
549 1.5 christos ;;
550 1.5 christos sun3)
551 1.5 christos basic_machine=m68k-sun
552 1.5 christos basic_os=
553 1.5 christos ;;
554 1.5 christos sun3os3)
555 1.5 christos basic_machine=m68k-sun
556 1.5 christos basic_os=sunos3
557 1.5 christos ;;
558 1.5 christos sun3os4)
559 1.5 christos basic_machine=m68k-sun
560 1.5 christos basic_os=sunos4
561 1.5 christos ;;
562 1.5 christos sun4)
563 1.5 christos basic_machine=sparc-sun
564 1.5 christos basic_os=
565 1.5 christos ;;
566 1.5 christos sun4os3)
567 1.5 christos basic_machine=sparc-sun
568 1.5 christos basic_os=sunos3
569 1.5 christos ;;
570 1.5 christos sun4os4)
571 1.5 christos basic_machine=sparc-sun
572 1.5 christos basic_os=sunos4
573 1.5 christos ;;
574 1.5 christos sun4sol2)
575 1.5 christos basic_machine=sparc-sun
576 1.5 christos basic_os=solaris2
577 1.5 christos ;;
578 1.5 christos sun386 | sun386i | roadrunner)
579 1.5 christos basic_machine=i386-sun
580 1.5 christos basic_os=
581 1.5 christos ;;
582 1.5 christos sv1)
583 1.5 christos basic_machine=sv1-cray
584 1.5 christos basic_os=unicos
585 1.5 christos ;;
586 1.5 christos symmetry)
587 1.5 christos basic_machine=i386-sequent
588 1.5 christos basic_os=dynix
589 1.5 christos ;;
590 1.5 christos t3e)
591 1.5 christos basic_machine=alphaev5-cray
592 1.5 christos basic_os=unicos
593 1.5 christos ;;
594 1.5 christos t90)
595 1.5 christos basic_machine=t90-cray
596 1.5 christos basic_os=unicos
597 1.5 christos ;;
598 1.5 christos toad1)
599 1.5 christos basic_machine=pdp10-xkl
600 1.5 christos basic_os=tops20
601 1.5 christos ;;
602 1.5 christos tpf)
603 1.5 christos basic_machine=s390x-ibm
604 1.5 christos basic_os=tpf
605 1.5 christos ;;
606 1.5 christos udi29k)
607 1.5 christos basic_machine=a29k-amd
608 1.5 christos basic_os=udi
609 1.5 christos ;;
610 1.5 christos ultra3)
611 1.5 christos basic_machine=a29k-nyu
612 1.5 christos basic_os=sym1
613 1.5 christos ;;
614 1.5 christos v810 | necv810)
615 1.5 christos basic_machine=v810-nec
616 1.5 christos basic_os=none
617 1.5 christos ;;
618 1.5 christos vaxv)
619 1.5 christos basic_machine=vax-dec
620 1.5 christos basic_os=sysv
621 1.5 christos ;;
622 1.5 christos vms)
623 1.5 christos basic_machine=vax-dec
624 1.5 christos basic_os=vms
625 1.5 christos ;;
626 1.5 christos vsta)
627 1.5 christos basic_machine=i386-pc
628 1.5 christos basic_os=vsta
629 1.5 christos ;;
630 1.5 christos vxworks960)
631 1.5 christos basic_machine=i960-wrs
632 1.5 christos basic_os=vxworks
633 1.5 christos ;;
634 1.5 christos vxworks68)
635 1.5 christos basic_machine=m68k-wrs
636 1.5 christos basic_os=vxworks
637 1.5 christos ;;
638 1.5 christos vxworks29k)
639 1.5 christos basic_machine=a29k-wrs
640 1.5 christos basic_os=vxworks
641 1.5 christos ;;
642 1.5 christos xbox)
643 1.5 christos basic_machine=i686-pc
644 1.5 christos basic_os=mingw32
645 1.5 christos ;;
646 1.5 christos ymp)
647 1.5 christos basic_machine=ymp-cray
648 1.5 christos basic_os=unicos
649 1.5 christos ;;
650 1.5 christos *)
651 1.5 christos basic_machine=$1
652 1.5 christos basic_os=
653 1.5 christos ;;
654 1.5 christos esac
655 1.1 tron ;;
656 1.1 tron esac
657 1.1 tron
658 1.5 christos # Decode 1-component or ad-hoc basic machines
659 1.1 tron case $basic_machine in
660 1.5 christos # Here we handle the default manufacturer of certain CPU types. It is in
661 1.5 christos # some cases the only manufacturer, in others, it is the most popular.
662 1.5 christos w89k)
663 1.5 christos cpu=hppa1.1
664 1.5 christos vendor=winbond
665 1.1 tron ;;
666 1.5 christos op50n)
667 1.5 christos cpu=hppa1.1
668 1.5 christos vendor=oki
669 1.2 sevan ;;
670 1.5 christos op60c)
671 1.5 christos cpu=hppa1.1
672 1.5 christos vendor=oki
673 1.2 sevan ;;
674 1.5 christos ibm*)
675 1.5 christos cpu=i370
676 1.5 christos vendor=ibm
677 1.2 sevan ;;
678 1.5 christos orion105)
679 1.5 christos cpu=clipper
680 1.5 christos vendor=highlevel
681 1.2 sevan ;;
682 1.5 christos mac | mpw | mac-mpw)
683 1.5 christos cpu=m68k
684 1.5 christos vendor=apple
685 1.1 tron ;;
686 1.5 christos pmac | pmac-mpw)
687 1.5 christos cpu=powerpc
688 1.5 christos vendor=apple
689 1.2 sevan ;;
690 1.2 sevan
691 1.1 tron # Recognize the various machine names and aliases which stand
692 1.1 tron # for a CPU type and a company and sometimes even an OS.
693 1.1 tron 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
694 1.5 christos cpu=m68000
695 1.5 christos vendor=att
696 1.1 tron ;;
697 1.1 tron 3b*)
698 1.5 christos cpu=we32k
699 1.5 christos vendor=att
700 1.2 sevan ;;
701 1.2 sevan bluegene*)
702 1.5 christos cpu=powerpc
703 1.5 christos vendor=ibm
704 1.5 christos basic_os=cnk
705 1.1 tron ;;
706 1.1 tron decsystem10* | dec10*)
707 1.5 christos cpu=pdp10
708 1.5 christos vendor=dec
709 1.5 christos basic_os=tops10
710 1.1 tron ;;
711 1.1 tron decsystem20* | dec20*)
712 1.5 christos cpu=pdp10
713 1.5 christos vendor=dec
714 1.5 christos basic_os=tops20
715 1.1 tron ;;
716 1.1 tron delta | 3300 | motorola-3300 | motorola-delta \
717 1.1 tron | 3300-motorola | delta-motorola)
718 1.5 christos cpu=m68k
719 1.5 christos vendor=motorola
720 1.1 tron ;;
721 1.4 maya dpx2*)
722 1.5 christos cpu=m68k
723 1.5 christos vendor=bull
724 1.5 christos basic_os=sysv3
725 1.1 tron ;;
726 1.5 christos encore | umax | mmax)
727 1.5 christos cpu=ns32k
728 1.5 christos vendor=encore
729 1.1 tron ;;
730 1.1 tron elxsi)
731 1.5 christos cpu=elxsi
732 1.5 christos vendor=elxsi
733 1.5 christos basic_os=${basic_os:-bsd}
734 1.1 tron ;;
735 1.1 tron fx2800)
736 1.5 christos cpu=i860
737 1.5 christos vendor=alliant
738 1.1 tron ;;
739 1.1 tron genix)
740 1.5 christos cpu=ns32k
741 1.5 christos vendor=ns
742 1.1 tron ;;
743 1.1 tron h3050r* | hiux*)
744 1.5 christos cpu=hppa1.1
745 1.5 christos vendor=hitachi
746 1.5 christos basic_os=hiuxwe2
747 1.1 tron ;;
748 1.1 tron hp3k9[0-9][0-9] | hp9[0-9][0-9])
749 1.5 christos cpu=hppa1.0
750 1.5 christos vendor=hp
751 1.1 tron ;;
752 1.1 tron hp9k2[0-9][0-9] | hp9k31[0-9])
753 1.5 christos cpu=m68000
754 1.5 christos vendor=hp
755 1.1 tron ;;
756 1.1 tron hp9k3[2-9][0-9])
757 1.5 christos cpu=m68k
758 1.5 christos vendor=hp
759 1.1 tron ;;
760 1.1 tron hp9k6[0-9][0-9] | hp6[0-9][0-9])
761 1.5 christos cpu=hppa1.0
762 1.5 christos vendor=hp
763 1.1 tron ;;
764 1.1 tron hp9k7[0-79][0-9] | hp7[0-79][0-9])
765 1.5 christos cpu=hppa1.1
766 1.5 christos vendor=hp
767 1.1 tron ;;
768 1.1 tron hp9k78[0-9] | hp78[0-9])
769 1.1 tron # FIXME: really hppa2.0-hp
770 1.5 christos cpu=hppa1.1
771 1.5 christos vendor=hp
772 1.1 tron ;;
773 1.1 tron hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
774 1.1 tron # FIXME: really hppa2.0-hp
775 1.5 christos cpu=hppa1.1
776 1.5 christos vendor=hp
777 1.1 tron ;;
778 1.1 tron hp9k8[0-9][13679] | hp8[0-9][13679])
779 1.5 christos cpu=hppa1.1
780 1.5 christos vendor=hp
781 1.1 tron ;;
782 1.1 tron hp9k8[0-9][0-9] | hp8[0-9][0-9])
783 1.5 christos cpu=hppa1.0
784 1.5 christos vendor=hp
785 1.1 tron ;;
786 1.1 tron i*86v32)
787 1.6 wiz cpu=`echo "$1" | sed -e 's/86.*/86/'`
788 1.5 christos vendor=pc
789 1.5 christos basic_os=sysv32
790 1.1 tron ;;
791 1.1 tron i*86v4*)
792 1.6 wiz cpu=`echo "$1" | sed -e 's/86.*/86/'`
793 1.5 christos vendor=pc
794 1.5 christos basic_os=sysv4
795 1.1 tron ;;
796 1.1 tron i*86v)
797 1.6 wiz cpu=`echo "$1" | sed -e 's/86.*/86/'`
798 1.5 christos vendor=pc
799 1.5 christos basic_os=sysv
800 1.1 tron ;;
801 1.1 tron i*86sol2)
802 1.6 wiz cpu=`echo "$1" | sed -e 's/86.*/86/'`
803 1.5 christos vendor=pc
804 1.5 christos basic_os=solaris2
805 1.5 christos ;;
806 1.5 christos j90 | j90-cray)
807 1.5 christos cpu=j90
808 1.5 christos vendor=cray
809 1.5 christos basic_os=${basic_os:-unicos}
810 1.1 tron ;;
811 1.1 tron iris | iris4d)
812 1.5 christos cpu=mips
813 1.5 christos vendor=sgi
814 1.5 christos case $basic_os in
815 1.5 christos irix*)
816 1.1 tron ;;
817 1.1 tron *)
818 1.5 christos basic_os=irix4
819 1.1 tron ;;
820 1.1 tron esac
821 1.1 tron ;;
822 1.1 tron miniframe)
823 1.5 christos cpu=m68000
824 1.5 christos vendor=convergent
825 1.1 tron ;;
826 1.5 christos *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
827 1.5 christos cpu=m68k
828 1.5 christos vendor=atari
829 1.5 christos basic_os=mint
830 1.5 christos ;;
831 1.5 christos mipsEE* | ee)
832 1.5 christos cpu=mips64r5900el
833 1.5 christos vendor=scei
834 1.3 spz case $os in
835 1.5 christos linux*)
836 1.3 spz ;;
837 1.3 spz *)
838 1.5 christos os=elf
839 1.3 spz ;;
840 1.3 spz esac
841 1.3 spz ;;
842 1.3 spz iop)
843 1.5 christos cpu=mipsel
844 1.5 christos vendor=scei
845 1.5 christos os=irx
846 1.3 spz ;;
847 1.3 spz dvp)
848 1.5 christos cpu=dvp
849 1.5 christos vendor=scei
850 1.5 christos os=elf
851 1.1 tron ;;
852 1.1 tron news-3600 | risc-news)
853 1.5 christos cpu=mips
854 1.5 christos vendor=sony
855 1.5 christos basic_os=newsos
856 1.1 tron ;;
857 1.4 maya next | m*-next)
858 1.5 christos cpu=m68k
859 1.5 christos vendor=next
860 1.5 christos case $basic_os in
861 1.5 christos openstep*)
862 1.5 christos ;;
863 1.5 christos nextstep*)
864 1.1 tron ;;
865 1.5 christos ns2*)
866 1.5 christos basic_os=nextstep2
867 1.1 tron ;;
868 1.1 tron *)
869 1.5 christos basic_os=nextstep3
870 1.1 tron ;;
871 1.1 tron esac
872 1.1 tron ;;
873 1.1 tron np1)
874 1.5 christos cpu=np1
875 1.5 christos vendor=gould
876 1.4 maya ;;
877 1.1 tron op50n-* | op60c-*)
878 1.5 christos cpu=hppa1.1
879 1.5 christos vendor=oki
880 1.5 christos basic_os=proelf
881 1.1 tron ;;
882 1.1 tron pa-hitachi)
883 1.5 christos cpu=hppa1.1
884 1.5 christos vendor=hitachi
885 1.5 christos basic_os=hiuxwe2
886 1.2 sevan ;;
887 1.1 tron pbd)
888 1.5 christos cpu=sparc
889 1.5 christos vendor=tti
890 1.1 tron ;;
891 1.1 tron pbb)
892 1.5 christos cpu=m68k
893 1.5 christos vendor=tti
894 1.1 tron ;;
895 1.5 christos pc532)
896 1.5 christos cpu=ns32k
897 1.5 christos vendor=pc532
898 1.1 tron ;;
899 1.5 christos pn)
900 1.5 christos cpu=pn
901 1.5 christos vendor=gould
902 1.1 tron ;;
903 1.5 christos power)
904 1.5 christos cpu=power
905 1.5 christos vendor=ibm
906 1.1 tron ;;
907 1.5 christos ps2)
908 1.5 christos cpu=i386
909 1.5 christos vendor=ibm
910 1.1 tron ;;
911 1.5 christos rm[46]00)
912 1.5 christos cpu=mips
913 1.5 christos vendor=siemens
914 1.1 tron ;;
915 1.5 christos rtpc | rtpc-*)
916 1.5 christos cpu=romp
917 1.5 christos vendor=ibm
918 1.1 tron ;;
919 1.5 christos sde)
920 1.5 christos cpu=mipsisa32
921 1.5 christos vendor=sde
922 1.5 christos basic_os=${basic_os:-elf}
923 1.5 christos ;;
924 1.5 christos simso-wrs)
925 1.5 christos cpu=sparclite
926 1.5 christos vendor=wrs
927 1.5 christos basic_os=vxworks
928 1.1 tron ;;
929 1.5 christos tower | tower-32)
930 1.5 christos cpu=m68k
931 1.5 christos vendor=ncr
932 1.1 tron ;;
933 1.5 christos vpp*|vx|vx-*)
934 1.5 christos cpu=f301
935 1.5 christos vendor=fujitsu
936 1.1 tron ;;
937 1.5 christos w65)
938 1.5 christos cpu=w65
939 1.5 christos vendor=wdc
940 1.1 tron ;;
941 1.5 christos w89k-*)
942 1.5 christos cpu=hppa1.1
943 1.5 christos vendor=winbond
944 1.5 christos basic_os=proelf
945 1.1 tron ;;
946 1.5 christos none)
947 1.5 christos cpu=none
948 1.5 christos vendor=none
949 1.1 tron ;;
950 1.5 christos leon|leon[3-9])
951 1.5 christos cpu=sparc
952 1.5 christos vendor=$basic_machine
953 1.1 tron ;;
954 1.5 christos leon-*|leon[3-9]-*)
955 1.5 christos cpu=sparc
956 1.6 wiz vendor=`echo "$basic_machine" | sed 's/-.*//'`
957 1.1 tron ;;
958 1.5 christos
959 1.5 christos *-*)
960 1.5 christos # shellcheck disable=SC2162
961 1.6 wiz saved_IFS=$IFS
962 1.5 christos IFS="-" read cpu vendor <<EOF
963 1.5 christos $basic_machine
964 1.5 christos EOF
965 1.6 wiz IFS=$saved_IFS
966 1.1 tron ;;
967 1.5 christos # We use `pc' rather than `unknown'
968 1.5 christos # because (1) that's what they normally are, and
969 1.5 christos # (2) the word "unknown" tends to confuse beginning users.
970 1.5 christos i*86 | x86_64)
971 1.5 christos cpu=$basic_machine
972 1.5 christos vendor=pc
973 1.1 tron ;;
974 1.5 christos # These rules are duplicated from below for sake of the special case above;
975 1.5 christos # i.e. things that normalized to x86 arches should also default to "pc"
976 1.5 christos pc98)
977 1.5 christos cpu=i386
978 1.5 christos vendor=pc
979 1.1 tron ;;
980 1.5 christos x64 | amd64)
981 1.5 christos cpu=x86_64
982 1.5 christos vendor=pc
983 1.1 tron ;;
984 1.5 christos # Recognize the basic CPU types without company name.
985 1.5 christos *)
986 1.5 christos cpu=$basic_machine
987 1.5 christos vendor=unknown
988 1.1 tron ;;
989 1.5 christos esac
990 1.5 christos
991 1.5 christos unset -v basic_machine
992 1.5 christos
993 1.5 christos # Decode basic machines in the full and proper CPU-Company form.
994 1.5 christos case $cpu-$vendor in
995 1.5 christos # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
996 1.5 christos # some cases the only manufacturer, in others, it is the most popular.
997 1.5 christos craynv-unknown)
998 1.5 christos vendor=cray
999 1.5 christos basic_os=${basic_os:-unicosmp}
1000 1.1 tron ;;
1001 1.5 christos c90-unknown | c90-cray)
1002 1.5 christos vendor=cray
1003 1.5 christos basic_os=${Basic_os:-unicos}
1004 1.1 tron ;;
1005 1.5 christos fx80-unknown)
1006 1.5 christos vendor=alliant
1007 1.1 tron ;;
1008 1.5 christos romp-unknown)
1009 1.5 christos vendor=ibm
1010 1.1 tron ;;
1011 1.5 christos mmix-unknown)
1012 1.5 christos vendor=knuth
1013 1.1 tron ;;
1014 1.5 christos microblaze-unknown | microblazeel-unknown)
1015 1.5 christos vendor=xilinx
1016 1.1 tron ;;
1017 1.5 christos rs6000-unknown)
1018 1.5 christos vendor=ibm
1019 1.1 tron ;;
1020 1.5 christos vax-unknown)
1021 1.5 christos vendor=dec
1022 1.1 tron ;;
1023 1.5 christos pdp11-unknown)
1024 1.5 christos vendor=dec
1025 1.1 tron ;;
1026 1.5 christos we32k-unknown)
1027 1.5 christos vendor=att
1028 1.1 tron ;;
1029 1.5 christos cydra-unknown)
1030 1.5 christos vendor=cydrome
1031 1.1 tron ;;
1032 1.5 christos i370-ibm*)
1033 1.5 christos vendor=ibm
1034 1.1 tron ;;
1035 1.5 christos orion-unknown)
1036 1.5 christos vendor=highlevel
1037 1.1 tron ;;
1038 1.5 christos xps-unknown | xps100-unknown)
1039 1.5 christos cpu=xps100
1040 1.5 christos vendor=honeywell
1041 1.1 tron ;;
1042 1.5 christos
1043 1.5 christos # Here we normalize CPU types with a missing or matching vendor
1044 1.6 wiz armh-unknown | armh-alt)
1045 1.6 wiz cpu=armv7l
1046 1.6 wiz vendor=alt
1047 1.6 wiz basic_os=${basic_os:-linux-gnueabihf}
1048 1.6 wiz ;;
1049 1.5 christos dpx20-unknown | dpx20-bull)
1050 1.5 christos cpu=rs6000
1051 1.5 christos vendor=bull
1052 1.5 christos basic_os=${basic_os:-bosx}
1053 1.1 tron ;;
1054 1.5 christos
1055 1.5 christos # Here we normalize CPU types irrespective of the vendor
1056 1.5 christos amd64-*)
1057 1.5 christos cpu=x86_64
1058 1.2 sevan ;;
1059 1.5 christos blackfin-*)
1060 1.5 christos cpu=bfin
1061 1.5 christos basic_os=linux
1062 1.1 tron ;;
1063 1.5 christos c54x-*)
1064 1.5 christos cpu=tic54x
1065 1.1 tron ;;
1066 1.5 christos c55x-*)
1067 1.5 christos cpu=tic55x
1068 1.1 tron ;;
1069 1.5 christos c6x-*)
1070 1.5 christos cpu=tic6x
1071 1.1 tron ;;
1072 1.5 christos e500v[12]-*)
1073 1.5 christos cpu=powerpc
1074 1.5 christos basic_os=${basic_os}"spe"
1075 1.1 tron ;;
1076 1.5 christos mips3*-*)
1077 1.5 christos cpu=mips64
1078 1.1 tron ;;
1079 1.5 christos ms1-*)
1080 1.5 christos cpu=mt
1081 1.2 sevan ;;
1082 1.5 christos m68knommu-*)
1083 1.5 christos cpu=m68k
1084 1.5 christos basic_os=linux
1085 1.1 tron ;;
1086 1.5 christos m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1087 1.5 christos cpu=s12z
1088 1.1 tron ;;
1089 1.5 christos openrisc-*)
1090 1.5 christos cpu=or32
1091 1.1 tron ;;
1092 1.5 christos parisc-*)
1093 1.5 christos cpu=hppa
1094 1.5 christos basic_os=linux
1095 1.1 tron ;;
1096 1.5 christos pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1097 1.5 christos cpu=i586
1098 1.1 tron ;;
1099 1.5 christos pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1100 1.5 christos cpu=i686
1101 1.1 tron ;;
1102 1.5 christos pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1103 1.5 christos cpu=i686
1104 1.1 tron ;;
1105 1.5 christos pentium4-*)
1106 1.5 christos cpu=i786
1107 1.1 tron ;;
1108 1.5 christos pc98-*)
1109 1.5 christos cpu=i386
1110 1.1 tron ;;
1111 1.5 christos ppc-* | ppcbe-*)
1112 1.5 christos cpu=powerpc
1113 1.1 tron ;;
1114 1.5 christos ppcle-* | powerpclittle-*)
1115 1.5 christos cpu=powerpcle
1116 1.1 tron ;;
1117 1.5 christos ppc64-*)
1118 1.5 christos cpu=powerpc64
1119 1.1 tron ;;
1120 1.5 christos ppc64le-* | powerpc64little-*)
1121 1.5 christos cpu=powerpc64le
1122 1.1 tron ;;
1123 1.5 christos sb1-*)
1124 1.5 christos cpu=mipsisa64sb1
1125 1.1 tron ;;
1126 1.5 christos sb1el-*)
1127 1.5 christos cpu=mipsisa64sb1el
1128 1.1 tron ;;
1129 1.5 christos sh5e[lb]-*)
1130 1.6 wiz cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1131 1.1 tron ;;
1132 1.5 christos spur-*)
1133 1.5 christos cpu=spur
1134 1.1 tron ;;
1135 1.5 christos strongarm-* | thumb-*)
1136 1.5 christos cpu=arm
1137 1.1 tron ;;
1138 1.5 christos tx39-*)
1139 1.5 christos cpu=mipstx39
1140 1.4 maya ;;
1141 1.5 christos tx39el-*)
1142 1.5 christos cpu=mipstx39el
1143 1.1 tron ;;
1144 1.5 christos x64-*)
1145 1.5 christos cpu=x86_64
1146 1.1 tron ;;
1147 1.2 sevan xscale-* | xscalee[bl]-*)
1148 1.6 wiz cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1149 1.2 sevan ;;
1150 1.6 wiz arm64-* | aarch64le-*)
1151 1.5 christos cpu=aarch64
1152 1.1 tron ;;
1153 1.1 tron
1154 1.5 christos # Recognize the canonical CPU Types that limit and/or modify the
1155 1.5 christos # company names they are paired with.
1156 1.5 christos cr16-*)
1157 1.5 christos basic_os=${basic_os:-elf}
1158 1.1 tron ;;
1159 1.5 christos crisv32-* | etraxfs*-*)
1160 1.5 christos cpu=crisv32
1161 1.5 christos vendor=axis
1162 1.1 tron ;;
1163 1.5 christos cris-* | etrax*-*)
1164 1.5 christos cpu=cris
1165 1.5 christos vendor=axis
1166 1.1 tron ;;
1167 1.5 christos crx-*)
1168 1.5 christos basic_os=${basic_os:-elf}
1169 1.1 tron ;;
1170 1.5 christos neo-tandem)
1171 1.5 christos cpu=neo
1172 1.5 christos vendor=tandem
1173 1.1 tron ;;
1174 1.5 christos nse-tandem)
1175 1.5 christos cpu=nse
1176 1.5 christos vendor=tandem
1177 1.1 tron ;;
1178 1.5 christos nsr-tandem)
1179 1.5 christos cpu=nsr
1180 1.5 christos vendor=tandem
1181 1.1 tron ;;
1182 1.5 christos nsv-tandem)
1183 1.5 christos cpu=nsv
1184 1.5 christos vendor=tandem
1185 1.1 tron ;;
1186 1.5 christos nsx-tandem)
1187 1.5 christos cpu=nsx
1188 1.5 christos vendor=tandem
1189 1.1 tron ;;
1190 1.5 christos mipsallegrexel-sony)
1191 1.5 christos cpu=mipsallegrexel
1192 1.5 christos vendor=sony
1193 1.1 tron ;;
1194 1.5 christos tile*-*)
1195 1.5 christos basic_os=${basic_os:-linux-gnu}
1196 1.1 tron ;;
1197 1.5 christos
1198 1.1 tron *)
1199 1.5 christos # Recognize the canonical CPU types that are allowed with any
1200 1.5 christos # company name.
1201 1.5 christos case $cpu in
1202 1.5 christos 1750a | 580 \
1203 1.5 christos | a29k \
1204 1.5 christos | aarch64 | aarch64_be \
1205 1.5 christos | abacus \
1206 1.5 christos | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1207 1.5 christos | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1208 1.5 christos | alphapca5[67] | alpha64pca5[67] \
1209 1.5 christos | am33_2.0 \
1210 1.5 christos | amdgcn \
1211 1.6 wiz | arc | arceb | arc32 | arc64 \
1212 1.5 christos | arm | arm[lb]e | arme[lb] | armv* \
1213 1.5 christos | avr | avr32 \
1214 1.5 christos | asmjs \
1215 1.5 christos | ba \
1216 1.5 christos | be32 | be64 \
1217 1.5 christos | bfin | bpf | bs2000 \
1218 1.5 christos | c[123]* | c30 | [cjt]90 | c4x \
1219 1.5 christos | c8051 | clipper | craynv | csky | cydra \
1220 1.5 christos | d10v | d30v | dlx | dsp16xx | dvp \
1221 1.5 christos | e2k | elxsi | epiphany \
1222 1.5 christos | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1223 1.5 christos | h8300 | h8500 \
1224 1.5 christos | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1225 1.5 christos | hexagon \
1226 1.5 christos | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1227 1.5 christos | ip2k | iq2000 \
1228 1.5 christos | k1om \
1229 1.5 christos | le32 | le64 \
1230 1.5 christos | lm32 \
1231 1.5 christos | loongarch32 | loongarch64 | loongarchx32 \
1232 1.5 christos | m32c | m32r | m32rle \
1233 1.5 christos | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1234 1.5 christos | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1235 1.5 christos | m88110 | m88k | maxq | mb | mcore | mep | metag \
1236 1.5 christos | microblaze | microblazeel \
1237 1.5 christos | mips | mipsbe | mipseb | mipsel | mipsle \
1238 1.5 christos | mips16 \
1239 1.5 christos | mips64 | mips64eb | mips64el \
1240 1.5 christos | mips64octeon | mips64octeonel \
1241 1.5 christos | mips64orion | mips64orionel \
1242 1.5 christos | mips64r5900 | mips64r5900el \
1243 1.5 christos | mips64vr | mips64vrel \
1244 1.5 christos | mips64vr4100 | mips64vr4100el \
1245 1.5 christos | mips64vr4300 | mips64vr4300el \
1246 1.5 christos | mips64vr5000 | mips64vr5000el \
1247 1.5 christos | mips64vr5900 | mips64vr5900el \
1248 1.5 christos | mipsisa32 | mipsisa32el \
1249 1.5 christos | mipsisa32r2 | mipsisa32r2el \
1250 1.6 wiz | mipsisa32r3 | mipsisa32r3el \
1251 1.6 wiz | mipsisa32r5 | mipsisa32r5el \
1252 1.5 christos | mipsisa32r6 | mipsisa32r6el \
1253 1.5 christos | mipsisa64 | mipsisa64el \
1254 1.5 christos | mipsisa64r2 | mipsisa64r2el \
1255 1.6 wiz | mipsisa64r3 | mipsisa64r3el \
1256 1.6 wiz | mipsisa64r5 | mipsisa64r5el \
1257 1.5 christos | mipsisa64r6 | mipsisa64r6el \
1258 1.5 christos | mipsisa64sb1 | mipsisa64sb1el \
1259 1.5 christos | mipsisa64sr71k | mipsisa64sr71kel \
1260 1.5 christos | mipsr5900 | mipsr5900el \
1261 1.5 christos | mipstx39 | mipstx39el \
1262 1.5 christos | mmix \
1263 1.5 christos | mn10200 | mn10300 \
1264 1.5 christos | moxie \
1265 1.5 christos | mt \
1266 1.5 christos | msp430 \
1267 1.5 christos | nds32 | nds32le | nds32be \
1268 1.5 christos | nfp \
1269 1.5 christos | nios | nios2 | nios2eb | nios2el \
1270 1.5 christos | none | np1 | ns16k | ns32k | nvptx \
1271 1.5 christos | open8 \
1272 1.5 christos | or1k* \
1273 1.5 christos | or32 \
1274 1.5 christos | orion \
1275 1.5 christos | picochip \
1276 1.5 christos | pdp10 | pdp11 | pj | pjl | pn | power \
1277 1.5 christos | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1278 1.5 christos | pru \
1279 1.5 christos | pyramid \
1280 1.5 christos | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
1281 1.5 christos | rl78 | romp | rs6000 | rx \
1282 1.5 christos | s390 | s390x \
1283 1.5 christos | score \
1284 1.5 christos | sh | shl \
1285 1.5 christos | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1286 1.5 christos | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1287 1.5 christos | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1288 1.5 christos | sparclite \
1289 1.5 christos | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1290 1.5 christos | spu \
1291 1.5 christos | tahoe \
1292 1.5 christos | thumbv7* \
1293 1.5 christos | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1294 1.5 christos | tron \
1295 1.5 christos | ubicom32 \
1296 1.5 christos | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1297 1.5 christos | vax \
1298 1.5 christos | visium \
1299 1.5 christos | w65 \
1300 1.5 christos | wasm32 | wasm64 \
1301 1.5 christos | we32k \
1302 1.5 christos | x86 | x86_64 | xc16x | xgate | xps100 \
1303 1.5 christos | xstormy16 | xtensa* \
1304 1.5 christos | ymp \
1305 1.5 christos | z8k | z80)
1306 1.5 christos ;;
1307 1.5 christos
1308 1.5 christos *)
1309 1.5 christos echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1310 1.5 christos exit 1
1311 1.5 christos ;;
1312 1.5 christos esac
1313 1.1 tron ;;
1314 1.1 tron esac
1315 1.1 tron
1316 1.1 tron # Here we canonicalize certain aliases for manufacturers.
1317 1.5 christos case $vendor in
1318 1.5 christos digital*)
1319 1.5 christos vendor=dec
1320 1.1 tron ;;
1321 1.5 christos commodore*)
1322 1.5 christos vendor=cbm
1323 1.1 tron ;;
1324 1.1 tron *)
1325 1.1 tron ;;
1326 1.1 tron esac
1327 1.1 tron
1328 1.1 tron # Decode manufacturer-specific aliases for certain operating systems.
1329 1.1 tron
1330 1.5 christos if test x$basic_os != x
1331 1.1 tron then
1332 1.5 christos
1333 1.6 wiz # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
1334 1.5 christos # set os.
1335 1.5 christos case $basic_os in
1336 1.5 christos gnu/linux*)
1337 1.5 christos kernel=linux
1338 1.6 wiz os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
1339 1.5 christos ;;
1340 1.5 christos os2-emx)
1341 1.5 christos kernel=os2
1342 1.6 wiz os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
1343 1.5 christos ;;
1344 1.5 christos nto-qnx*)
1345 1.5 christos kernel=nto
1346 1.6 wiz os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
1347 1.5 christos ;;
1348 1.5 christos *-*)
1349 1.5 christos # shellcheck disable=SC2162
1350 1.6 wiz saved_IFS=$IFS
1351 1.5 christos IFS="-" read kernel os <<EOF
1352 1.5 christos $basic_os
1353 1.5 christos EOF
1354 1.6 wiz IFS=$saved_IFS
1355 1.5 christos ;;
1356 1.5 christos # Default OS when just kernel was specified
1357 1.5 christos nto*)
1358 1.5 christos kernel=nto
1359 1.6 wiz os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
1360 1.5 christos ;;
1361 1.5 christos linux*)
1362 1.5 christos kernel=linux
1363 1.6 wiz os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
1364 1.5 christos ;;
1365 1.5 christos *)
1366 1.5 christos kernel=
1367 1.5 christos os=$basic_os
1368 1.5 christos ;;
1369 1.5 christos esac
1370 1.5 christos
1371 1.5 christos # Now, normalize the OS (knowing we just have one component, it's not a kernel,
1372 1.5 christos # etc.)
1373 1.1 tron case $os in
1374 1.4 maya # First match some system type aliases that might get confused
1375 1.4 maya # with valid system types.
1376 1.5 christos # solaris* is a basic system type, with this one exception.
1377 1.5 christos auroraux)
1378 1.5 christos os=auroraux
1379 1.5 christos ;;
1380 1.5 christos bluegene*)
1381 1.5 christos os=cnk
1382 1.2 sevan ;;
1383 1.5 christos solaris1 | solaris1.*)
1384 1.6 wiz os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
1385 1.1 tron ;;
1386 1.5 christos solaris)
1387 1.5 christos os=solaris2
1388 1.1 tron ;;
1389 1.5 christos unixware*)
1390 1.5 christos os=sysv4.2uw
1391 1.1 tron ;;
1392 1.5 christos # es1800 is here to avoid being matched by es* (a different OS)
1393 1.5 christos es1800*)
1394 1.5 christos os=ose
1395 1.1 tron ;;
1396 1.5 christos # Some version numbers need modification
1397 1.5 christos chorusos*)
1398 1.5 christos os=chorusos
1399 1.1 tron ;;
1400 1.5 christos isc)
1401 1.5 christos os=isc2.2
1402 1.1 tron ;;
1403 1.5 christos sco6)
1404 1.5 christos os=sco5v6
1405 1.1 tron ;;
1406 1.5 christos sco5)
1407 1.5 christos os=sco3.2v5
1408 1.1 tron ;;
1409 1.5 christos sco4)
1410 1.5 christos os=sco3.2v4
1411 1.1 tron ;;
1412 1.5 christos sco3.2.[4-9]*)
1413 1.6 wiz os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
1414 1.1 tron ;;
1415 1.5 christos sco*v* | scout)
1416 1.5 christos # Don't match below
1417 1.1 tron ;;
1418 1.5 christos sco*)
1419 1.5 christos os=sco3.2v2
1420 1.1 tron ;;
1421 1.5 christos psos*)
1422 1.5 christos os=psos
1423 1.1 tron ;;
1424 1.5 christos qnx*)
1425 1.5 christos os=qnx
1426 1.1 tron ;;
1427 1.5 christos hiux*)
1428 1.5 christos os=hiuxwe2
1429 1.1 tron ;;
1430 1.5 christos lynx*178)
1431 1.5 christos os=lynxos178
1432 1.1 tron ;;
1433 1.5 christos lynx*5)
1434 1.5 christos os=lynxos5
1435 1.1 tron ;;
1436 1.5 christos lynxos*)
1437 1.5 christos # don't get caught up in next wildcard
1438 1.1 tron ;;
1439 1.5 christos lynx*)
1440 1.5 christos os=lynxos
1441 1.1 tron ;;
1442 1.5 christos mac[0-9]*)
1443 1.6 wiz os=`echo "$os" | sed -e 's|mac|macos|'`
1444 1.1 tron ;;
1445 1.5 christos opened*)
1446 1.5 christos os=openedition
1447 1.1 tron ;;
1448 1.5 christos os400*)
1449 1.5 christos os=os400
1450 1.1 tron ;;
1451 1.5 christos sunos5*)
1452 1.6 wiz os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1453 1.1 tron ;;
1454 1.5 christos sunos6*)
1455 1.6 wiz os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1456 1.1 tron ;;
1457 1.5 christos wince*)
1458 1.5 christos os=wince
1459 1.1 tron ;;
1460 1.5 christos utek*)
1461 1.5 christos os=bsd
1462 1.1 tron ;;
1463 1.5 christos dynix*)
1464 1.5 christos os=bsd
1465 1.1 tron ;;
1466 1.5 christos acis*)
1467 1.5 christos os=aos
1468 1.1 tron ;;
1469 1.5 christos atheos*)
1470 1.5 christos os=atheos
1471 1.1 tron ;;
1472 1.5 christos syllable*)
1473 1.5 christos os=syllable
1474 1.1 tron ;;
1475 1.5 christos 386bsd)
1476 1.5 christos os=bsd
1477 1.1 tron ;;
1478 1.5 christos ctix* | uts*)
1479 1.5 christos os=sysv
1480 1.1 tron ;;
1481 1.5 christos nova*)
1482 1.5 christos os=rtmk-nova
1483 1.1 tron ;;
1484 1.5 christos ns2)
1485 1.5 christos os=nextstep2
1486 1.1 tron ;;
1487 1.5 christos # Preserve the version number of sinix5.
1488 1.5 christos sinix5.*)
1489 1.6 wiz os=`echo "$os" | sed -e 's|sinix|sysv|'`
1490 1.1 tron ;;
1491 1.5 christos sinix*)
1492 1.5 christos os=sysv4
1493 1.1 tron ;;
1494 1.5 christos tpf*)
1495 1.5 christos os=tpf
1496 1.1 tron ;;
1497 1.5 christos triton*)
1498 1.5 christos os=sysv3
1499 1.1 tron ;;
1500 1.5 christos oss*)
1501 1.5 christos os=sysv3
1502 1.1 tron ;;
1503 1.5 christos svr4*)
1504 1.5 christos os=sysv4
1505 1.1 tron ;;
1506 1.5 christos svr3)
1507 1.5 christos os=sysv3
1508 1.1 tron ;;
1509 1.5 christos sysvr4)
1510 1.5 christos os=sysv4
1511 1.1 tron ;;
1512 1.5 christos ose*)
1513 1.5 christos os=ose
1514 1.1 tron ;;
1515 1.5 christos *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1516 1.5 christos os=mint
1517 1.1 tron ;;
1518 1.5 christos dicos*)
1519 1.5 christos os=dicos
1520 1.2 sevan ;;
1521 1.5 christos pikeos*)
1522 1.4 maya # Until real need of OS specific support for
1523 1.4 maya # particular features comes up, bare metal
1524 1.4 maya # configurations are quite functional.
1525 1.5 christos case $cpu in
1526 1.4 maya arm*)
1527 1.5 christos os=eabi
1528 1.4 maya ;;
1529 1.4 maya *)
1530 1.5 christos os=elf
1531 1.4 maya ;;
1532 1.4 maya esac
1533 1.4 maya ;;
1534 1.1 tron *)
1535 1.5 christos # No normalization, but not necessarily accepted, that comes below.
1536 1.1 tron ;;
1537 1.1 tron esac
1538 1.5 christos
1539 1.1 tron else
1540 1.1 tron
1541 1.1 tron # Here we handle the default operating systems that come with various machines.
1542 1.1 tron # The value should be what the vendor currently ships out the door with their
1543 1.1 tron # machine or put another way, the most popular os provided with the machine.
1544 1.1 tron
1545 1.1 tron # Note that if you're going to try to match "-MANUFACTURER" here (say,
1546 1.1 tron # "-sun"), then you have to tell the case statement up towards the top
1547 1.1 tron # that MANUFACTURER isn't an operating system. Otherwise, code above
1548 1.1 tron # will signal an error saying that MANUFACTURER isn't an operating
1549 1.1 tron # system, and we'll never get to this point.
1550 1.1 tron
1551 1.5 christos kernel=
1552 1.5 christos case $cpu-$vendor in
1553 1.2 sevan score-*)
1554 1.5 christos os=elf
1555 1.1 tron ;;
1556 1.2 sevan spu-*)
1557 1.5 christos os=elf
1558 1.1 tron ;;
1559 1.1 tron *-acorn)
1560 1.5 christos os=riscix1.2
1561 1.1 tron ;;
1562 1.1 tron arm*-rebel)
1563 1.5 christos kernel=linux
1564 1.5 christos os=gnu
1565 1.1 tron ;;
1566 1.1 tron arm*-semi)
1567 1.5 christos os=aout
1568 1.1 tron ;;
1569 1.2 sevan c4x-* | tic4x-*)
1570 1.5 christos os=coff
1571 1.2 sevan ;;
1572 1.2 sevan c8051-*)
1573 1.5 christos os=elf
1574 1.5 christos ;;
1575 1.5 christos clipper-intergraph)
1576 1.5 christos os=clix
1577 1.2 sevan ;;
1578 1.2 sevan hexagon-*)
1579 1.5 christos os=elf
1580 1.2 sevan ;;
1581 1.2 sevan tic54x-*)
1582 1.5 christos os=coff
1583 1.2 sevan ;;
1584 1.2 sevan tic55x-*)
1585 1.5 christos os=coff
1586 1.2 sevan ;;
1587 1.2 sevan tic6x-*)
1588 1.5 christos os=coff
1589 1.1 tron ;;
1590 1.1 tron # This must come before the *-dec entry.
1591 1.1 tron pdp10-*)
1592 1.5 christos os=tops20
1593 1.1 tron ;;
1594 1.1 tron pdp11-*)
1595 1.5 christos os=none
1596 1.1 tron ;;
1597 1.1 tron *-dec | vax-*)
1598 1.5 christos os=ultrix4.2
1599 1.1 tron ;;
1600 1.1 tron m68*-apollo)
1601 1.5 christos os=domain
1602 1.1 tron ;;
1603 1.1 tron i386-sun)
1604 1.5 christos os=sunos4.0.2
1605 1.1 tron ;;
1606 1.1 tron m68000-sun)
1607 1.5 christos os=sunos3
1608 1.1 tron ;;
1609 1.1 tron m68*-cisco)
1610 1.5 christos os=aout
1611 1.1 tron ;;
1612 1.2 sevan mep-*)
1613 1.5 christos os=elf
1614 1.2 sevan ;;
1615 1.1 tron mips*-cisco)
1616 1.5 christos os=elf
1617 1.1 tron ;;
1618 1.1 tron mips*-*)
1619 1.5 christos os=elf
1620 1.1 tron ;;
1621 1.1 tron or32-*)
1622 1.5 christos os=coff
1623 1.1 tron ;;
1624 1.1 tron *-tti) # must be before sparc entry or we get the wrong os.
1625 1.5 christos os=sysv3
1626 1.1 tron ;;
1627 1.1 tron sparc-* | *-sun)
1628 1.5 christos os=sunos4.1.1
1629 1.1 tron ;;
1630 1.2 sevan pru-*)
1631 1.5 christos os=elf
1632 1.2 sevan ;;
1633 1.1 tron *-be)
1634 1.5 christos os=beos
1635 1.1 tron ;;
1636 1.1 tron *-ibm)
1637 1.5 christos os=aix
1638 1.1 tron ;;
1639 1.2 sevan *-knuth)
1640 1.5 christos os=mmixware
1641 1.1 tron ;;
1642 1.1 tron *-wec)
1643 1.5 christos os=proelf
1644 1.1 tron ;;
1645 1.1 tron *-winbond)
1646 1.5 christos os=proelf
1647 1.1 tron ;;
1648 1.1 tron *-oki)
1649 1.5 christos os=proelf
1650 1.1 tron ;;
1651 1.1 tron *-hp)
1652 1.5 christos os=hpux
1653 1.1 tron ;;
1654 1.1 tron *-hitachi)
1655 1.5 christos os=hiux
1656 1.1 tron ;;
1657 1.1 tron i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1658 1.5 christos os=sysv
1659 1.1 tron ;;
1660 1.1 tron *-cbm)
1661 1.5 christos os=amigaos
1662 1.1 tron ;;
1663 1.1 tron *-dg)
1664 1.5 christos os=dgux
1665 1.1 tron ;;
1666 1.1 tron *-dolphin)
1667 1.5 christos os=sysv3
1668 1.1 tron ;;
1669 1.1 tron m68k-ccur)
1670 1.5 christos os=rtu
1671 1.1 tron ;;
1672 1.1 tron m88k-omron*)
1673 1.5 christos os=luna
1674 1.1 tron ;;
1675 1.4 maya *-next)
1676 1.5 christos os=nextstep
1677 1.1 tron ;;
1678 1.1 tron *-sequent)
1679 1.5 christos os=ptx
1680 1.1 tron ;;
1681 1.1 tron *-crds)
1682 1.5 christos os=unos
1683 1.1 tron ;;
1684 1.1 tron *-ns)
1685 1.5 christos os=genix
1686 1.1 tron ;;
1687 1.1 tron i370-*)
1688 1.5 christos os=mvs
1689 1.1 tron ;;
1690 1.1 tron *-gould)
1691 1.5 christos os=sysv
1692 1.1 tron ;;
1693 1.1 tron *-highlevel)
1694 1.5 christos os=bsd
1695 1.1 tron ;;
1696 1.1 tron *-encore)
1697 1.5 christos os=bsd
1698 1.1 tron ;;
1699 1.1 tron *-sgi)
1700 1.5 christos os=irix
1701 1.1 tron ;;
1702 1.1 tron *-siemens)
1703 1.5 christos os=sysv4
1704 1.1 tron ;;
1705 1.1 tron *-masscomp)
1706 1.5 christos os=rtu
1707 1.1 tron ;;
1708 1.1 tron f30[01]-fujitsu | f700-fujitsu)
1709 1.5 christos os=uxpv
1710 1.1 tron ;;
1711 1.1 tron *-rom68k)
1712 1.5 christos os=coff
1713 1.1 tron ;;
1714 1.1 tron *-*bug)
1715 1.5 christos os=coff
1716 1.1 tron ;;
1717 1.1 tron *-apple)
1718 1.5 christos os=macos
1719 1.1 tron ;;
1720 1.1 tron *-atari*)
1721 1.5 christos os=mint
1722 1.5 christos ;;
1723 1.5 christos *-wrs)
1724 1.5 christos os=vxworks
1725 1.1 tron ;;
1726 1.1 tron *)
1727 1.5 christos os=none
1728 1.1 tron ;;
1729 1.1 tron esac
1730 1.5 christos
1731 1.1 tron fi
1732 1.1 tron
1733 1.5 christos # Now, validate our (potentially fixed-up) OS.
1734 1.5 christos case $os in
1735 1.6 wiz # Sometimes we do "kernel-libc", so those need to count as OSes.
1736 1.6 wiz musl* | newlib* | relibc* | uclibc*)
1737 1.5 christos ;;
1738 1.6 wiz # Likewise for "kernel-abi"
1739 1.5 christos eabi* | gnueabi*)
1740 1.5 christos ;;
1741 1.6 wiz # VxWorks passes extra cpu info in the 4th filed.
1742 1.6 wiz simlinux | simwindows | spe)
1743 1.6 wiz ;;
1744 1.5 christos # Now accept the basic system types.
1745 1.5 christos # The portable systems comes first.
1746 1.5 christos # Each alternative MUST end in a * to match a version number.
1747 1.5 christos gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1748 1.5 christos | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1749 1.5 christos | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1750 1.5 christos | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1751 1.5 christos | hiux* | abug | nacl* | netware* | windows* \
1752 1.5 christos | os9* | macos* | osx* | ios* \
1753 1.5 christos | mpw* | magic* | mmixware* | mon960* | lnews* \
1754 1.5 christos | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1755 1.5 christos | aos* | aros* | cloudabi* | sortix* | twizzler* \
1756 1.5 christos | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1757 1.5 christos | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1758 1.5 christos | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1759 1.6 wiz | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
1760 1.5 christos | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1761 1.5 christos | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1762 1.5 christos | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1763 1.5 christos | udi* | lites* | ieee* | go32* | aux* | hcos* \
1764 1.6 wiz | chorusrdb* | cegcc* | glidix* | serenity* \
1765 1.5 christos | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1766 1.5 christos | midipix* | mingw32* | mingw64* | mint* \
1767 1.5 christos | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1768 1.5 christos | interix* | uwin* | mks* | rhapsody* | darwin* \
1769 1.5 christos | openstep* | oskit* | conix* | pw32* | nonstopux* \
1770 1.5 christos | storm-chaos* | tops10* | tenex* | tops20* | its* | irx* \
1771 1.5 christos | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1772 1.5 christos | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1773 1.5 christos | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1774 1.5 christos | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1775 1.5 christos | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1776 1.5 christos | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1777 1.6 wiz | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
1778 1.6 wiz | fiwix* )
1779 1.5 christos ;;
1780 1.5 christos # This one is extra strict with allowed versions
1781 1.5 christos sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1782 1.5 christos # Don't forget version if it is 3.2v4 or newer.
1783 1.5 christos ;;
1784 1.5 christos none)
1785 1.5 christos ;;
1786 1.5 christos *)
1787 1.5 christos echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
1788 1.5 christos exit 1
1789 1.5 christos ;;
1790 1.5 christos esac
1791 1.5 christos
1792 1.5 christos # As a final step for OS-related things, validate the OS-kernel combination
1793 1.5 christos # (given a valid OS), if there is a kernel.
1794 1.5 christos case $kernel-$os in
1795 1.6 wiz linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
1796 1.6 wiz | linux-musl* | linux-relibc* | linux-uclibc* )
1797 1.5 christos ;;
1798 1.5 christos uclinux-uclibc* )
1799 1.5 christos ;;
1800 1.6 wiz -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
1801 1.5 christos # These are just libc implementations, not actual OSes, and thus
1802 1.5 christos # require a kernel.
1803 1.5 christos echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
1804 1.5 christos exit 1
1805 1.5 christos ;;
1806 1.5 christos kfreebsd*-gnu* | kopensolaris*-gnu*)
1807 1.5 christos ;;
1808 1.6 wiz vxworks-simlinux | vxworks-simwindows | vxworks-spe)
1809 1.6 wiz ;;
1810 1.5 christos nto-qnx*)
1811 1.5 christos ;;
1812 1.5 christos os2-emx)
1813 1.5 christos ;;
1814 1.5 christos *-eabi* | *-gnueabi*)
1815 1.5 christos ;;
1816 1.5 christos -*)
1817 1.5 christos # Blank kernel with real OS is always fine.
1818 1.5 christos ;;
1819 1.5 christos *-*)
1820 1.5 christos echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
1821 1.5 christos exit 1
1822 1.5 christos ;;
1823 1.5 christos esac
1824 1.5 christos
1825 1.1 tron # Here we handle the case where we know the os, and the CPU type, but not the
1826 1.1 tron # manufacturer. We pick the logical manufacturer.
1827 1.5 christos case $vendor in
1828 1.5 christos unknown)
1829 1.5 christos case $cpu-$os in
1830 1.5 christos *-riscix*)
1831 1.1 tron vendor=acorn
1832 1.1 tron ;;
1833 1.5 christos *-sunos*)
1834 1.1 tron vendor=sun
1835 1.1 tron ;;
1836 1.5 christos *-cnk* | *-aix*)
1837 1.1 tron vendor=ibm
1838 1.1 tron ;;
1839 1.5 christos *-beos*)
1840 1.1 tron vendor=be
1841 1.1 tron ;;
1842 1.5 christos *-hpux*)
1843 1.1 tron vendor=hp
1844 1.1 tron ;;
1845 1.5 christos *-mpeix*)
1846 1.1 tron vendor=hp
1847 1.1 tron ;;
1848 1.5 christos *-hiux*)
1849 1.1 tron vendor=hitachi
1850 1.1 tron ;;
1851 1.5 christos *-unos*)
1852 1.1 tron vendor=crds
1853 1.1 tron ;;
1854 1.5 christos *-dgux*)
1855 1.1 tron vendor=dg
1856 1.1 tron ;;
1857 1.5 christos *-luna*)
1858 1.1 tron vendor=omron
1859 1.1 tron ;;
1860 1.5 christos *-genix*)
1861 1.1 tron vendor=ns
1862 1.1 tron ;;
1863 1.5 christos *-clix*)
1864 1.5 christos vendor=intergraph
1865 1.5 christos ;;
1866 1.5 christos *-mvs* | *-opened*)
1867 1.5 christos vendor=ibm
1868 1.5 christos ;;
1869 1.5 christos *-os400*)
1870 1.1 tron vendor=ibm
1871 1.1 tron ;;
1872 1.5 christos s390-* | s390x-*)
1873 1.1 tron vendor=ibm
1874 1.1 tron ;;
1875 1.5 christos *-ptx*)
1876 1.1 tron vendor=sequent
1877 1.1 tron ;;
1878 1.5 christos *-tpf*)
1879 1.1 tron vendor=ibm
1880 1.1 tron ;;
1881 1.5 christos *-vxsim* | *-vxworks* | *-windiss*)
1882 1.1 tron vendor=wrs
1883 1.1 tron ;;
1884 1.5 christos *-aux*)
1885 1.1 tron vendor=apple
1886 1.1 tron ;;
1887 1.5 christos *-hms*)
1888 1.1 tron vendor=hitachi
1889 1.1 tron ;;
1890 1.5 christos *-mpw* | *-macos*)
1891 1.1 tron vendor=apple
1892 1.1 tron ;;
1893 1.5 christos *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
1894 1.1 tron vendor=atari
1895 1.1 tron ;;
1896 1.5 christos *-vos*)
1897 1.1 tron vendor=stratus
1898 1.1 tron ;;
1899 1.1 tron esac
1900 1.1 tron ;;
1901 1.1 tron esac
1902 1.1 tron
1903 1.5 christos echo "$cpu-$vendor-${kernel:+$kernel-}$os"
1904 1.1 tron exit
1905 1.1 tron
1906 1.1 tron # Local variables:
1907 1.5 christos # eval: (add-hook 'before-save-hook 'time-stamp)
1908 1.1 tron # time-stamp-start: "timestamp='"
1909 1.1 tron # time-stamp-format: "%:y-%02m-%02d"
1910 1.1 tron # time-stamp-end: "'"
1911 1.1 tron # End:
1912