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