bump version
[buildroot.git] / package / gmp / m68k-coldfire-for-libgmp.02.patch
blob01dab17ca8c9a489976e401172df09d33f25f00f
1 diff -rdup gmp-4.2.4.oorig/configure gmp-4.2.4/configure
2 --- gmp-4.2.4.oorig/configure 2008-09-11 22:03:04.000000000 +0200
3 +++ gmp-4.2.4/configure 2008-10-16 15:30:16.000000000 +0200
4 @@ -2836,10 +2836,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 @@ -2866,6 +2883,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 @@ -10410,7 +10430,7 @@ ia64-*-hpux*)
45 *-*-irix6*)
46 # Find out which ABI we are using.
47 - echo '#line 10413 "configure"' > conftest.$ac_ext
48 + echo '#line 10433 "configure"' > conftest.$ac_ext
49 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
50 (eval $ac_compile) 2>&5
51 ac_status=$?
52 @@ -12152,11 +12172,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:12155: $lt_compile\"" >&5)
57 + (eval echo "\"\$as_me:12175: $lt_compile\"" >&5)
58 (eval "$lt_compile" 2>conftest.err)
59 ac_status=$?
60 cat conftest.err >&5
61 - echo "$as_me:12159: \$? = $ac_status" >&5
62 + echo "$as_me:12179: \$? = $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 @@ -12442,11 +12462,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:12445: $lt_compile\"" >&5)
71 + (eval echo "\"\$as_me:12465: $lt_compile\"" >&5)
72 (eval "$lt_compile" 2>conftest.err)
73 ac_status=$?
74 cat conftest.err >&5
75 - echo "$as_me:12449: \$? = $ac_status" >&5
76 + echo "$as_me:12469: \$? = $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 @@ -12546,11 +12566,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:12549: $lt_compile\"" >&5)
85 + (eval echo "\"\$as_me:12569: $lt_compile\"" >&5)
86 (eval "$lt_compile" 2>out/conftest.err)
87 ac_status=$?
88 cat out/conftest.err >&5
89 - echo "$as_me:12553: \$? = $ac_status" >&5
90 + echo "$as_me:12573: \$? = $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 @@ -14932,7 +14952,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 14935 "configure"
99 +#line 14955 "configure"
100 #include "confdefs.h"
102 #if HAVE_DLFCN_H
103 @@ -15032,7 +15052,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 15035 "configure"
108 +#line 15055 "configure"
109 #include "confdefs.h"
111 #if HAVE_DLFCN_H
112 @@ -17456,11 +17476,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:17459: $lt_compile\"" >&5)
117 + (eval echo "\"\$as_me:17479: $lt_compile\"" >&5)
118 (eval "$lt_compile" 2>conftest.err)
119 ac_status=$?
120 cat conftest.err >&5
121 - echo "$as_me:17463: \$? = $ac_status" >&5
122 + echo "$as_me:17483: \$? = $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 @@ -17560,11 +17580,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:17563: $lt_compile\"" >&5)
131 + (eval echo "\"\$as_me:17583: $lt_compile\"" >&5)
132 (eval "$lt_compile" 2>out/conftest.err)
133 ac_status=$?
134 cat out/conftest.err >&5
135 - echo "$as_me:17567: \$? = $ac_status" >&5
136 + echo "$as_me:17587: \$? = $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 @@ -19122,11 +19142,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:19125: $lt_compile\"" >&5)
145 + (eval echo "\"\$as_me:19145: $lt_compile\"" >&5)
146 (eval "$lt_compile" 2>conftest.err)
147 ac_status=$?
148 cat conftest.err >&5
149 - echo "$as_me:19129: \$? = $ac_status" >&5
150 + echo "$as_me:19149: \$? = $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 @@ -19226,11 +19246,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:19229: $lt_compile\"" >&5)
159 + (eval echo "\"\$as_me:19249: $lt_compile\"" >&5)
160 (eval "$lt_compile" 2>out/conftest.err)
161 ac_status=$?
162 cat out/conftest.err >&5
163 - echo "$as_me:19233: \$? = $ac_status" >&5
164 + echo "$as_me:19253: \$? = $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 @@ -21418,11 +21438,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:21421: $lt_compile\"" >&5)
173 + (eval echo "\"\$as_me:21441: $lt_compile\"" >&5)
174 (eval "$lt_compile" 2>conftest.err)
175 ac_status=$?
176 cat conftest.err >&5
177 - echo "$as_me:21425: \$? = $ac_status" >&5
178 + echo "$as_me:21445: \$? = $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 @@ -21708,11 +21728,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:21711: $lt_compile\"" >&5)
187 + (eval echo "\"\$as_me:21731: $lt_compile\"" >&5)
188 (eval "$lt_compile" 2>conftest.err)
189 ac_status=$?
190 cat conftest.err >&5
191 - echo "$as_me:21715: \$? = $ac_status" >&5
192 + echo "$as_me:21735: \$? = $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 @@ -21812,11 +21832,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:21815: $lt_compile\"" >&5)
201 + (eval echo "\"\$as_me:21835: $lt_compile\"" >&5)
202 (eval "$lt_compile" 2>out/conftest.err)
203 ac_status=$?
204 cat out/conftest.err >&5
205 - echo "$as_me:21819: \$? = $ac_status" >&5
206 + echo "$as_me:21839: \$? = $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 -rdup gmp-4.2.4.oorig/configure.in gmp-4.2.4/configure.in
211 --- gmp-4.2.4.oorig/configure.in 2008-08-01 19:24:04.000000000 +0200
212 +++ gmp-4.2.4/configure.in 2008-10-16 15:28:25.000000000 +0200
213 @@ -237,6 +237,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 @@ -719,7 +720,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="-O2 $fomit_frame_pointer"
243 gcc_cflags_optlist="arch"
244 @@ -744,6 +759,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 -rdup gmp-4.2.4.oorig/gmp-impl.h gmp-4.2.4/gmp-impl.h
255 --- gmp-4.2.4.oorig/gmp-impl.h 2007-08-30 20:31:40.000000000 +0200
256 +++ gmp-4.2.4/gmp-impl.h 2008-10-16 15:30:05.000000000 +0200
257 @@ -2958,7 +2958,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 -rdup gmp-4.2.4.oorig/mpn/m68k/README gmp-4.2.4/mpn/m68k/README
267 --- gmp-4.2.4.oorig/mpn/m68k/README 2007-08-30 20:31:41.000000000 +0200
268 +++ gmp-4.2.4/mpn/m68k/README 2008-10-16 13:23:12.000000000 +0200
269 @@ -29,10 +29,11 @@ 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
277 -no assembler code support.
278 +no assembler code support.
281 STATUS