]> git.pld-linux.org Git - packages/gmp.git/blob - gmp-cpu.patch
- updated to 6.1.0
[packages/gmp.git] / gmp-cpu.patch
1 --- gmp-6.1.0/configure.ac.orig 2015-11-01 16:19:48.000000000 +0100
2 +++ gmp-6.1.0/configure.ac      2015-12-01 18:07:20.137337878 +0100
3 @@ -281,8 +281,12 @@
4    AC_MSG_ERROR([--enable-fake-cpuid requires --enable-fat])
5  fi
6  
7 -
8 -tmp_host=`echo $host_cpu | sed 's/\./_/'`
9 +AC_ARG_WITH(cpu,
10 +AC_HELP_STRING([--with-cpu],
11 +              [specify CPU type [[default=host_cpu]]]),
12 +[gmp_cpu=$withval], [gmp_cpu=$host_cpu])
13
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)
17  
18 @@ -460,7 +464,7 @@
19  
20    alpha*-*-*)
21      AC_DEFINE(HAVE_HOST_CPU_FAMILY_alpha)
22 -    case $host_cpu in
23 +    case $gmp_cpu in
24        alphaev5* | alphapca5*)
25         path="alpha/ev5 alpha" ;;
26        alphaev67 | alphaev68 | alphaev7*)
27 @@ -487,7 +491,7 @@
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.
30      #
31 -    case $host_cpu in
32 +    case $gmp_cpu in
33        alpha)        gcc_cflags_cpu="-mcpu=ev4" ;;
34        alphaev5)     gcc_cflags_cpu="-mcpu=ev5" ;;
35        alphaev56)    gcc_cflags_cpu="-mcpu=ev56" ;;
36 @@ -520,7 +524,7 @@
37      # Insns like ctlz which were never available as macros are always
38      # accepted and always generate their plain code.
39      #
40 -    case $host_cpu in
41 +    case $gmp_cpu in
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 @@ -555,7 +559,7 @@
46         # DEC C V5.9-005 knows ev4, ev5, ev56, pca56, ev6.
47         # Compaq C V6.3-029 adds ev67.
48         #
49 -       case $host_cpu in
50 +       case $gmp_cpu in
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 @@ -624,7 +628,7 @@
55      # FIXME: We make mandatory compiler options optional here.  We should
56      # either enforce them, or organise to strip paths as the corresponding
57      # options fail.
58 -    case $host_cpu in
59 +    case $gmp_cpu in
60        armv7*)
61         path="arm/v6t2 arm/v6 arm/v5 arm"
62         gcc_cflags_arch="-march=armv7-a"
63 @@ -737,7 +741,7 @@
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.)
66      #
67 -    case $host_cpu in
68 +    case $gmp_cpu in
69        hppa1.0*)    path="pa32" ;;
70        hppa7000*)   path="pa32/hppa1_1 pa32" ;;
71        hppa2.0* | hppa64)
72 @@ -755,13 +759,13 @@
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.
75      #
76 -    case $host_cpu in
77 +    case $gmp_cpu in
78        hppa1.0*)           gcc_cflags_arch="-mpa-risc-1-0" ;;
79        *)                  # default to 7100
80                            gcc_cflags_arch="-mpa-risc-1-1" ;;
81      esac
82  
83 -    case $host_cpu in
84 +    case $gmp_cpu in
85        hppa1.0*)    cc_cflags="+O2" ;;
86        *)           # default to 7100
87                     cc_cflags="+DA1.1 +O2" ;;
88 @@ -823,7 +827,7 @@
89      SPEED_CYCLECOUNTER_OBJ=ia64.lo
90      any_32_testlist="sizeof-long-4"
91  
92 -    case $host_cpu in
93 +    case $gmp_cpu in
94        itanium)   path="ia64/itanium  ia64" ;;
95        itanium2)  path="ia64/itanium2 ia64" ;;
96        *)         path="ia64" ;;
97 @@ -833,7 +837,7 @@
98      gcc_32_cflags_optlist=$gcc_64_cflags_optlist
99  
100      # gcc pre-release 3.4 adds -mtune itanium and itanium2
101 -    case $host_cpu in
102 +    case $gmp_cpu in
103        itanium)   gcc_cflags_tune="-mtune=itanium" ;;
104        itanium2)  gcc_cflags_tune="-mtune=itanium2" ;;
105      esac
106 @@ -896,7 +900,7 @@
107      # gcc 2.95 adds -mcpu32, -m68060.
108      # FIXME: Maybe "-m68020 -mnobitfield" would suit cpu32 on 2.7.2.
109      #
110 -    case $host_cpu in
111 +    case $gmp_cpu in
112      m68020)  gcc_cflags_arch="-m68020" ;;
113      m68030)  gcc_cflags_arch="-m68030" ;;
114      m68040)  gcc_cflags_arch="-m68040" ;;
115 @@ -908,7 +912,7 @@
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.
119 -    case $host_cpu in
120 +    case $gmp_cpu in
121      [m680[234]0 | m68360])  path="m68k/mc68020 m68k" ;;
122      *)                      path="m68k" ;;
123      esac
124 @@ -1013,7 +1017,7 @@
125      SPEED_CYCLECOUNTER_OBJ=powerpc.lo
126      cyclecounter_size=0
127  
128 -    case $host_cpu in
129 +    case $gmp_cpu in
130        powerpc740 | powerpc750)
131          path="powerpc32/750 powerpc32" ;;
132        powerpc7400 | powerpc7410)
133 @@ -1024,7 +1028,7 @@
134          path="powerpc32" ;;
135      esac
136  
137 -    case $host_cpu in
138 +    case $gmp_cpu in
139        powerpc401)   gcc_cflags_cpu="-mcpu=401" ;;
140        powerpc403)   gcc_cflags_cpu="-mcpu=403"
141                     xlc_cflags_arch="-qarch=403 -qarch=ppc" ;;
142 @@ -1257,7 +1261,7 @@
143      extra_functions="udiv_w_sdiv"
144      gcc_32_cflags_maybe="-m31"
145  
146 -    case $host_cpu in
147 +    case $gmp_cpu in
148        s390)
149         ;;
150        z900 | z900esa)
151 @@ -1313,7 +1317,7 @@
152         cclist_64="gcc"
153         gcc_64_cflags_optlist="arch"
154         gcc_64_cflags="$gcc_cflags -m64"
155 -       path_64="s390_64/$host_cpu s390_64"
156 +       path_64="s390_64/$gmp_cpu s390_64"
157         extra_functions=""
158         ;;
159        esac
160 @@ -1338,7 +1342,7 @@
161      any_testlist="sizeof-long-4"
162      GMP_INCLUDE_MPN(sparc32/sparc-defs.m4)
163  
164 -    case $host_cpu in
165 +    case $gmp_cpu in
166        sparcv8 | microsparc | turbosparc)
167          path="sparc32/v8 sparc32" ;;
168        supersparc)
169 @@ -1374,7 +1378,7 @@
170      #   plain -m forms will disappear.
171      # gcc 3.3 adds ultrasparc3.
172      #
173 -    case $host_cpu in
174 +    case $gmp_cpu in
175        supersparc*)
176                         gcc_cflags_cpu="-mcpu=supersparc -msupersparc"
177                         gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";;
178 @@ -1422,7 +1426,7 @@
179  
180          # SunOS cc doesn't know -xarch, apparently always generating v7
181          # code, so make this optional
182 -       case $host_cpu in
183 +       case $gmp_cpu in
184           sparcv8 | microsparc* | supersparc* | turbosparc | hypersparc*)
185                         cc_cflags_arch="-xarch=v8";;
186            [ultrasparct[345]])
187 @@ -1438,7 +1442,7 @@
188         #   micro2, hyper, hyper2, powerup, ultra, ultra2, ultra2i.
189         # SunPRO cc 6 adds -xchip=ultra2e, ultra3cu.
190          #
191 -       case $host_cpu in
192 +       case $gmp_cpu in
193           supersparc*)  cc_cflags_cpu="-xchip=super" ;;
194           microsparc*)  cc_cflags_cpu="-xchip=micro" ;;
195           turbosparc)   cc_cflags_cpu="-xchip=micro2" ;;
196 @@ -1457,7 +1461,7 @@
197         esac
198      esac
199  
200 -    case $host_cpu in
201 +    case $gmp_cpu in
202        sparc64 | sparcv9* | ultrasparc*)
203          case $host in
204            # Solaris 6 and earlier cannot run ABI=64 since it doesn't save
205 @@ -1484,7 +1488,7 @@
206            *) abilist="64 32" ;;
207          esac
208  
209 -       case $host_cpu in
210 +       case $gmp_cpu in
211           ultrasparc | ultrasparc2 | ultrasparc2i)
212             path_64="sparc64/ultrasparc1234 sparc64" ;;
213           [ultrasparc[34]])
214 @@ -1525,7 +1529,7 @@
215              #
216              cclist_64="$cclist_64 cc"
217              cc_64_cflags_optlist="cpu"
218 -            case $host_cpu in
219 +            case $gmp_cpu in
220                [ultrasparct[345]])
221                  cc_64_cflags="$cc_64_cflags -xO3 -xarch=v9d" ;;
222                *)
223 @@ -1569,7 +1573,7 @@
224    #
225    # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc.  -m64 is
226    # the default in such a build (we think), so -m32 is essential for ABI=32.
227 -  # This is, of course, done for any $host_cpu, not just x86_64, so we can
228 +  # This is, of course, done for any $gmp_cpu, not just x86_64, so we can
229    # get such a gcc into the right mode to cross-compile to say i486-*-*.
230    #
231    # -m32 is not available in gcc 2.95 and earlier, hence cflags_maybe to use
232 @@ -1627,7 +1631,7 @@
233      # like k8 for x86_64, then it can be the -mtune at the start, no need to
234      # duplicate anything.
235      #
236 -    case $host_cpu in
237 +    case $gmp_cpu in
238        i386*)
239         gcc_cflags_cpu="-mtune=i386 -mcpu=i386 -m386"
240         gcc_cflags_arch="-march=i386"
This page took 0.068613 seconds and 3 git commands to generate.