comparison config.sub @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 #! /bin/sh 1 #! /bin/sh
2 # Configuration validation subroutine script. 2 # Configuration validation subroutine script.
3 # Copyright 1992-2018 Free Software Foundation, Inc. 3 # Copyright 1992-2019 Free Software Foundation, Inc.
4 4
5 timestamp='2018-07-03' 5 timestamp='2019-06-30'
6 6
7 # This file is free software; you can redistribute it and/or modify it 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 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 9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version. 10 # (at your option) any later version.
65 Report bugs and patches to <config-patches@gnu.org>." 65 Report bugs and patches to <config-patches@gnu.org>."
66 66
67 version="\ 67 version="\
68 GNU config.sub ($timestamp) 68 GNU config.sub ($timestamp)
69 69
70 Copyright 1992-2018 Free Software Foundation, Inc. 70 Copyright 1992-2019 Free Software Foundation, Inc.
71 71
72 This is free software; see the source for copying conditions. There is NO 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." 73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
74 74
75 help=" 75 help="
87 -- ) # Stop option processing 87 -- ) # Stop option processing
88 shift; break ;; 88 shift; break ;;
89 - ) # Use stdin as input. 89 - ) # Use stdin as input.
90 break ;; 90 break ;;
91 -* ) 91 -* )
92 echo "$me: invalid option $1$help" 92 echo "$me: invalid option $1$help" >&2
93 exit 1 ;; 93 exit 1 ;;
94 94
95 *local*) 95 *local*)
96 # First pass through any local machine types. 96 # First pass through any local machine types.
97 echo "$1" 97 echo "$1"
109 *) echo "$me: too many arguments$help" >&2 109 *) echo "$me: too many arguments$help" >&2
110 exit 1;; 110 exit 1;;
111 esac 111 esac
112 112
113 # Split fields of configuration type 113 # Split fields of configuration type
114 IFS="-" read -r field1 field2 field3 field4 <<EOF 114 # shellcheck disable=SC2162
115 IFS="-" read field1 field2 field3 field4 <<EOF
115 $1 116 $1
116 EOF 117 EOF
117 118
118 # Separate into logical components for further validation 119 # Separate into logical components for further validation
119 case $1 in 120 case $1 in
147 os=$field3 148 os=$field3
148 ;; 149 ;;
149 esac 150 esac
150 ;; 151 ;;
151 *-*) 152 *-*)
152 # Second component is usually, but not always the OS 153 # A lone config we happen to match not fitting any pattern
153 case $field2 in 154 case $field1-$field2 in
154 # Prevent following clause from handling this valid os 155 decstation-3100)
155 sun*os*) 156 basic_machine=mips-dec
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= 157 os=
170 ;; 158 ;;
171 *) 159 *-*)
172 basic_machine=$field1 160 # Second component is usually, but not always the OS
173 os=$field2 161 case $field2 in
174 ;; 162 # Prevent following clause from handling this valid os
163 sun*os*)
164 basic_machine=$field1
165 os=$field2
166 ;;
167 # Manufacturers
168 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
169 | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
170 | unicom* | ibm* | next | hp | isi* | apollo | altos* \
171 | convergent* | ncr* | news | 32* | 3600* | 3100* \
172 | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
173 | ultra | tti* | harris | dolphin | highlevel | gould \
174 | cbm | ns | masscomp | apple | axis | knuth | cray \
175 | microblaze* | sim | cisco \
176 | oki | wec | wrs | winbond)
177 basic_machine=$field1-$field2
178 os=
179 ;;
180 *)
181 basic_machine=$field1
182 os=$field2
183 ;;
184 esac
185 ;;
175 esac 186 esac
176 ;; 187 ;;
177 *) 188 *)
178 # Convert single-component short-hands not valid as part of 189 # Convert single-component short-hands not valid as part of
179 # multi-component configurations. 190 # multi-component configurations.
188 ;; 199 ;;
189 adobe68k) 200 adobe68k)
190 basic_machine=m68010-adobe 201 basic_machine=m68010-adobe
191 os=scout 202 os=scout
192 ;; 203 ;;
204 alliant)
205 basic_machine=fx80-alliant
206 os=
207 ;;
208 altos | altos3068)
209 basic_machine=m68k-altos
210 os=
211 ;;
193 am29k) 212 am29k)
194 basic_machine=a29k-none 213 basic_machine=a29k-none
195 os=bsd 214 os=bsd
196 ;; 215 ;;
197 amdahl) 216 amdahl)
198 basic_machine=580-amdahl 217 basic_machine=580-amdahl
199 os=sysv 218 os=sysv
200 ;; 219 ;;
220 amiga)
221 basic_machine=m68k-unknown
222 os=
223 ;;
201 amigaos | amigados) 224 amigaos | amigados)
202 basic_machine=m68k-unknown 225 basic_machine=m68k-unknown
203 os=amigaos 226 os=amigaos
204 ;; 227 ;;
205 amigaunix | amix) 228 amigaunix | amix)
232 ;; 255 ;;
233 cegcc) 256 cegcc)
234 basic_machine=arm-unknown 257 basic_machine=arm-unknown
235 os=cegcc 258 os=cegcc
236 ;; 259 ;;
260 convex-c1)
261 basic_machine=c1-convex
262 os=bsd
263 ;;
264 convex-c2)
265 basic_machine=c2-convex
266 os=bsd
267 ;;
268 convex-c32)
269 basic_machine=c32-convex
270 os=bsd
271 ;;
272 convex-c34)
273 basic_machine=c34-convex
274 os=bsd
275 ;;
276 convex-c38)
277 basic_machine=c38-convex
278 os=bsd
279 ;;
237 cray) 280 cray)
238 basic_machine=j90-cray 281 basic_machine=j90-cray
239 os=unicos 282 os=unicos
240 ;; 283 ;;
241 craynv) 284 crds | unos)
242 basic_machine=craynv-cray 285 basic_machine=m68k-crds
243 os=unicosmp 286 os=
287 ;;
288 da30)
289 basic_machine=m68k-da30
290 os=
291 ;;
292 decstation | pmax | pmin | dec3100 | decstatn)
293 basic_machine=mips-dec
294 os=
244 ;; 295 ;;
245 delta88) 296 delta88)
246 basic_machine=m88k-motorola 297 basic_machine=m88k-motorola
247 os=sysv3 298 os=sysv3
248 ;; 299 ;;
284 ;; 335 ;;
285 harris) 336 harris)
286 basic_machine=m88k-harris 337 basic_machine=m88k-harris
287 os=sysv3 338 os=sysv3
288 ;; 339 ;;
340 hp300 | hp300hpux)
341 basic_machine=m68k-hp
342 os=hpux
343 ;;
289 hp300bsd) 344 hp300bsd)
290 basic_machine=m68k-hp 345 basic_machine=m68k-hp
291 os=bsd 346 os=bsd
292 ;; 347 ;;
293 hp300hpux)
294 basic_machine=m68k-hp
295 os=hpux
296 ;;
297 hppaosf) 348 hppaosf)
298 basic_machine=hppa1.1-hp 349 basic_machine=hppa1.1-hp
299 os=osf 350 os=osf
300 ;; 351 ;;
301 hppro) 352 hppro)
304 ;; 355 ;;
305 i386mach) 356 i386mach)
306 basic_machine=i386-mach 357 basic_machine=i386-mach
307 os=mach 358 os=mach
308 ;; 359 ;;
309 vsta)
310 basic_machine=i386-unknown
311 os=vsta
312 ;;
313 isi68 | isi) 360 isi68 | isi)
314 basic_machine=m68k-isi 361 basic_machine=m68k-isi
315 os=sysv 362 os=sysv
316 ;; 363 ;;
317 m68knommu) 364 m68knommu)
369 ncr3000) 416 ncr3000)
370 basic_machine=i486-ncr 417 basic_machine=i486-ncr
371 os=sysv4 418 os=sysv4
372 ;; 419 ;;
373 netbsd386) 420 netbsd386)
374 basic_machine=i386-unknown 421 basic_machine=i386-pc
375 os=netbsd 422 os=netbsd
376 ;; 423 ;;
377 netwinder) 424 netwinder)
378 basic_machine=armv4l-rebel 425 basic_machine=armv4l-rebel
379 os=linux 426 os=linux
452 ;; 499 ;;
453 sei) 500 sei)
454 basic_machine=mips-sei 501 basic_machine=mips-sei
455 os=seiux 502 os=seiux
456 ;; 503 ;;
504 sequent)
505 basic_machine=i386-sequent
506 os=
507 ;;
457 sps7) 508 sps7)
458 basic_machine=m68k-bull 509 basic_machine=m68k-bull
459 os=sysv2 510 os=sysv2
460 ;; 511 ;;
512 st2000)
513 basic_machine=m68k-tandem
514 os=
515 ;;
461 stratus) 516 stratus)
462 basic_machine=i860-stratus 517 basic_machine=i860-stratus
463 os=sysv4 518 os=sysv4
464 ;; 519 ;;
520 sun2)
521 basic_machine=m68000-sun
522 os=
523 ;;
465 sun2os3) 524 sun2os3)
466 basic_machine=m68000-sun 525 basic_machine=m68000-sun
467 os=sunos3 526 os=sunos3
468 ;; 527 ;;
469 sun2os4) 528 sun2os4)
470 basic_machine=m68000-sun 529 basic_machine=m68000-sun
471 os=sunos4 530 os=sunos4
472 ;; 531 ;;
532 sun3)
533 basic_machine=m68k-sun
534 os=
535 ;;
473 sun3os3) 536 sun3os3)
474 basic_machine=m68k-sun 537 basic_machine=m68k-sun
475 os=sunos3 538 os=sunos3
476 ;; 539 ;;
477 sun3os4) 540 sun3os4)
478 basic_machine=m68k-sun 541 basic_machine=m68k-sun
479 os=sunos4 542 os=sunos4
480 ;; 543 ;;
544 sun4)
545 basic_machine=sparc-sun
546 os=
547 ;;
481 sun4os3) 548 sun4os3)
482 basic_machine=sparc-sun 549 basic_machine=sparc-sun
483 os=sunos3 550 os=sunos3
484 ;; 551 ;;
485 sun4os4) 552 sun4os4)
488 ;; 555 ;;
489 sun4sol2) 556 sun4sol2)
490 basic_machine=sparc-sun 557 basic_machine=sparc-sun
491 os=solaris2 558 os=solaris2
492 ;; 559 ;;
560 sun386 | sun386i | roadrunner)
561 basic_machine=i386-sun
562 os=
563 ;;
493 sv1) 564 sv1)
494 basic_machine=sv1-cray 565 basic_machine=sv1-cray
495 os=unicos 566 os=unicos
496 ;; 567 ;;
497 symmetry) 568 symmetry)
532 ;; 603 ;;
533 vms) 604 vms)
534 basic_machine=vax-dec 605 basic_machine=vax-dec
535 os=vms 606 os=vms
536 ;; 607 ;;
608 vsta)
609 basic_machine=i386-pc
610 os=vsta
611 ;;
537 vxworks960) 612 vxworks960)
538 basic_machine=i960-wrs 613 basic_machine=i960-wrs
539 os=vxworks 614 os=vxworks
540 ;; 615 ;;
541 vxworks68) 616 vxworks68)
560 ;; 635 ;;
561 esac 636 esac
562 ;; 637 ;;
563 esac 638 esac
564 639
565 # Decode aliases for certain CPU-COMPANY combinations. 640 # Decode 1-component or ad-hoc basic machines
566 case $basic_machine in 641 case $basic_machine in
567 # Recognize the basic CPU types without company name. 642 # Here we handle the default manufacturer of certain CPU types. It is in
568 # Some are omitted here because they have special meanings below. 643 # some cases the only manufacturer, in others, it is the most popular.
569 1750a | 580 \ 644 w89k)
570 | a29k \ 645 cpu=hppa1.1
571 | aarch64 | aarch64_be \ 646 vendor=winbond
572 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 647 ;;
573 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 648 op50n)
574 | am33_2.0 \ 649 cpu=hppa1.1
575 | arc | arceb \ 650 vendor=oki
576 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ 651 ;;
577 | avr | avr32 \ 652 op60c)
578 | ba \ 653 cpu=hppa1.1
579 | be32 | be64 \ 654 vendor=oki
580 | bfin \ 655 ;;
581 | c4x | c8051 | clipper | csky \ 656 ibm*)
582 | d10v | d30v | dlx | dsp16xx \ 657 cpu=i370
583 | e2k | epiphany \ 658 vendor=ibm
584 | fido | fr30 | frv | ft32 \ 659 ;;
585 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 660 orion105)
586 | hexagon \ 661 cpu=clipper
587 | i370 | i860 | i960 | ia16 | ia64 \ 662 vendor=highlevel
588 | ip2k | iq2000 \ 663 ;;
589 | k1om \ 664 mac | mpw | mac-mpw)
590 | le32 | le64 \ 665 cpu=m68k
591 | lm32 \ 666 vendor=apple
592 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 667 ;;
593 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 668 pmac | pmac-mpw)
594 | mips | mipsbe | mipseb | mipsel | mipsle \ 669 cpu=powerpc
595 | mips16 \ 670 vendor=apple
596 | mips64 | mips64el \ 671 ;;
597 | mips64octeon | mips64octeonel \ 672
598 | mips64orion | mips64orionel \
599 | mips64r5900 | mips64r5900el \
600 | mips64vr | mips64vrel \
601 | mips64vr4100 | mips64vr4100el \
602 | mips64vr4300 | mips64vr4300el \
603 | mips64vr5000 | mips64vr5000el \
604 | mips64vr5900 | mips64vr5900el \
605 | mipsisa32 | mipsisa32el \
606 | mipsisa32r2 | mipsisa32r2el \
607 | mipsisa32r6 | mipsisa32r6el \
608 | mipsisa64 | mipsisa64el \
609 | mipsisa64r2 | mipsisa64r2el \
610 | mipsisa64r6 | mipsisa64r6el \
611 | mipsisa64sb1 | mipsisa64sb1el \
612 | mipsisa64sr71k | mipsisa64sr71kel \
613 | mipsr5900 | mipsr5900el \
614 | mipstx39 | mipstx39el \
615 | mn10200 | mn10300 \
616 | moxie \
617 | mt \
618 | msp430 \
619 | nds32 | nds32le | nds32be \
620 | nfp \
621 | nios | nios2 | nios2eb | nios2el \
622 | ns16k | ns32k \
623 | open8 | or1k | or1knd | or32 \
624 | pdp10 | pj | pjl \
625 | powerpc | powerpc64 | powerpc64le | powerpcle \
626 | pru \
627 | pyramid \
628 | riscv | riscv32 | riscv64 \
629 | rl78 | rx \
630 | score \
631 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
632 | sh64 | sh64le \
633 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
634 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
635 | spu \
636 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
637 | ubicom32 \
638 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
639 | visium \
640 | wasm32 \
641 | x86 | xc16x | xstormy16 | xtensa \
642 | z8k | z80)
643 basic_machine=$basic_machine-unknown
644 ;;
645 c54x)
646 basic_machine=tic54x-unknown
647 ;;
648 c55x)
649 basic_machine=tic55x-unknown
650 ;;
651 c6x)
652 basic_machine=tic6x-unknown
653 ;;
654 leon|leon[3-9])
655 basic_machine=sparc-$basic_machine
656 ;;
657 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
658 basic_machine=$basic_machine-unknown
659 os=${os:-none}
660 ;;
661 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
662 ;;
663 m9s12z | m68hcs12z | hcs12z | s12z)
664 basic_machine=s12z-unknown
665 os=${os:-none}
666 ;;
667 ms1)
668 basic_machine=mt-unknown
669 ;;
670 strongarm | thumb | xscale)
671 basic_machine=arm-unknown
672 ;;
673 xgate)
674 basic_machine=$basic_machine-unknown
675 os=${os:-none}
676 ;;
677 xscaleeb)
678 basic_machine=armeb-unknown
679 ;;
680
681 xscaleel)
682 basic_machine=armel-unknown
683 ;;
684
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.
688 i*86 | x86_64)
689 basic_machine=$basic_machine-pc
690 ;;
691 # Recognize the basic CPU types with company name.
692 580-* \
693 | a29k-* \
694 | aarch64-* | aarch64_be-* \
695 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
696 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
697 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
698 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
699 | avr-* | avr32-* \
700 | ba-* \
701 | be32-* | be64-* \
702 | bfin-* | bs2000-* \
703 | c[123]* | c30-* | [cjt]90-* | c4x-* \
704 | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
705 | d10v-* | d30v-* | dlx-* \
706 | e2k-* | elxsi-* \
707 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
708 | h8300-* | h8500-* \
709 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
710 | hexagon-* \
711 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
712 | ip2k-* | iq2000-* \
713 | k1om-* \
714 | le32-* | le64-* \
715 | lm32-* \
716 | m32c-* | m32r-* | m32rle-* \
717 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
718 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
719 | microblaze-* | microblazeel-* \
720 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
721 | mips16-* \
722 | mips64-* | mips64el-* \
723 | mips64octeon-* | mips64octeonel-* \
724 | mips64orion-* | mips64orionel-* \
725 | mips64r5900-* | mips64r5900el-* \
726 | mips64vr-* | mips64vrel-* \
727 | mips64vr4100-* | mips64vr4100el-* \
728 | mips64vr4300-* | mips64vr4300el-* \
729 | mips64vr5000-* | mips64vr5000el-* \
730 | mips64vr5900-* | mips64vr5900el-* \
731 | mipsisa32-* | mipsisa32el-* \
732 | mipsisa32r2-* | mipsisa32r2el-* \
733 | mipsisa32r6-* | mipsisa32r6el-* \
734 | mipsisa64-* | mipsisa64el-* \
735 | mipsisa64r2-* | mipsisa64r2el-* \
736 | mipsisa64r6-* | mipsisa64r6el-* \
737 | mipsisa64sb1-* | mipsisa64sb1el-* \
738 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
739 | mipsr5900-* | mipsr5900el-* \
740 | mipstx39-* | mipstx39el-* \
741 | mmix-* \
742 | mt-* \
743 | msp430-* \
744 | nds32-* | nds32le-* | nds32be-* \
745 | nfp-* \
746 | nios-* | nios2-* | nios2eb-* | nios2el-* \
747 | none-* | np1-* | ns16k-* | ns32k-* \
748 | open8-* \
749 | or1k*-* \
750 | orion-* \
751 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
752 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
753 | pru-* \
754 | pyramid-* \
755 | riscv-* | riscv32-* | riscv64-* \
756 | rl78-* | romp-* | rs6000-* | rx-* \
757 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
758 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
759 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
760 | sparclite-* \
761 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
762 | tahoe-* \
763 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
764 | tile*-* \
765 | tron-* \
766 | ubicom32-* \
767 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
768 | vax-* \
769 | visium-* \
770 | wasm32-* \
771 | we32k-* \
772 | x86-* | x86_64-* | xc16x-* | xps100-* \
773 | xstormy16-* | xtensa*-* \
774 | ymp-* \
775 | z8k-* | z80-*)
776 ;;
777 # Recognize the basic CPU types without company name, with glob match.
778 xtensa*)
779 basic_machine=$basic_machine-unknown
780 ;;
781 # Recognize the various machine names and aliases which stand 673 # Recognize the various machine names and aliases which stand
782 # for a CPU type and a company and sometimes even an OS. 674 # for a CPU type and a company and sometimes even an OS.
783 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 675 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
784 basic_machine=m68000-att 676 cpu=m68000
677 vendor=att
785 ;; 678 ;;
786 3b*) 679 3b*)
787 basic_machine=we32k-att 680 cpu=we32k
788 ;; 681 vendor=att
789 abacus)
790 basic_machine=abacus-unknown
791 ;;
792 alliant | fx80)
793 basic_machine=fx80-alliant
794 ;;
795 altos | altos3068)
796 basic_machine=m68k-altos
797 ;;
798 amd64)
799 basic_machine=x86_64-pc
800 ;;
801 amd64-*)
802 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
803 ;;
804 amiga | amiga-*)
805 basic_machine=m68k-unknown
806 ;;
807 asmjs)
808 basic_machine=asmjs-unknown
809 ;;
810 blackfin-*)
811 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
812 os=linux
813 ;; 682 ;;
814 bluegene*) 683 bluegene*)
815 basic_machine=powerpc-ibm 684 cpu=powerpc
685 vendor=ibm
816 os=cnk 686 os=cnk
817 ;; 687 ;;
818 c54x-*)
819 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
820 ;;
821 c55x-*)
822 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
823 ;;
824 c6x-*)
825 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
826 ;;
827 c90)
828 basic_machine=c90-cray
829 os=${os:-unicos}
830 ;;
831 convex-c1)
832 basic_machine=c1-convex
833 os=bsd
834 ;;
835 convex-c2)
836 basic_machine=c2-convex
837 os=bsd
838 ;;
839 convex-c32)
840 basic_machine=c32-convex
841 os=bsd
842 ;;
843 convex-c34)
844 basic_machine=c34-convex
845 os=bsd
846 ;;
847 convex-c38)
848 basic_machine=c38-convex
849 os=bsd
850 ;;
851 cr16 | cr16-*)
852 basic_machine=cr16-unknown
853 os=${os:-elf}
854 ;;
855 crds | unos)
856 basic_machine=m68k-crds
857 ;;
858 crisv32 | crisv32-* | etraxfs*)
859 basic_machine=crisv32-axis
860 ;;
861 cris | cris-* | etrax*)
862 basic_machine=cris-axis
863 ;;
864 crx)
865 basic_machine=crx-unknown
866 os=${os:-elf}
867 ;;
868 da30 | da30-*)
869 basic_machine=m68k-da30
870 ;;
871 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
872 basic_machine=mips-dec
873 ;;
874 decsystem10* | dec10*) 688 decsystem10* | dec10*)
875 basic_machine=pdp10-dec 689 cpu=pdp10
690 vendor=dec
876 os=tops10 691 os=tops10
877 ;; 692 ;;
878 decsystem20* | dec20*) 693 decsystem20* | dec20*)
879 basic_machine=pdp10-dec 694 cpu=pdp10
695 vendor=dec
880 os=tops20 696 os=tops20
881 ;; 697 ;;
882 delta | 3300 | motorola-3300 | motorola-delta \ 698 delta | 3300 | motorola-3300 | motorola-delta \
883 | 3300-motorola | delta-motorola) 699 | 3300-motorola | delta-motorola)
884 basic_machine=m68k-motorola 700 cpu=m68k
885 ;; 701 vendor=motorola
886 dpx20 | dpx20-*)
887 basic_machine=rs6000-bull
888 os=${os:-bosx}
889 ;; 702 ;;
890 dpx2*) 703 dpx2*)
891 basic_machine=m68k-bull 704 cpu=m68k
705 vendor=bull
892 os=sysv3 706 os=sysv3
893 ;; 707 ;;
894 e500v[12])
895 basic_machine=powerpc-unknown
896 os=$os"spe"
897 ;;
898 e500v[12]-*)
899 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
900 os=$os"spe"
901 ;;
902 encore | umax | mmax) 708 encore | umax | mmax)
903 basic_machine=ns32k-encore 709 cpu=ns32k
710 vendor=encore
904 ;; 711 ;;
905 elxsi) 712 elxsi)
906 basic_machine=elxsi-elxsi 713 cpu=elxsi
714 vendor=elxsi
907 os=${os:-bsd} 715 os=${os:-bsd}
908 ;; 716 ;;
909 fx2800) 717 fx2800)
910 basic_machine=i860-alliant 718 cpu=i860
719 vendor=alliant
911 ;; 720 ;;
912 genix) 721 genix)
913 basic_machine=ns32k-ns 722 cpu=ns32k
723 vendor=ns
914 ;; 724 ;;
915 h3050r* | hiux*) 725 h3050r* | hiux*)
916 basic_machine=hppa1.1-hitachi 726 cpu=hppa1.1
727 vendor=hitachi
917 os=hiuxwe2 728 os=hiuxwe2
918 ;; 729 ;;
919 hp300-*)
920 basic_machine=m68k-hp
921 ;;
922 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 730 hp3k9[0-9][0-9] | hp9[0-9][0-9])
923 basic_machine=hppa1.0-hp 731 cpu=hppa1.0
732 vendor=hp
924 ;; 733 ;;
925 hp9k2[0-9][0-9] | hp9k31[0-9]) 734 hp9k2[0-9][0-9] | hp9k31[0-9])
926 basic_machine=m68000-hp 735 cpu=m68000
736 vendor=hp
927 ;; 737 ;;
928 hp9k3[2-9][0-9]) 738 hp9k3[2-9][0-9])
929 basic_machine=m68k-hp 739 cpu=m68k
740 vendor=hp
930 ;; 741 ;;
931 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 742 hp9k6[0-9][0-9] | hp6[0-9][0-9])
932 basic_machine=hppa1.0-hp 743 cpu=hppa1.0
744 vendor=hp
933 ;; 745 ;;
934 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 746 hp9k7[0-79][0-9] | hp7[0-79][0-9])
935 basic_machine=hppa1.1-hp 747 cpu=hppa1.1
748 vendor=hp
936 ;; 749 ;;
937 hp9k78[0-9] | hp78[0-9]) 750 hp9k78[0-9] | hp78[0-9])
938 # FIXME: really hppa2.0-hp 751 # FIXME: really hppa2.0-hp
939 basic_machine=hppa1.1-hp 752 cpu=hppa1.1
753 vendor=hp
940 ;; 754 ;;
941 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 755 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
942 # FIXME: really hppa2.0-hp 756 # FIXME: really hppa2.0-hp
943 basic_machine=hppa1.1-hp 757 cpu=hppa1.1
758 vendor=hp
944 ;; 759 ;;
945 hp9k8[0-9][13679] | hp8[0-9][13679]) 760 hp9k8[0-9][13679] | hp8[0-9][13679])
946 basic_machine=hppa1.1-hp 761 cpu=hppa1.1
762 vendor=hp
947 ;; 763 ;;
948 hp9k8[0-9][0-9] | hp8[0-9][0-9]) 764 hp9k8[0-9][0-9] | hp8[0-9][0-9])
949 basic_machine=hppa1.0-hp 765 cpu=hppa1.0
950 ;; 766 vendor=hp
951 i370-ibm* | ibm*)
952 basic_machine=i370-ibm
953 ;; 767 ;;
954 i*86v32) 768 i*86v32)
955 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 769 cpu=`echo "$1" | sed -e 's/86.*/86/'`
770 vendor=pc
956 os=sysv32 771 os=sysv32
957 ;; 772 ;;
958 i*86v4*) 773 i*86v4*)
959 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 774 cpu=`echo "$1" | sed -e 's/86.*/86/'`
775 vendor=pc
960 os=sysv4 776 os=sysv4
961 ;; 777 ;;
962 i*86v) 778 i*86v)
963 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 779 cpu=`echo "$1" | sed -e 's/86.*/86/'`
780 vendor=pc
964 os=sysv 781 os=sysv
965 ;; 782 ;;
966 i*86sol2) 783 i*86sol2)
967 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 784 cpu=`echo "$1" | sed -e 's/86.*/86/'`
785 vendor=pc
968 os=solaris2 786 os=solaris2
969 ;; 787 ;;
970 j90 | j90-cray) 788 j90 | j90-cray)
971 basic_machine=j90-cray 789 cpu=j90
790 vendor=cray
972 os=${os:-unicos} 791 os=${os:-unicos}
973 ;; 792 ;;
974 iris | iris4d) 793 iris | iris4d)
975 basic_machine=mips-sgi 794 cpu=mips
795 vendor=sgi
976 case $os in 796 case $os in
977 irix*) 797 irix*)
978 ;; 798 ;;
979 *) 799 *)
980 os=irix4 800 os=irix4
981 ;; 801 ;;
982 esac 802 esac
983 ;; 803 ;;
984 leon-*|leon[3-9]-*)
985 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
986 ;;
987 m68knommu-*)
988 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
989 os=linux
990 ;;
991 microblaze*)
992 basic_machine=microblaze-xilinx
993 ;;
994 miniframe) 804 miniframe)
995 basic_machine=m68000-convergent 805 cpu=m68000
806 vendor=convergent
996 ;; 807 ;;
997 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) 808 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
998 basic_machine=m68k-atari 809 cpu=m68k
810 vendor=atari
999 os=mint 811 os=mint
1000 ;; 812 ;;
1001 mips3*-*)
1002 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
1003 ;;
1004 mips3*)
1005 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
1006 ;;
1007 ms1-*)
1008 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
1009 ;;
1010 news-3600 | risc-news) 813 news-3600 | risc-news)
1011 basic_machine=mips-sony 814 cpu=mips
815 vendor=sony
1012 os=newsos 816 os=newsos
1013 ;; 817 ;;
1014 next | m*-next) 818 next | m*-next)
1015 basic_machine=m68k-next 819 cpu=m68k
820 vendor=next
1016 case $os in 821 case $os in
1017 nextstep* ) 822 openstep*)
823 ;;
824 nextstep*)
1018 ;; 825 ;;
1019 ns2*) 826 ns2*)
1020 os=nextstep2 827 os=nextstep2
1021 ;; 828 ;;
1022 *) 829 *)
1023 os=nextstep3 830 os=nextstep3
1024 ;; 831 ;;
1025 esac 832 esac
1026 ;; 833 ;;
1027 np1) 834 np1)
1028 basic_machine=np1-gould 835 cpu=np1
836 vendor=gould
837 ;;
838 op50n-* | op60c-*)
839 cpu=hppa1.1
840 vendor=oki
841 os=proelf
842 ;;
843 pa-hitachi)
844 cpu=hppa1.1
845 vendor=hitachi
846 os=hiuxwe2
847 ;;
848 pbd)
849 cpu=sparc
850 vendor=tti
851 ;;
852 pbb)
853 cpu=m68k
854 vendor=tti
855 ;;
856 pc532)
857 cpu=ns32k
858 vendor=pc532
859 ;;
860 pn)
861 cpu=pn
862 vendor=gould
863 ;;
864 power)
865 cpu=power
866 vendor=ibm
867 ;;
868 ps2)
869 cpu=i386
870 vendor=ibm
871 ;;
872 rm[46]00)
873 cpu=mips
874 vendor=siemens
875 ;;
876 rtpc | rtpc-*)
877 cpu=romp
878 vendor=ibm
879 ;;
880 sde)
881 cpu=mipsisa32
882 vendor=sde
883 os=${os:-elf}
884 ;;
885 simso-wrs)
886 cpu=sparclite
887 vendor=wrs
888 os=vxworks
889 ;;
890 tower | tower-32)
891 cpu=m68k
892 vendor=ncr
893 ;;
894 vpp*|vx|vx-*)
895 cpu=f301
896 vendor=fujitsu
897 ;;
898 w65)
899 cpu=w65
900 vendor=wdc
901 ;;
902 w89k-*)
903 cpu=hppa1.1
904 vendor=winbond
905 os=proelf
906 ;;
907 none)
908 cpu=none
909 vendor=none
910 ;;
911 leon|leon[3-9])
912 cpu=sparc
913 vendor=$basic_machine
914 ;;
915 leon-*|leon[3-9]-*)
916 cpu=sparc
917 vendor=`echo "$basic_machine" | sed 's/-.*//'`
918 ;;
919
920 *-*)
921 # shellcheck disable=SC2162
922 IFS="-" read cpu vendor <<EOF
923 $basic_machine
924 EOF
925 ;;
926 # We use `pc' rather than `unknown'
927 # because (1) that's what they normally are, and
928 # (2) the word "unknown" tends to confuse beginning users.
929 i*86 | x86_64)
930 cpu=$basic_machine
931 vendor=pc
932 ;;
933 # These rules are duplicated from below for sake of the special case above;
934 # i.e. things that normalized to x86 arches should also default to "pc"
935 pc98)
936 cpu=i386
937 vendor=pc
938 ;;
939 x64 | amd64)
940 cpu=x86_64
941 vendor=pc
942 ;;
943 # Recognize the basic CPU types without company name.
944 *)
945 cpu=$basic_machine
946 vendor=unknown
947 ;;
948 esac
949
950 unset -v basic_machine
951
952 # Decode basic machines in the full and proper CPU-Company form.
953 case $cpu-$vendor in
954 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
955 # some cases the only manufacturer, in others, it is the most popular.
956 craynv-unknown)
957 vendor=cray
958 os=${os:-unicosmp}
959 ;;
960 c90-unknown | c90-cray)
961 vendor=cray
962 os=${os:-unicos}
963 ;;
964 fx80-unknown)
965 vendor=alliant
966 ;;
967 romp-unknown)
968 vendor=ibm
969 ;;
970 mmix-unknown)
971 vendor=knuth
972 ;;
973 microblaze-unknown | microblazeel-unknown)
974 vendor=xilinx
975 ;;
976 rs6000-unknown)
977 vendor=ibm
978 ;;
979 vax-unknown)
980 vendor=dec
981 ;;
982 pdp11-unknown)
983 vendor=dec
984 ;;
985 we32k-unknown)
986 vendor=att
987 ;;
988 cydra-unknown)
989 vendor=cydrome
990 ;;
991 i370-ibm*)
992 vendor=ibm
993 ;;
994 orion-unknown)
995 vendor=highlevel
996 ;;
997 xps-unknown | xps100-unknown)
998 cpu=xps100
999 vendor=honeywell
1000 ;;
1001
1002 # Here we normalize CPU types with a missing or matching vendor
1003 dpx20-unknown | dpx20-bull)
1004 cpu=rs6000
1005 vendor=bull
1006 os=${os:-bosx}
1007 ;;
1008
1009 # Here we normalize CPU types irrespective of the vendor
1010 amd64-*)
1011 cpu=x86_64
1012 ;;
1013 blackfin-*)
1014 cpu=bfin
1015 os=linux
1016 ;;
1017 c54x-*)
1018 cpu=tic54x
1019 ;;
1020 c55x-*)
1021 cpu=tic55x
1022 ;;
1023 c6x-*)
1024 cpu=tic6x
1025 ;;
1026 e500v[12]-*)
1027 cpu=powerpc
1028 os=$os"spe"
1029 ;;
1030 mips3*-*)
1031 cpu=mips64
1032 ;;
1033 ms1-*)
1034 cpu=mt
1035 ;;
1036 m68knommu-*)
1037 cpu=m68k
1038 os=linux
1039 ;;
1040 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1041 cpu=s12z
1042 ;;
1043 openrisc-*)
1044 cpu=or32
1045 ;;
1046 parisc-*)
1047 cpu=hppa
1048 os=linux
1049 ;;
1050 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1051 cpu=i586
1052 ;;
1053 pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
1054 cpu=i686
1055 ;;
1056 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1057 cpu=i686
1058 ;;
1059 pentium4-*)
1060 cpu=i786
1061 ;;
1062 pc98-*)
1063 cpu=i386
1064 ;;
1065 ppc-* | ppcbe-*)
1066 cpu=powerpc
1067 ;;
1068 ppcle-* | powerpclittle-*)
1069 cpu=powerpcle
1070 ;;
1071 ppc64-*)
1072 cpu=powerpc64
1073 ;;
1074 ppc64le-* | powerpc64little-*)
1075 cpu=powerpc64le
1076 ;;
1077 sb1-*)
1078 cpu=mipsisa64sb1
1079 ;;
1080 sb1el-*)
1081 cpu=mipsisa64sb1el
1082 ;;
1083 sh5e[lb]-*)
1084 cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
1085 ;;
1086 spur-*)
1087 cpu=spur
1088 ;;
1089 strongarm-* | thumb-*)
1090 cpu=arm
1091 ;;
1092 tx39-*)
1093 cpu=mipstx39
1094 ;;
1095 tx39el-*)
1096 cpu=mipstx39el
1097 ;;
1098 x64-*)
1099 cpu=x86_64
1100 ;;
1101 xscale-* | xscalee[bl]-*)
1102 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
1103 ;;
1104
1105 # Recognize the canonical CPU Types that limit and/or modify the
1106 # company names they are paired with.
1107 cr16-*)
1108 os=${os:-elf}
1109 ;;
1110 crisv32-* | etraxfs*-*)
1111 cpu=crisv32
1112 vendor=axis
1113 ;;
1114 cris-* | etrax*-*)
1115 cpu=cris
1116 vendor=axis
1117 ;;
1118 crx-*)
1119 os=${os:-elf}
1029 ;; 1120 ;;
1030 neo-tandem) 1121 neo-tandem)
1031 basic_machine=neo-tandem 1122 cpu=neo
1123 vendor=tandem
1032 ;; 1124 ;;
1033 nse-tandem) 1125 nse-tandem)
1034 basic_machine=nse-tandem 1126 cpu=nse
1127 vendor=tandem
1035 ;; 1128 ;;
1036 nsr-tandem) 1129 nsr-tandem)
1037 basic_machine=nsr-tandem 1130 cpu=nsr
1131 vendor=tandem
1038 ;; 1132 ;;
1039 nsv-tandem) 1133 nsv-tandem)
1040 basic_machine=nsv-tandem 1134 cpu=nsv
1135 vendor=tandem
1041 ;; 1136 ;;
1042 nsx-tandem) 1137 nsx-tandem)
1043 basic_machine=nsx-tandem 1138 cpu=nsx
1044 ;; 1139 vendor=tandem
1045 op50n-* | op60c-*) 1140 ;;
1046 basic_machine=hppa1.1-oki 1141 s390-*)
1047 os=proelf 1142 cpu=s390
1048 ;; 1143 vendor=ibm
1049 openrisc | openrisc-*) 1144 ;;
1050 basic_machine=or32-unknown 1145 s390x-*)
1051 ;; 1146 cpu=s390x
1052 pa-hitachi) 1147 vendor=ibm
1053 basic_machine=hppa1.1-hitachi 1148 ;;
1054 os=hiuxwe2 1149 tile*-*)
1055 ;; 1150 os=${os:-linux-gnu}
1056 parisc-*) 1151 ;;
1057 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` 1152
1058 os=linux
1059 ;;
1060 pbd)
1061 basic_machine=sparc-tti
1062 ;;
1063 pbb)
1064 basic_machine=m68k-tti
1065 ;;
1066 pc532 | pc532-*)
1067 basic_machine=ns32k-pc532
1068 ;;
1069 pc98)
1070 basic_machine=i386-pc
1071 ;;
1072 pc98-*)
1073 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1074 ;;
1075 pentium | p5 | k5 | k6 | nexgen | viac3)
1076 basic_machine=i586-pc
1077 ;;
1078 pentiumpro | p6 | 6x86 | athlon | athlon_*)
1079 basic_machine=i686-pc
1080 ;;
1081 pentiumii | pentium2 | pentiumiii | pentium3)
1082 basic_machine=i686-pc
1083 ;;
1084 pentium4)
1085 basic_machine=i786-pc
1086 ;;
1087 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1088 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1089 ;;
1090 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1091 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1092 ;;
1093 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1094 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1095 ;;
1096 pentium4-*)
1097 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1098 ;;
1099 pn)
1100 basic_machine=pn-gould
1101 ;;
1102 power) basic_machine=power-ibm
1103 ;;
1104 ppc | ppcbe) basic_machine=powerpc-unknown
1105 ;;
1106 ppc-* | ppcbe-*)
1107 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1108 ;;
1109 ppcle | powerpclittle)
1110 basic_machine=powerpcle-unknown
1111 ;;
1112 ppcle-* | powerpclittle-*)
1113 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1114 ;;
1115 ppc64) basic_machine=powerpc64-unknown
1116 ;;
1117 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1118 ;;
1119 ppc64le | powerpc64little)
1120 basic_machine=powerpc64le-unknown
1121 ;;
1122 ppc64le-* | powerpc64little-*)
1123 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1124 ;;
1125 ps2)
1126 basic_machine=i386-ibm
1127 ;;
1128 rm[46]00)
1129 basic_machine=mips-siemens
1130 ;;
1131 rtpc | rtpc-*)
1132 basic_machine=romp-ibm
1133 ;;
1134 s390 | s390-*)
1135 basic_machine=s390-ibm
1136 ;;
1137 s390x | s390x-*)
1138 basic_machine=s390x-ibm
1139 ;;
1140 sb1)
1141 basic_machine=mipsisa64sb1-unknown
1142 ;;
1143 sb1el)
1144 basic_machine=mipsisa64sb1el-unknown
1145 ;;
1146 sde)
1147 basic_machine=mipsisa32-sde
1148 os=${os:-elf}
1149 ;;
1150 sequent)
1151 basic_machine=i386-sequent
1152 ;;
1153 sh5el)
1154 basic_machine=sh5le-unknown
1155 ;;
1156 simso-wrs)
1157 basic_machine=sparclite-wrs
1158 os=vxworks
1159 ;;
1160 spur)
1161 basic_machine=spur-unknown
1162 ;;
1163 st2000)
1164 basic_machine=m68k-tandem
1165 ;;
1166 strongarm-* | thumb-*)
1167 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1168 ;;
1169 sun2)
1170 basic_machine=m68000-sun
1171 ;;
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 ;;
1181 tile*)
1182 basic_machine=$basic_machine-unknown
1183 os=linux-gnu
1184 ;;
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 ;;
1194 vpp*|vx|vx-*)
1195 basic_machine=f301-fujitsu
1196 ;;
1197 w65*)
1198 basic_machine=w65-wdc
1199 os=none
1200 ;;
1201 w89k-*)
1202 basic_machine=hppa1.1-winbond
1203 os=proelf
1204 ;;
1205 x64)
1206 basic_machine=x86_64-pc
1207 ;;
1208 xps | xps100)
1209 basic_machine=xps100-honeywell
1210 ;;
1211 xscale-* | xscalee[bl]-*)
1212 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1213 ;;
1214 none)
1215 basic_machine=none-none
1216 os=${os:-none}
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.
1221 w89k)
1222 basic_machine=hppa1.1-winbond
1223 ;;
1224 op50n)
1225 basic_machine=hppa1.1-oki
1226 ;;
1227 op60c)
1228 basic_machine=hppa1.1-oki
1229 ;;
1230 romp)
1231 basic_machine=romp-ibm
1232 ;;
1233 mmix)
1234 basic_machine=mmix-knuth
1235 ;;
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 ;;
1248 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1249 basic_machine=sh-unknown
1250 ;;
1251 cydra)
1252 basic_machine=cydra-cydrome
1253 ;;
1254 orion)
1255 basic_machine=orion-highlevel
1256 ;;
1257 orion105)
1258 basic_machine=clipper-highlevel
1259 ;;
1260 mac | mpw | mac-mpw)
1261 basic_machine=m68k-apple
1262 ;;
1263 pmac | pmac-mpw)
1264 basic_machine=powerpc-apple
1265 ;;
1266 *-unknown)
1267 # Make sure to match an already-canonicalized machine name.
1268 ;;
1269 *) 1153 *)
1270 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 1154 # Recognize the canonical CPU types that are allowed with any
1271 exit 1 1155 # company name.
1156 case $cpu in
1157 1750a | 580 \
1158 | a29k \
1159 | aarch64 | aarch64_be \
1160 | abacus \
1161 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
1162 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
1163 | alphapca5[67] | alpha64pca5[67] \
1164 | am33_2.0 \
1165 | amdgcn \
1166 | arc | arceb \
1167 | arm | arm[lb]e | arme[lb] | armv* \
1168 | avr | avr32 \
1169 | asmjs \
1170 | ba \
1171 | be32 | be64 \
1172 | bfin | bpf | bs2000 \
1173 | c[123]* | c30 | [cjt]90 | c4x \
1174 | c8051 | clipper | craynv | csky | cydra \
1175 | d10v | d30v | dlx | dsp16xx \
1176 | e2k | elxsi | epiphany \
1177 | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
1178 | h8300 | h8500 \
1179 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
1180 | hexagon \
1181 | i370 | i*86 | i860 | i960 | ia16 | ia64 \
1182 | ip2k | iq2000 \
1183 | k1om \
1184 | le32 | le64 \
1185 | lm32 \
1186 | m32c | m32r | m32rle \
1187 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1188 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1189 | m88110 | m88k | maxq | mb | mcore | mep | metag \
1190 | microblaze | microblazeel \
1191 | mips | mipsbe | mipseb | mipsel | mipsle \
1192 | mips16 \
1193 | mips64 | mips64eb | mips64el \
1194 | mips64octeon | mips64octeonel \
1195 | mips64orion | mips64orionel \
1196 | mips64r5900 | mips64r5900el \
1197 | mips64vr | mips64vrel \
1198 | mips64vr4100 | mips64vr4100el \
1199 | mips64vr4300 | mips64vr4300el \
1200 | mips64vr5000 | mips64vr5000el \
1201 | mips64vr5900 | mips64vr5900el \
1202 | mipsisa32 | mipsisa32el \
1203 | mipsisa32r2 | mipsisa32r2el \
1204 | mipsisa32r6 | mipsisa32r6el \
1205 | mipsisa64 | mipsisa64el \
1206 | mipsisa64r2 | mipsisa64r2el \
1207 | mipsisa64r6 | mipsisa64r6el \
1208 | mipsisa64sb1 | mipsisa64sb1el \
1209 | mipsisa64sr71k | mipsisa64sr71kel \
1210 | mipsr5900 | mipsr5900el \
1211 | mipstx39 | mipstx39el \
1212 | mmix \
1213 | mn10200 | mn10300 \
1214 | moxie \
1215 | mt \
1216 | msp430 \
1217 | nds32 | nds32le | nds32be \
1218 | nfp \
1219 | nios | nios2 | nios2eb | nios2el \
1220 | none | np1 | ns16k | ns32k | nvptx \
1221 | open8 \
1222 | or1k* \
1223 | or32 \
1224 | orion \
1225 | picochip \
1226 | pdp10 | pdp11 | pj | pjl | pn | power \
1227 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
1228 | pru \
1229 | pyramid \
1230 | riscv | riscv32 | riscv64 \
1231 | rl78 | romp | rs6000 | rx \
1232 | score \
1233 | sh | shl \
1234 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1235 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
1236 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
1237 | sparclite \
1238 | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
1239 | spu \
1240 | tahoe \
1241 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
1242 | tron \
1243 | ubicom32 \
1244 | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1245 | vax \
1246 | visium \
1247 | w65 \
1248 | wasm32 | wasm64 \
1249 | we32k \
1250 | x86 | x86_64 | xc16x | xgate | xps100 \
1251 | xstormy16 | xtensa* \
1252 | ymp \
1253 | z8k | z80)
1254 ;;
1255
1256 *)
1257 echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
1258 exit 1
1259 ;;
1260 esac
1272 ;; 1261 ;;
1273 esac 1262 esac
1274 1263
1275 # Here we canonicalize certain aliases for manufacturers. 1264 # Here we canonicalize certain aliases for manufacturers.
1276 case $basic_machine in 1265 case $vendor in
1277 *-digital*) 1266 digital*)
1278 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` 1267 vendor=dec
1279 ;; 1268 ;;
1280 *-commodore*) 1269 commodore*)
1281 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` 1270 vendor=cbm
1282 ;; 1271 ;;
1283 *) 1272 *)
1284 ;; 1273 ;;
1285 esac 1274 esac
1286 1275
1354 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ 1343 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1355 | sym* | kopensolaris* | plan9* \ 1344 | sym* | kopensolaris* | plan9* \
1356 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ 1345 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1357 | aos* | aros* | cloudabi* | sortix* \ 1346 | aos* | aros* | cloudabi* | sortix* \
1358 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ 1347 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1359 | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \ 1348 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1360 | knetbsd* | mirbsd* | netbsd* \ 1349 | knetbsd* | mirbsd* | netbsd* \
1361 | bitrig* | openbsd* | solidbsd* | libertybsd* \ 1350 | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
1362 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ 1351 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
1363 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ 1352 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1364 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ 1353 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1365 | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ 1354 | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
1366 | chorusrdb* | cegcc* | glidix* \ 1355 | chorusrdb* | cegcc* | glidix* \
1374 | os2* | vos* | palmos* | uclinux* | nucleus* \ 1363 | os2* | vos* | palmos* | uclinux* | nucleus* \
1375 | morphos* | superux* | rtmk* | windiss* \ 1364 | morphos* | superux* | rtmk* | windiss* \
1376 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ 1365 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1377 | skyos* | haiku* | rdos* | toppers* | drops* | es* \ 1366 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1378 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ 1367 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1379 | midnightbsd*) 1368 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1369 | nsk* | powerunix)
1380 # Remember, each alternative MUST END IN *, to match a version number. 1370 # Remember, each alternative MUST END IN *, to match a version number.
1381 ;; 1371 ;;
1382 qnx*) 1372 qnx*)
1383 case $basic_machine in 1373 case $cpu in
1384 x86-* | i*86-*) 1374 x86 | i*86)
1385 ;; 1375 ;;
1386 *) 1376 *)
1387 os=nto-$os 1377 os=nto-$os
1388 ;; 1378 ;;
1389 esac 1379 esac
1458 os=rtmk-nova 1448 os=rtmk-nova
1459 ;; 1449 ;;
1460 ns2) 1450 ns2)
1461 os=nextstep2 1451 os=nextstep2
1462 ;; 1452 ;;
1463 nsk*)
1464 os=nsk
1465 ;;
1466 # Preserve the version number of sinix5. 1453 # Preserve the version number of sinix5.
1467 sinix5.*) 1454 sinix5.*)
1468 os=`echo $os | sed -e 's|sinix|sysv|'` 1455 os=`echo $os | sed -e 's|sinix|sysv|'`
1469 ;; 1456 ;;
1470 sinix*) 1457 sinix*)
1505 ;; 1492 ;;
1506 pikeos*) 1493 pikeos*)
1507 # Until real need of OS specific support for 1494 # Until real need of OS specific support for
1508 # particular features comes up, bare metal 1495 # particular features comes up, bare metal
1509 # configurations are quite functional. 1496 # configurations are quite functional.
1510 case $basic_machine in 1497 case $cpu in
1511 arm*) 1498 arm*)
1512 os=eabi 1499 os=eabi
1513 ;; 1500 ;;
1514 *) 1501 *)
1515 os=elf 1502 os=elf
1539 # "-sun"), then you have to tell the case statement up towards the top 1526 # "-sun"), then you have to tell the case statement up towards the top
1540 # that MANUFACTURER isn't an operating system. Otherwise, code above 1527 # that MANUFACTURER isn't an operating system. Otherwise, code above
1541 # will signal an error saying that MANUFACTURER isn't an operating 1528 # will signal an error saying that MANUFACTURER isn't an operating
1542 # system, and we'll never get to this point. 1529 # system, and we'll never get to this point.
1543 1530
1544 case $basic_machine in 1531 case $cpu-$vendor in
1545 score-*) 1532 score-*)
1546 os=elf 1533 os=elf
1547 ;; 1534 ;;
1548 spu-*) 1535 spu-*)
1549 os=elf 1536 os=elf
1720 esac 1707 esac
1721 fi 1708 fi
1722 1709
1723 # Here we handle the case where we know the os, and the CPU type, but not the 1710 # Here we handle the case where we know the os, and the CPU type, but not the
1724 # manufacturer. We pick the logical manufacturer. 1711 # manufacturer. We pick the logical manufacturer.
1725 vendor=unknown 1712 case $vendor in
1726 case $basic_machine in 1713 unknown)
1727 *-unknown)
1728 case $os in 1714 case $os in
1729 riscix*) 1715 riscix*)
1730 vendor=acorn 1716 vendor=acorn
1731 ;; 1717 ;;
1732 sunos*) 1718 sunos*)
1791 ;; 1777 ;;
1792 vos*) 1778 vos*)
1793 vendor=stratus 1779 vendor=stratus
1794 ;; 1780 ;;
1795 esac 1781 esac
1796 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
1797 ;; 1782 ;;
1798 esac 1783 esac
1799 1784
1800 echo "$basic_machine-$os" 1785 echo "$cpu-$vendor-$os"
1801 exit 1786 exit
1802 1787
1803 # Local variables: 1788 # Local variables:
1804 # eval: (add-hook 'before-save-hook 'time-stamp) 1789 # eval: (add-hook 'before-save-hook 'time-stamp)
1805 # time-stamp-start: "timestamp='" 1790 # time-stamp-start: "timestamp='"