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