* config.sub: Remove duplicates in the huge `case basic_machine

in` arms. These patterns whitelist canonical CPU types that are
	allowed with any vendor. The former arm accepts a provided vendor,
	and the latter arm defaults a vendor when none is provided. Split
	`case $basic_machine in` in to two, and then pre-default the
	missing vendor so that only the explicit-vendor rules are needed.

Signed-off-by: Ben Elliston <bje@gnu.org>
This commit is contained in:
John Ericson 2018-08-28 09:42:04 +10:00 committed by Ben Elliston
parent b8ee5f7994
commit fc12b1e453
2 changed files with 17 additions and 82 deletions

View File

@ -1,3 +1,12 @@
2018-08-28 John Ericson <john.ericson@obsidian.systems>
* config.sub: Remove duplicates in the huge `case basic_machine
in` arms. These patterns whitelist canonical CPU types that are
allowed with any vendor. The former arm accepts a provided vendor,
and the latter arm defaults a vendor when none is provided. Split
`case $basic_machine in` in to two, and then pre-default the
missing vendor so that only the explicit-vendor rules are needed.
2018-08-24 Ben Elliston <bje@gnu.org>
From Justin Hibbits:

90
config.sub vendored
View File

@ -1044,6 +1044,8 @@ case $basic_machine in
basic_machine=armel-unknown
;;
*-*)
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@ -1058,7 +1060,13 @@ case $basic_machine in
x64 | amd64)
basic_machine=x86_64-pc
;;
# Recognize the basic CPU types without company name.
*)
basic_machine=$basic_machine-unknown
;;
esac
case $basic_machine in
# Recognize the cannonical CPU Types that limit and/or modify the
# company names they are paired with.
amd64-*)
@ -1216,88 +1224,6 @@ case $basic_machine in
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| abacus \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
| avr | avr32 \
| asmjs \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
| maxq | mb | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nfp \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
| pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
| pru \
| pyramid \
| riscv | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh[23]ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| wasm32 \
| x86 | xc16x | xstormy16 | xgate | xtensa* \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
*)
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1