mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-29 02:26:36 +12:00
* testsuiteb/config-sub.sh (run_config_sub_idempotent): New.
* config.sub: Fixes to pass the testsuite. Signed-off-by: Ben Elliston <bje@gnu.org>
This commit is contained in:
parent
dbe15d73a8
commit
08ede0dcc1
@ -1,3 +1,8 @@
|
|||||||
|
2018-08-08 John Ericson <john.ericson@obsidian.systems>
|
||||||
|
|
||||||
|
* testsuiteb/config-sub.sh (run_config_sub_idempotent): New.
|
||||||
|
* config.sub: Fixes to pass the testsuite.
|
||||||
|
|
||||||
2018-08-03 John Ericson <john.ericson@obsidian.systems>
|
2018-08-03 John Ericson <john.ericson@obsidian.systems>
|
||||||
|
|
||||||
* testsuite/config-guess.sh: Make 'rc' a local variable.
|
* testsuite/config-guess.sh: Make 'rc' a local variable.
|
||||||
|
43
config.sub
vendored
43
config.sub
vendored
@ -654,6 +654,8 @@ case $basic_machine in
|
|||||||
leon|leon[3-9])
|
leon|leon[3-9])
|
||||||
basic_machine=sparc-$basic_machine
|
basic_machine=sparc-$basic_machine
|
||||||
;;
|
;;
|
||||||
|
m6811-* | m68hc11-* | m6812-* | m68hc12-* | m68hcs12x-* | nvptx-* | picochip-*)
|
||||||
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=${os:-none}
|
os=${os:-none}
|
||||||
@ -664,6 +666,9 @@ case $basic_machine in
|
|||||||
basic_machine=s12z-unknown
|
basic_machine=s12z-unknown
|
||||||
os=${os:-none}
|
os=${os:-none}
|
||||||
;;
|
;;
|
||||||
|
m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
|
||||||
|
basic_machine=s12z-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
ms1)
|
ms1)
|
||||||
basic_machine=mt-unknown
|
basic_machine=mt-unknown
|
||||||
;;
|
;;
|
||||||
@ -674,6 +679,8 @@ case $basic_machine in
|
|||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=${os:-none}
|
os=${os:-none}
|
||||||
;;
|
;;
|
||||||
|
xgate-*)
|
||||||
|
;;
|
||||||
xscaleeb)
|
xscaleeb)
|
||||||
basic_machine=armeb-unknown
|
basic_machine=armeb-unknown
|
||||||
;;
|
;;
|
||||||
@ -689,22 +696,26 @@ case $basic_machine in
|
|||||||
basic_machine=$basic_machine-pc
|
basic_machine=$basic_machine-pc
|
||||||
;;
|
;;
|
||||||
# Recognize the basic CPU types with company name.
|
# Recognize the basic CPU types with company name.
|
||||||
580-* \
|
1750a-* | 580-* \
|
||||||
| a29k-* \
|
| a29k-* \
|
||||||
| aarch64-* | aarch64_be-* \
|
| aarch64-* | aarch64_be-* \
|
||||||
|
| abacus-* \
|
||||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* \
|
||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| am33_2.0-* \
|
||||||
|
| arc-* | arceb-* \
|
||||||
|
| arm-* | arm[lb]e-* | arme[lb]-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
|
| asmjs-* \
|
||||||
| ba-* \
|
| ba-* \
|
||||||
| be32-* | be64-* \
|
| be32-* | be64-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
|
| c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* | dsp16xx-* \
|
||||||
| e2k-* | elxsi-* \
|
| e2k-* | elxsi-* | epiphany-* \
|
||||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | ft32-* | fx80-* \
|
||||||
| h8300-* | h8500-* \
|
| h8300-* | h8500-* \
|
||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| hexagon-* \
|
| hexagon-* \
|
||||||
@ -714,8 +725,8 @@ case $basic_machine in
|
|||||||
| le32-* | le64-* \
|
| le32-* | le64-* \
|
||||||
| lm32-* \
|
| lm32-* \
|
||||||
| m32c-* | m32r-* | m32rle-* \
|
| m32c-* | m32r-* | m32rle-* \
|
||||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
| m5200-* | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* | v70-* | w65-* \
|
||||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
| m88110-* | m88k-* | maxq-* | mb-* | mcore-* | mep-* | metag-* \
|
||||||
| microblaze-* | microblazeel-* \
|
| microblaze-* | microblazeel-* \
|
||||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||||
| mips16-* \
|
| mips16-* \
|
||||||
@ -739,6 +750,7 @@ case $basic_machine in
|
|||||||
| mipsr5900-* | mipsr5900el-* \
|
| mipsr5900-* | mipsr5900el-* \
|
||||||
| mipstx39-* | mipstx39el-* \
|
| mipstx39-* | mipstx39el-* \
|
||||||
| mmix-* \
|
| mmix-* \
|
||||||
|
| mn10200-* | mn10300-* \
|
||||||
| moxie-* \
|
| moxie-* \
|
||||||
| mt-* \
|
| mt-* \
|
||||||
| msp430-* \
|
| msp430-* \
|
||||||
@ -748,6 +760,7 @@ case $basic_machine in
|
|||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| open8-* \
|
| open8-* \
|
||||||
| or1k*-* \
|
| or1k*-* \
|
||||||
|
| or32-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||||
@ -755,14 +768,15 @@ case $basic_machine in
|
|||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
| riscv-* | riscv32-* | riscv64-* \
|
| riscv-* | riscv32-* | riscv64-* \
|
||||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
| score-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]ae[lb]-* | sh[23]e-* | she[lb]-* | sh[lb]e-* \
|
||||||
|
| sh[1234]e[lb]-* | sh[12345][lb]e-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||||
| sparclite-* \
|
| sparclite-* \
|
||||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
||||||
|
| spu-* \
|
||||||
| tahoe-* \
|
| tahoe-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
| tile*-* \
|
|
||||||
| tron-* \
|
| tron-* \
|
||||||
| ubicom32-* \
|
| ubicom32-* \
|
||||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||||
@ -1154,6 +1168,9 @@ case $basic_machine in
|
|||||||
sh5el)
|
sh5el)
|
||||||
basic_machine=sh5le-unknown
|
basic_machine=sh5le-unknown
|
||||||
;;
|
;;
|
||||||
|
sh5el-*)
|
||||||
|
basic_machine=sh5le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
simso-wrs)
|
simso-wrs)
|
||||||
basic_machine=sparclite-wrs
|
basic_machine=sparclite-wrs
|
||||||
os=vxworks
|
os=vxworks
|
||||||
@ -1179,6 +1196,8 @@ case $basic_machine in
|
|||||||
sun386 | sun386i | roadrunner)
|
sun386 | sun386i | roadrunner)
|
||||||
basic_machine=i386-sun
|
basic_machine=i386-sun
|
||||||
;;
|
;;
|
||||||
|
tile*-*)
|
||||||
|
;;
|
||||||
tile*)
|
tile*)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=linux-gnu
|
os=linux-gnu
|
||||||
@ -1354,7 +1373,7 @@ case $os in
|
|||||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||||
| aos* | aros* | cloudabi* | sortix* \
|
| aos* | aros* | cloudabi* | sortix* \
|
||||||
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
|
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
|
||||||
| clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
|
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
|
||||||
| knetbsd* | mirbsd* | netbsd* \
|
| knetbsd* | mirbsd* | netbsd* \
|
||||||
| bitrig* | openbsd* | solidbsd* | libertybsd* \
|
| bitrig* | openbsd* | solidbsd* | libertybsd* \
|
||||||
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
|
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
|
||||||
|
@ -9,28 +9,54 @@
|
|||||||
# the alias expands to the expected canonical triplet.
|
# the alias expands to the expected canonical triplet.
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
shopt -s lastpipe
|
||||||
verbose=false
|
verbose=false
|
||||||
|
|
||||||
run_config_sub()
|
run_config_sub()
|
||||||
{
|
{
|
||||||
local -i rc=0
|
local -i rc=0
|
||||||
|
numtests=0
|
||||||
|
name="checks"
|
||||||
while read -r alias canonical ; do
|
while read -r alias canonical ; do
|
||||||
output=$(sh -eu ../config.sub "$alias")
|
output=$(sh -eu ../config.sub "$alias")
|
||||||
if test "$output" != "$canonical" ; then
|
if test "$output" != "$canonical" ; then
|
||||||
echo "FAIL: $alias -> $output, but expected $canonical"
|
echo "FAIL: $alias -> $output, but expected $canonical"
|
||||||
rc=1
|
rc=1
|
||||||
else
|
else
|
||||||
$verbose && echo "PASS: $alias"
|
$verbose && echo "PASS: $alias -> $canonical"
|
||||||
fi
|
fi
|
||||||
|
numtests+=1
|
||||||
done < config-sub.data
|
done < config-sub.data
|
||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
if run_config_sub ; then
|
run_config_sub_idempotent()
|
||||||
numtests=$(wc -l config-sub.data | cut -d' ' -f1)
|
{
|
||||||
$verbose || echo "PASS: config.sub checks ($numtests tests)"
|
local -i rc=0
|
||||||
else
|
numtests=0
|
||||||
exit 1
|
name="idempotency checks"
|
||||||
fi
|
sed -r 's/\t+/\t/g' < config-sub.data | cut -f 2 | uniq | while read -r canonical ; do
|
||||||
|
output=$(sh -eu ../config.sub "$canonical")
|
||||||
|
if test "$output" != "$canonical" ; then
|
||||||
|
echo "FAIL: $canonical -> $output, but $canonical should map to itself"
|
||||||
|
rc=1
|
||||||
|
else
|
||||||
|
$verbose && echo "PASS: $canonical -> $canonical"
|
||||||
|
fi
|
||||||
|
numtests+=1
|
||||||
|
done
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
exit 0
|
declare -i rc=0 numtests
|
||||||
|
declare name
|
||||||
|
|
||||||
|
for testsuite in run_config_sub run_config_sub_idempotent ; do
|
||||||
|
if $testsuite; then
|
||||||
|
$verbose || echo "PASS: config.sub $name ($numtests tests)"
|
||||||
|
else
|
||||||
|
rc=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $rc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user