Sat Oct 31 21:48:06 2020 UTC ()
recognize some more G4 model names produced by config.guess
now native tools builds on ppc7447 and ppc7455 work again


(macallan)
diff -r1.3 -r1.4 src/external/lgpl3/gmp/dist/config.sub

cvs diff -r1.3 -r1.4 src/external/lgpl3/gmp/dist/config.sub (switch to unified diff)

--- src/external/lgpl3/gmp/dist/config.sub 2020/09/27 00:30:26 1.3
+++ src/external/lgpl3/gmp/dist/config.sub 2020/10/31 21:48:06 1.4
@@ -1,165 +1,165 @@ @@ -1,165 +1,165 @@
1#! /bin/sh 1#! /bin/sh
2# 2#
3# GMP config.sub wrapper. 3# GMP config.sub wrapper.
4 4
5 5
6# Copyright 2000-2003, 2006, 2009-2016 Free Software Foundation, Inc. 6# Copyright 2000-2003, 2006, 2009-2016 Free Software Foundation, Inc.
7# 7#
8# This file is part of the GNU MP Library. 8# This file is part of the GNU MP Library.
9# 9#
10# The GNU MP Library is free software; you can redistribute it and/or modify 10# The GNU MP Library is free software; you can redistribute it and/or modify
11# it under the terms of either: 11# it under the terms of either:
12# 12#
13# * the GNU Lesser General Public License as published by the Free 13# * the GNU Lesser General Public License as published by the Free
14# Software Foundation; either version 3 of the License, or (at your 14# Software Foundation; either version 3 of the License, or (at your
15# option) any later version. 15# option) any later version.
16# 16#
17# or 17# or
18# 18#
19# * the GNU General Public License as published by the Free Software 19# * the GNU General Public License as published by the Free Software
20# Foundation; either version 2 of the License, or (at your option) any 20# Foundation; either version 2 of the License, or (at your option) any
21# later version. 21# later version.
22# 22#
23# or both in parallel, as here. 23# or both in parallel, as here.
24# 24#
25# The GNU MP Library is distributed in the hope that it will be useful, but 25# The GNU MP Library is distributed in the hope that it will be useful, but
26# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 26# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
27# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 27# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
28# for more details. 28# for more details.
29# 29#
30# You should have received copies of the GNU General Public License and the 30# You should have received copies of the GNU General Public License and the
31# GNU Lesser General Public License along with the GNU MP Library. If not, 31# GNU Lesser General Public License along with the GNU MP Library. If not,
32# see https://www.gnu.org/licenses/. 32# see https://www.gnu.org/licenses/.
33 33
34 34
35# Usage: config.sub CPU-VENDOR-OS 35# Usage: config.sub CPU-VENDOR-OS
36# config.sub ALIAS 36# config.sub ALIAS
37# 37#
38# Validate and canonicalize the given configuration name, with special 38# Validate and canonicalize the given configuration name, with special
39# handling for GMP extra CPU names. 39# handling for GMP extra CPU names.
40# 40#
41# When the CPU isn't special the whole name is simply passed straight 41# When the CPU isn't special the whole name is simply passed straight
42# through to configfsf.sub. 42# through to configfsf.sub.
43# 43#
44# When the CPU is a GMP extra, configfsf.sub is run on a similar CPU that it 44# When the CPU is a GMP extra, configfsf.sub is run on a similar CPU that it
45# will recognise. For example "athlon-pc-freebsd3.5" is validated using 45# will recognise. For example "athlon-pc-freebsd3.5" is validated using
46# "i386-pc-freebsd3.5". 46# "i386-pc-freebsd3.5".
47# 47#
48# Any canonicalizations made by configfsf.sub are preserved. For example 48# Any canonicalizations made by configfsf.sub are preserved. For example
49# given "athlon-linux", configfsf.sub is called with "i386-linux" and will 49# given "athlon-linux", configfsf.sub is called with "i386-linux" and will
50# give back "i386-pc-linux-gnu". "athlon" is then reinstated, so we print 50# give back "i386-pc-linux-gnu". "athlon" is then reinstated, so we print
51# "athlon-pc-linux-gnu". 51# "athlon-pc-linux-gnu".
52 52
53 53
54# Expect to find configfsf.sub in the same directory as this config.sub 54# Expect to find configfsf.sub in the same directory as this config.sub
55configfsf_sub="`echo \"$0\" | sed 's/config.sub$/configfsf.sub/'`" 55configfsf_sub="`echo \"$0\" | sed 's/config.sub$/configfsf.sub/'`"
56if test "$configfsf_sub" = "$0"; then 56if test "$configfsf_sub" = "$0"; then
57 echo "Cannot derive configfsf.sub from $0" 1>&2 57 echo "Cannot derive configfsf.sub from $0" 1>&2
58 exit 1 58 exit 1
59fi 59fi
60if test -f "$configfsf_sub"; then 60if test -f "$configfsf_sub"; then
61 : 61 :
62else 62else
63 echo "$configfsf_sub not found" 1>&2 63 echo "$configfsf_sub not found" 1>&2
64 exit 1 64 exit 1
65fi 65fi
66 66
67# Always run configfsf.sub with $SHELL, like autoconf does for config.sub 67# Always run configfsf.sub with $SHELL, like autoconf does for config.sub
68SHELL=${CONFIG_SHELL-/bin/sh} 68SHELL=${CONFIG_SHELL-/bin/sh}
69 69
70# Identify ourselves on --version, --help, etc 70# Identify ourselves on --version, --help, etc
71case "$1" in 71case "$1" in
72"" | -*) 72"" | -*)
73 echo "(GNU MP wrapped config.sub)" 1>&2 73 echo "(GNU MP wrapped config.sub)" 1>&2
74 $SHELL $configfsf_sub "$@" 74 $SHELL $configfsf_sub "$@"
75 exit 75 exit
76 ;; 76 ;;
77esac 77esac
78 78
79given_full="$1" 79given_full="$1"
80given_cpu=`echo "$given_full" | sed 's/-.*$//'` 80given_cpu=`echo "$given_full" | sed 's/-.*$//'`
81given_rest=`echo "$given_full" | sed 's/^[^-]*//'` 81given_rest=`echo "$given_full" | sed 's/^[^-]*//'`
82 82
83 83
84# Aliases for GMP extras 84# Aliases for GMP extras
85case "$given_cpu" in 85case "$given_cpu" in
86 # configfsf.sub turns p5 into i586, instead use our exact cpu type 86 # configfsf.sub turns p5 into i586, instead use our exact cpu type
87 p5 | p54) given_cpu=pentium ;; 87 p5 | p54) given_cpu=pentium ;;
88 p55) given_cpu=pentiummmx ;; 88 p55) given_cpu=pentiummmx ;;
89 89
90 # configfsf.sub turns p6, pentiumii and pentiumiii into i686, instead use 90 # configfsf.sub turns p6, pentiumii and pentiumiii into i686, instead use
91 # our exact cpu types 91 # our exact cpu types
92 p6) given_cpu=pentiumpro ;; 92 p6) given_cpu=pentiumpro ;;
93 pentiumii) given_cpu=pentium2 ;; 93 pentiumii) given_cpu=pentium2 ;;
94 pentiumiii) given_cpu=pentium3 ;; 94 pentiumiii) given_cpu=pentium3 ;;
95esac 95esac
96given_full="$given_cpu$given_rest" 96given_full="$given_cpu$given_rest"
97 97
98 98
99# GMP extras and what to use for the config.sub test 99# GMP extras and what to use for the config.sub test
100case "$given_cpu" in 100case "$given_cpu" in
101itanium | itanium2) 101itanium | itanium2)
102 test_cpu=ia64 ;; 102 test_cpu=ia64 ;;
103pentium | pentiummmx | pentiumpro | pentium[234m] | k[567] | k6[23] | geode | athlon | viac3*) 103pentium | pentiummmx | pentiumpro | pentium[234m] | k[567] | k6[23] | geode | athlon | viac3*)
104 test_cpu=i386 ;; 104 test_cpu=i386 ;;
105athlon64 | atom | silvermont | goldmont | core2 | corei* | opteron | k[89] | k10 | bobcat | jaguar* | bulldozer* | piledriver* | steamroller* | excavator* | zen* | nano | nehalem | westmere | sandybridge* | ivybridge* | haswell* | broadwell* | skylake* | kabylake* | knightslanding) 105athlon64 | atom | silvermont | goldmont | core2 | corei* | opteron | k[89] | k10 | bobcat | jaguar* | bulldozer* | piledriver* | steamroller* | excavator* | zen* | nano | nehalem | westmere | sandybridge* | ivybridge* | haswell* | broadwell* | skylake* | kabylake* | knightslanding)
106 test_cpu=x86_64 ;; 106 test_cpu=x86_64 ;;
107power[2-9] | power2sc) 107power[2-9] | power2sc)
108 test_cpu=power ;; 108 test_cpu=power ;;
109powerpc401 | powerpc403 | powerpc405 | \ 109powerpc401 | powerpc403 | powerpc405 | \
110powerpc505 | \ 110powerpc505 | \
111powerpc601 | powerpc602 | \ 111powerpc601 | powerpc602 | \
112powerpc603 | powerpc603e | \ 112powerpc603 | powerpc603e | \
113powerpc604 | powerpc604e | \ 113powerpc604 | powerpc604e | \
114powerpc620 | powerpc630 | powerpc970 | \ 114powerpc620 | powerpc630 | powerpc970 | \
115powerpc740 | powerpc7400 | powerpc7450 | powerpc750 | \ 115powerpc740 | powerpc7400 | powerpc74[4-5][0-9] | powerpc750 | \
116powerpc801 | powerpc821 | powerpc823 | powerpc860 | \ 116powerpc801 | powerpc821 | powerpc823 | powerpc860 | \
117powerpc64) 117powerpc64)
118 test_cpu=powerpc ;; 118 test_cpu=powerpc ;;
119sparcv8 | supersparc | microsparc | \ 119sparcv8 | supersparc | microsparc | \
120ultrasparc | ultrasparc2 | ultrasparc2i | ultrasparc3 | ultrasparct[12345]) 120ultrasparc | ultrasparc2 | ultrasparc2i | ultrasparc3 | ultrasparct[12345])
121 test_cpu=sparc ;; 121 test_cpu=sparc ;;
122sh2) 122sh2)
123 test_cpu=sh ;; 123 test_cpu=sh ;;
124 124
125z900 | z990 | z9 | z10 | z196) 125z900 | z990 | z9 | z10 | z196)
126 test_cpu=s390x;; 126 test_cpu=s390x;;
127z900esa | z990esa | z9esa | z10esa | z196esa) 127z900esa | z990esa | z9esa | z10esa | z196esa)
128 test_cpu=s390;; 128 test_cpu=s390;;
129 129
130armsa1 | armxscale | arm9tdmi | arm9te | \ 130armsa1 | armxscale | arm9tdmi | arm9te | \
131arm10* | arm11mpcore | armsa1 | arm1136 | arm1156 | arm1176 | \ 131arm10* | arm11mpcore | armsa1 | arm1136 | arm1156 | arm1176 | \
132armcortex[arm][0-9] | armcortex[arm][0-9][0-9] | \ 132armcortex[arm][0-9] | armcortex[arm][0-9][0-9] | \
133arm*neon | armxgene1 | armexynosm1 | armthunderx) 133arm*neon | armxgene1 | armexynosm1 | armthunderx)
134 test_cpu="arm";; 134 test_cpu="arm";;
135 135
136*) 136*)
137 # Don't need or want to change the given name, just run configfsf.sub 137 # Don't need or want to change the given name, just run configfsf.sub
138 $SHELL $configfsf_sub "$given_full" 138 $SHELL $configfsf_sub "$given_full"
139 if test $? = 0; then 139 if test $? = 0; then
140 exit 0 140 exit 0
141 else 141 else
142 echo "(GNU MP wrapped config.sub, testing \"$given_full\")" 142 echo "(GNU MP wrapped config.sub, testing \"$given_full\")"
143 exit 1 143 exit 1
144 fi 144 fi
145esac 145esac
146 146
147 147
148test_full="$test_cpu$given_rest" 148test_full="$test_cpu$given_rest"
149canonical_full=`$SHELL $configfsf_sub "$test_full"` 149canonical_full=`$SHELL $configfsf_sub "$test_full"`
150if test $? = 0; then 150if test $? = 0; then
151 : 151 :
152else 152else
153 echo "(GNU MP wrapped config.sub, testing \"$given_full\" as \"$test_full\")" 153 echo "(GNU MP wrapped config.sub, testing \"$given_full\" as \"$test_full\")"
154 exit 1 154 exit 1
155fi 155fi
156 156
157canonical_rest=`echo "$canonical_full" | sed 's/^[^-]*//'` 157canonical_rest=`echo "$canonical_full" | sed 's/^[^-]*//'`
158echo "$given_cpu$canonical_rest" 158echo "$given_cpu$canonical_rest"
159exit 0 159exit 0
160 160
161 161
162 162
163# Local variables: 163# Local variables:
164# fill-column: 76 164# fill-column: 76
165# End: 165# End: