bump version
[buildroot.git] / package / gmp / m68k-coldfire-for-libgmp.02.patch
blobe2af173ff2c9704d30b39f37d8e9f848a9f7c996
1 diff -rduNp gmp-4.3.1.oorig/configure gmp-4.3.1/configure
2 --- gmp-4.3.1.oorig/configure 2009-05-12 08:12:45.000000000 +0200
3 +++ gmp-4.3.1/configure 2009-08-18 18:13:53.000000000 +0200
4 @@ -2851,10 +2851,27 @@ echo "include_mpn(\`ia64/ia64-defs.m4')"
5 # Motorola 68k
7 m68k-*-* | m68[0-9][0-9][0-9]-*-*)
8 - cat >>confdefs.h <<\_ACEOF
10 + if test "x$ac_cv_host_cpu_family_coldfire" = "x"; then
11 +# ideally we would look if the CPP defined __mcoldfire__
12 +for __cfla in $CFLAGS;
13 +do
14 + case $__cfla in
15 + -mcpu=5*) ac_cv_host_cpu_family_coldfire=yes;;
16 + esac
17 +done
18 + fi
19 + if test "x$ac_cv_host_cpu_family_coldfire" = "xyes"; then
20 + cat >>confdefs.h <<\_ACEOF
21 +#define HAVE_HOST_CPU_FAMILY_coldfire 1
22 +_ACEOF
24 + else
25 + cat >>confdefs.h <<\_ACEOF
26 #define HAVE_HOST_CPU_FAMILY_m68k 1
27 _ACEOF
29 + fi
31 echo "include_mpn(\`m68k/m68k-defs.m4')" >> $gmp_tmpconfigm4i
33 @@ -2881,6 +2898,9 @@ echo "include_mpn(\`m68k/m68k-defs.m4')"
34 m680[234]0 | m68360) path="m68k/mc68020 m68k" ;;
35 *) path="m68k" ;;
36 esac
37 + if test "x$ac_cv_host_cpu_family_coldfire" = "xyes"; then
38 + path="m68k/m5200 m68k" ; path="m68k/m5200"
39 + fi
43 @@ -10436,7 +10456,7 @@ ia64-*-hpux*)
45 *-*-irix6*)
46 # Find out which ABI we are using.
47 - echo '#line 10439 "configure"' > conftest.$ac_ext
48 + echo '#line 10459 "configure"' > conftest.$ac_ext
49 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50 (eval $ac_compile) 2>&5
51 ac_status=$?
52 @@ -12178,11 +12198,11 @@ else
53 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
54 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
55 -e 's:$: $lt_compiler_flag:'`
56 - (eval echo "\"\$as_me:12181: $lt_compile\"" >&5)
57 + (eval echo "\"\$as_me:12201: $lt_compile\"" >&5)
58 (eval "$lt_compile" 2>conftest.err)
59 ac_status=$?
60 cat conftest.err >&5
61 - echo "$as_me:12185: \$? = $ac_status" >&5
62 + echo "$as_me:12205: \$? = $ac_status" >&5
63 if (exit $ac_status) && test -s "$ac_outfile"; then
64 # The compiler can only warn and ignore the option if not recognized
65 # So say no if there are warnings other than the usual output.
66 @@ -12468,11 +12488,11 @@ else
67 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
68 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
69 -e 's:$: $lt_compiler_flag:'`
70 - (eval echo "\"\$as_me:12471: $lt_compile\"" >&5)
71 + (eval echo "\"\$as_me:12491: $lt_compile\"" >&5)
72 (eval "$lt_compile" 2>conftest.err)
73 ac_status=$?
74 cat conftest.err >&5
75 - echo "$as_me:12475: \$? = $ac_status" >&5
76 + echo "$as_me:12495: \$? = $ac_status" >&5
77 if (exit $ac_status) && test -s "$ac_outfile"; then
78 # The compiler can only warn and ignore the option if not recognized
79 # So say no if there are warnings other than the usual output.
80 @@ -12572,11 +12592,11 @@ else
81 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
82 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
83 -e 's:$: $lt_compiler_flag:'`
84 - (eval echo "\"\$as_me:12575: $lt_compile\"" >&5)
85 + (eval echo "\"\$as_me:12595: $lt_compile\"" >&5)
86 (eval "$lt_compile" 2>out/conftest.err)
87 ac_status=$?
88 cat out/conftest.err >&5
89 - echo "$as_me:12579: \$? = $ac_status" >&5
90 + echo "$as_me:12599: \$? = $ac_status" >&5
91 if (exit $ac_status) && test -s out/conftest2.$ac_objext
92 then
93 # The compiler can only warn and ignore the option if not recognized
94 @@ -14958,7 +14978,7 @@ else
95 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
96 lt_status=$lt_dlunknown
97 cat > conftest.$ac_ext <<EOF
98 -#line 14961 "configure"
99 +#line 14981 "configure"
100 #include "confdefs.h"
102 #if HAVE_DLFCN_H
103 @@ -15058,7 +15078,7 @@ else
104 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
105 lt_status=$lt_dlunknown
106 cat > conftest.$ac_ext <<EOF
107 -#line 15061 "configure"
108 +#line 15081 "configure"
109 #include "confdefs.h"
111 #if HAVE_DLFCN_H
112 @@ -17482,11 +17502,11 @@ else
113 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
114 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
115 -e 's:$: $lt_compiler_flag:'`
116 - (eval echo "\"\$as_me:17485: $lt_compile\"" >&5)
117 + (eval echo "\"\$as_me:17505: $lt_compile\"" >&5)
118 (eval "$lt_compile" 2>conftest.err)
119 ac_status=$?
120 cat conftest.err >&5
121 - echo "$as_me:17489: \$? = $ac_status" >&5
122 + echo "$as_me:17509: \$? = $ac_status" >&5
123 if (exit $ac_status) && test -s "$ac_outfile"; then
124 # The compiler can only warn and ignore the option if not recognized
125 # So say no if there are warnings other than the usual output.
126 @@ -17586,11 +17606,11 @@ else
127 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
128 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
129 -e 's:$: $lt_compiler_flag:'`
130 - (eval echo "\"\$as_me:17589: $lt_compile\"" >&5)
131 + (eval echo "\"\$as_me:17609: $lt_compile\"" >&5)
132 (eval "$lt_compile" 2>out/conftest.err)
133 ac_status=$?
134 cat out/conftest.err >&5
135 - echo "$as_me:17593: \$? = $ac_status" >&5
136 + echo "$as_me:17613: \$? = $ac_status" >&5
137 if (exit $ac_status) && test -s out/conftest2.$ac_objext
138 then
139 # The compiler can only warn and ignore the option if not recognized
140 @@ -19148,11 +19168,11 @@ else
141 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
142 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
143 -e 's:$: $lt_compiler_flag:'`
144 - (eval echo "\"\$as_me:19151: $lt_compile\"" >&5)
145 + (eval echo "\"\$as_me:19171: $lt_compile\"" >&5)
146 (eval "$lt_compile" 2>conftest.err)
147 ac_status=$?
148 cat conftest.err >&5
149 - echo "$as_me:19155: \$? = $ac_status" >&5
150 + echo "$as_me:19175: \$? = $ac_status" >&5
151 if (exit $ac_status) && test -s "$ac_outfile"; then
152 # The compiler can only warn and ignore the option if not recognized
153 # So say no if there are warnings other than the usual output.
154 @@ -19252,11 +19272,11 @@ else
155 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
156 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
157 -e 's:$: $lt_compiler_flag:'`
158 - (eval echo "\"\$as_me:19255: $lt_compile\"" >&5)
159 + (eval echo "\"\$as_me:19275: $lt_compile\"" >&5)
160 (eval "$lt_compile" 2>out/conftest.err)
161 ac_status=$?
162 cat out/conftest.err >&5
163 - echo "$as_me:19259: \$? = $ac_status" >&5
164 + echo "$as_me:19279: \$? = $ac_status" >&5
165 if (exit $ac_status) && test -s out/conftest2.$ac_objext
166 then
167 # The compiler can only warn and ignore the option if not recognized
168 @@ -21444,11 +21464,11 @@ else
169 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
170 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
171 -e 's:$: $lt_compiler_flag:'`
172 - (eval echo "\"\$as_me:21447: $lt_compile\"" >&5)
173 + (eval echo "\"\$as_me:21467: $lt_compile\"" >&5)
174 (eval "$lt_compile" 2>conftest.err)
175 ac_status=$?
176 cat conftest.err >&5
177 - echo "$as_me:21451: \$? = $ac_status" >&5
178 + echo "$as_me:21471: \$? = $ac_status" >&5
179 if (exit $ac_status) && test -s "$ac_outfile"; then
180 # The compiler can only warn and ignore the option if not recognized
181 # So say no if there are warnings other than the usual output.
182 @@ -21734,11 +21754,11 @@ else
183 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
184 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
185 -e 's:$: $lt_compiler_flag:'`
186 - (eval echo "\"\$as_me:21737: $lt_compile\"" >&5)
187 + (eval echo "\"\$as_me:21757: $lt_compile\"" >&5)
188 (eval "$lt_compile" 2>conftest.err)
189 ac_status=$?
190 cat conftest.err >&5
191 - echo "$as_me:21741: \$? = $ac_status" >&5
192 + echo "$as_me:21761: \$? = $ac_status" >&5
193 if (exit $ac_status) && test -s "$ac_outfile"; then
194 # The compiler can only warn and ignore the option if not recognized
195 # So say no if there are warnings other than the usual output.
196 @@ -21838,11 +21858,11 @@ else
197 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
198 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
199 -e 's:$: $lt_compiler_flag:'`
200 - (eval echo "\"\$as_me:21841: $lt_compile\"" >&5)
201 + (eval echo "\"\$as_me:21861: $lt_compile\"" >&5)
202 (eval "$lt_compile" 2>out/conftest.err)
203 ac_status=$?
204 cat out/conftest.err >&5
205 - echo "$as_me:21845: \$? = $ac_status" >&5
206 + echo "$as_me:21865: \$? = $ac_status" >&5
207 if (exit $ac_status) && test -s out/conftest2.$ac_objext
208 then
209 # The compiler can only warn and ignore the option if not recognized
210 diff -rduNp gmp-4.3.1.oorig/configure.in gmp-4.3.1/configure.in
211 --- gmp-4.3.1.oorig/configure.in 2009-05-12 08:12:12.000000000 +0200
212 +++ gmp-4.3.1/configure.in 2009-08-18 18:11:26.000000000 +0200
213 @@ -247,6 +247,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
214 For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */
215 #undef HAVE_HOST_CPU_FAMILY_alpha
216 #undef HAVE_HOST_CPU_FAMILY_m68k
217 +#undef HAVE_HOST_CPU_FAMILY_coldfire
218 #undef HAVE_HOST_CPU_FAMILY_power
219 #undef HAVE_HOST_CPU_FAMILY_powerpc
220 #undef HAVE_HOST_CPU_FAMILY_x86
221 @@ -729,7 +730,21 @@ case $host in
222 # Motorola 68k
224 M68K_PATTERN)
225 - AC_DEFINE(HAVE_HOST_CPU_FAMILY_m68k)
227 + if test "x$ac_cv_host_cpu_family_coldfire" = "x"; then
228 +# ideally we would look if the CPP defined __mcoldfire__
229 +for __cfla in $CFLAGS;
231 + case $__cfla in
232 + -mcpu=5*) ac_cv_host_cpu_family_coldfire=yes;;
233 + esac
234 +done
235 + fi
236 + if test "x$ac_cv_host_cpu_family_coldfire" = "xyes"; then
237 + AC_DEFINE(HAVE_HOST_CPU_FAMILY_coldfire)
238 + else
239 + AC_DEFINE(HAVE_HOST_CPU_FAMILY_m68k)
240 + fi
241 GMP_INCLUDE_MPN(m68k/m68k-defs.m4)
242 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
243 gcc_cflags_optlist="arch"
244 @@ -754,6 +769,9 @@ case $host in
245 [m680[234]0 | m68360]) path="m68k/mc68020 m68k" ;;
246 *) path="m68k" ;;
247 esac
248 + if test "x$ac_cv_host_cpu_family_coldfire" = "xyes"; then
249 + path="m68k/m5200 m68k" ; path="m68k/m5200"
250 + fi
254 diff -rduNp gmp-4.3.1.oorig/gmp-impl.h gmp-4.3.1/gmp-impl.h
255 --- gmp-4.3.1.oorig/gmp-impl.h 2009-05-12 08:12:12.000000000 +0200
256 +++ gmp-4.3.1/gmp-impl.h 2009-08-18 18:11:26.000000000 +0200
257 @@ -3341,7 +3341,7 @@ double mpn_get_d __GMP_PROTO ((mp_srcptr
258 seem to put the operand through memory as hoped. */
260 #if (HAVE_HOST_CPU_FAMILY_m68k || HAVE_HOST_CPU_FAMILY_x86 \
261 - || defined (__amd64__))
262 + || defined (__amd64__) || HAVE_HOST_CPU_FAMILY_coldfire)
263 #define FORCE_DOUBLE(d) \
264 do { volatile double __gmp_force = (d); (d) = __gmp_force; } while (0)
265 #else
266 diff -rduNp gmp-4.3.1.oorig/mpn/m68k/README gmp-4.3.1/mpn/m68k/README
267 --- gmp-4.3.1.oorig/mpn/m68k/README 2009-05-12 08:12:12.000000000 +0200
268 +++ gmp-4.3.1/mpn/m68k/README 2009-08-18 18:11:26.000000000 +0200
269 @@ -29,6 +29,7 @@ CODE ORGANIZATION
271 m68k m68000, m68010, m68060
272 m68k/mc68020 m68020, m68030, m68040, and CPU32
273 + m68k/m5200 coldfire (e.g. 5475)
276 The m5200 "coldfire", which is m68000 less a few instructions, currently has