1 --- gmp-6.3.0/configure.ac.orig 2023-07-29 15:42:16.000000000 +0200
2 +++ gmp-6.3.0/configure.ac 2023-09-03 19:25:28.172771749 +0200
3 @@ -277,8 +277,12 @@ if test $enable_fake_cpuid = yes && test
4 AC_MSG_ERROR([--enable-fake-cpuid requires --enable-fat])
8 -tmp_host=`echo $host_cpu | sed 's/\./_/'`
10 +AC_HELP_STRING([--with-cpu],
11 + [specify CPU type [[default=host_cpu]]]),
12 +[gmp_cpu=$withval], [gmp_cpu=$host_cpu])
14 +tmp_host=`echo $gmp_cpu | sed 's/\./_/'`
15 AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_$tmp_host)
16 GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')", POST)
18 @@ -480,7 +484,7 @@ case $host in
21 AC_DEFINE(HAVE_HOST_CPU_FAMILY_alpha)
24 alphaev5* | alphapca5*)
25 path="alpha/ev5 alpha" ;;
26 alphaev67 | alphaev68 | alphaev7*)
27 @@ -507,7 +511,7 @@ case $host in
28 # compiler errors too easily and is rejected by GMP_PROG_CC_WORKS. Each
29 # -mcpu=ev6 below has a fallback to -mcpu=ev56 for this reason.
33 alpha) gcc_cflags_cpu="-mcpu=ev4" ;;
34 alphaev5) gcc_cflags_cpu="-mcpu=ev5" ;;
35 alphaev56) gcc_cflags_cpu="-mcpu=ev56" ;;
36 @@ -540,7 +544,7 @@ case $host in
37 # Insns like ctlz which were never available as macros are always
38 # accepted and always generate their plain code.
42 alpha) gcc_cflags_asm="-Wa,-arch,ev4 -Wa,-mev4" ;;
43 alphaev5) gcc_cflags_asm="-Wa,-arch,ev5 -Wa,-mev5" ;;
44 alphaev56) gcc_cflags_asm="-Wa,-arch,ev56 -Wa,-mev56" ;;
45 @@ -575,7 +579,7 @@ case $host in
46 # DEC C V5.9-005 knows ev4, ev5, ev56, pca56, ev6.
47 # Compaq C V6.3-029 adds ev67.
51 alpha) cc_cflags_cpu="-arch~ev4~-tune~ev4" ;;
52 alphaev5) cc_cflags_cpu="-arch~ev5~-tune~ev5" ;;
53 alphaev56) cc_cflags_cpu="-arch~ev56~-tune~ev56" ;;
54 @@ -643,7 +647,7 @@ case $host in
55 # FIXME: We make mandatory compiler options optional here. We should
56 # either enforce them, or organise to strip paths as the corresponding
60 armxscale | arm7ej | arm9te | arm9e* | arm10* | armv5*)
62 gcc_cflags_arch="-march=armv5"
63 @@ -828,7 +832,7 @@ case $host in
64 # (Can't remember why this isn't done already, have to check what .asm
65 # files are available in each and how they run on a typical 2.0 cpu.)
69 hppa1.0*) path="pa32" ;;
70 hppa7000*) path="pa32/hppa1_1 pa32" ;;
72 @@ -846,13 +850,13 @@ case $host in
73 # probably be safe, but let's not take the chance. In any case, a
74 # configuration like --host=hppa2.0 ABI=1.0 is far from optimal.
78 hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;;
80 gcc_cflags_arch="-mpa-risc-1-1" ;;
85 hppa1.0*) cc_cflags="+O2" ;;
87 cc_cflags="+DA1.1 +O2" ;;
88 @@ -913,7 +917,7 @@ case $host in
89 SPEED_CYCLECOUNTER_OBJ=ia64.lo
90 any_32_testlist="sizeof-long-4"
94 itanium) path="ia64/itanium ia64" ;;
95 itanium2) path="ia64/itanium2 ia64" ;;
97 @@ -923,7 +927,7 @@ case $host in
98 gcc_32_cflags_optlist=$gcc_64_cflags_optlist
100 # gcc pre-release 3.4 adds -mtune itanium and itanium2
103 itanium) gcc_cflags_tune="-mtune=itanium" ;;
104 itanium2) gcc_cflags_tune="-mtune=itanium2" ;;
106 @@ -986,7 +990,7 @@ case $host in
107 # gcc 2.95 adds -mcpu32, -m68060.
108 # FIXME: Maybe "-m68020 -mnobitfield" would suit cpu32 on 2.7.2.
112 m68020) gcc_cflags_arch="-m68020" ;;
113 m68030) gcc_cflags_arch="-m68030" ;;
114 m68040) gcc_cflags_arch="-m68040" ;;
115 @@ -998,7 +1002,7 @@ case $host in
116 # FIXME: m68k/mc68020 looks like it's ok for cpu32, but this wants to be
117 # tested. Will need to introduce an m68k/cpu32 if m68k/mc68020 ever uses
118 # the bitfield instructions.
121 [m680[234]0 | m68360]) path="m68k/mc68020 m68k" ;;
124 @@ -1118,7 +1122,7 @@ case $host in
125 SPEED_CYCLECOUNTER_OBJ=powerpc.lo
130 powerpc740 | powerpc750)
131 path="powerpc32/750 powerpc32" ;;
132 powerpc7400 | powerpc7410)
133 @@ -1129,7 +1133,7 @@ case $host in
139 powerpc401) gcc_cflags_cpu="-mcpu=401" ;;
140 powerpc403) gcc_cflags_cpu="-mcpu=403"
141 xlc_cflags_arch="-qarch=403 -qarch=ppc" ;;
142 @@ -1381,7 +1385,7 @@ case $host in
143 gcc_32_cflags_maybe="-m31"
151 @@ -1471,7 +1475,7 @@ case $host in
152 any_testlist="sizeof-long-4"
153 GMP_INCLUDE_MPN(sparc32/sparc-defs.m4)
157 sparcv8 | microsparc | turbosparc)
158 path="sparc32/v8 sparc32" ;;
160 @@ -1507,7 +1511,7 @@ case $host in
161 # plain -m forms will disappear.
162 # gcc 3.3 adds ultrasparc3.
167 gcc_cflags_cpu="-mcpu=supersparc -msupersparc"
168 gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";;
169 @@ -1555,7 +1559,7 @@ case $host in
171 # SunOS cc doesn't know -xarch, apparently always generating v7
172 # code, so make this optional
175 sparcv8 | microsparc* | supersparc* | turbosparc | hypersparc*)
176 cc_cflags_arch="-xarch=v8";;
178 @@ -1571,7 +1575,7 @@ case $host in
179 # micro2, hyper, hyper2, powerup, ultra, ultra2, ultra2i.
180 # SunPRO cc 6 adds -xchip=ultra2e, ultra3cu.
184 supersparc*) cc_cflags_cpu="-xchip=super" ;;
185 microsparc*) cc_cflags_cpu="-xchip=micro" ;;
186 turbosparc) cc_cflags_cpu="-xchip=micro2" ;;
187 @@ -1590,7 +1594,7 @@ case $host in
193 sparc64 | sparcv9* | ultrasparc*)
195 # Solaris 6 and earlier cannot run ABI=64 since it doesn't save
196 @@ -1617,7 +1621,7 @@ case $host in
197 *) abilist="64 32" ;;
202 ultrasparc | ultrasparc2 | ultrasparc2i)
203 path_64="sparc64/ultrasparc1234 sparc64" ;;
205 @@ -1661,7 +1665,7 @@ case $host in
207 cclist_64="$cclist_64 cc"
208 cc_64_cflags_optlist="cpu"
212 cc_64_cflags="$cc_64_cflags -xO3 -xarch=v9d" ;;
214 @@ -1709,7 +1713,7 @@ case $host in
216 # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is
217 # the default in such a build (we think), so -m32 is essential for ABI=32.
218 - # This is, of course, done for any $host_cpu, not just x86_64, so we can
219 + # This is, of course, done for any $gmp_cpu, not just x86_64, so we can
220 # get such a gcc into the right mode to cross-compile to say i486-*-*.
222 # -m32 is not available in gcc 2.95 and earlier, hence cflags_maybe to use
223 @@ -1772,7 +1776,7 @@ case $host in
224 # like k8 for x86_64, then it can be the -mtune at the start, no need to
225 # duplicate anything.
230 gcc_cflags_cpu="-mtune=i386 -mcpu=i386 -m386"
231 gcc_cflags_arch="-march=i386"