Gentoo Archives: gentoo-commits

From: "Ned Ludd (solar)" <solar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/uclibc/0.9.30/math: 10_all_uClibc-0.9.29-susv3-2.patch 15_all_uClibc-0.9.29-susv3-ldouble-3.patch
Date: Tue, 23 Sep 2008 20:14:07
Message-Id: E1KiEGo-0001Yj-VN@stork.gentoo.org
1 solar 08/09/23 20:14:02
2
3 Added: 10_all_uClibc-0.9.29-susv3-2.patch
4 15_all_uClibc-0.9.29-susv3-ldouble-3.patch
5 Log:
6 - import initial gentoo patchset for 0.9.30_rc1
7
8 Revision Changes Path
9 1.1 src/patchsets/uclibc/0.9.30/math/10_all_uClibc-0.9.29-susv3-2.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.30/math/10_all_uClibc-0.9.29-susv3-2.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.30/math/10_all_uClibc-0.9.29-susv3-2.patch?rev=1.1&content-type=text/plain
13
14 Index: 10_all_uClibc-0.9.29-susv3-2.patch
15 ===================================================================
16 --- uClibc-0.9.29/libm/Makefile.in~ 2007-04-12 05:41:16.000000000 +0200
17 +++ uClibc-0.9.29/libm/Makefile.in 2008-09-14 14:43:19.000000000 +0200
18 @@ -62,7 +62,7 @@
19 libm_CSRC := \
20 e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c \
21 e_exp.c e_fmod.c e_gamma.c e_gamma_r.c e_hypot.c e_j0.c \
22 - e_j1.c e_jn.c e_lgamma.c e_lgamma_r.c e_log.c e_log10.c \
23 + e_j1.c e_jn.c e_lgamma.c e_lgamma_r.c e_log.c e_log2.c e_log10.c \
24 e_pow.c e_remainder.c e_rem_pio2.c e_scalb.c e_sinh.c \
25 e_sqrt.c k_cos.c k_rem_pio2.c k_sin.c k_standard.c k_tan.c \
26 s_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c \
27 @@ -70,10 +70,11 @@
28 s_ilogb.c s_ldexp.c s_lib_version.c s_lrint.c s_lround.c s_llround.c \
29 s_log1p.c s_logb.c s_matherr.c s_modf.c s_nextafter.c s_round.c \
30 s_rint.c s_scalbn.c s_signgam.c s_significand.c s_sin.c s_tan.c \
31 + s_fdim.c s_fma.c s_fmax.c s_fmin.c s_nearbyint.c s_remquo.c s_scalbln.c \
32 s_tanh.c s_trunc.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c \
33 - w_cabs.c w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c \
34 + w_cabs.c w_cosh.c w_drem.c w_exp.c w_exp2.c w_fmod.c w_gamma.c w_gamma_r.c w_tgamma.c \
35 w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \
36 - w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \
37 + w_log.c w_log2.c w_log10.c w_nexttoward.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \
38 w_sqrt.c fpmacros.c nan.c carg.c s_llrint.c
39 FL_MOBJ := \
40 acosf.o acoshf.o asinf.o asinhf.o atan2f.o atanf.o atanhf.o cbrtf.o \
41 @@ -83,7 +84,7 @@
42 log1pf.o log2f.o logbf.o logf.o lrintf.o lroundf.o modff.o nearbyintf.o \
43 nextafterf.o powf.o remainderf.o remquof.o rintf.o roundf.o \
44 scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \
45 - tgammaf.o truncf.o cargf.o llrintf.o
46 + tgammaf.o truncf.o cargf.o llrintf.o gammaf.o nexttowardf.o
47 else
48 # This list of math functions was taken from POSIX/IEEE 1003.1b-1993
49 libm_CSRC := \
50 --- uClibc-0.9.29/libm/float_wrappers.c~ 2007-04-12 05:41:16.000000000 +0200
51 +++ uClibc-0.9.29/libm/float_wrappers.c 2008-09-14 15:03:54.000000000 +0200
52 @@ -13,20 +13,6 @@
53 #include <math.h>
54 #include <complex.h>
55
56 -/* For the time being, do _NOT_ implement these functions
57 - * that are defined by SuSv3 */
58 -#undef L_exp2f /*float exp2f(float);*/
59 -#undef L_fdimf /*float fdimf(float, float);*/
60 -#undef L_fmaf /*float fmaf(float, float, float);*/
61 -#undef L_fmaxf /*float fmaxf(float, float);*/
62 -#undef L_fminf /*float fminf(float, float);*/
63 -#undef L_log2f /*float log2f(float);*/
64 -#undef L_nearbyintf /*float nearbyintf(float);*/
65 -#undef L_nexttowardf /*float nexttowardf(float, long double);*/
66 -#undef L_remquof /*float remquof(float, float, int *);*/
67 -#undef L_scalblnf /*float scalblnf(float, long);*/
68 -#undef L_tgammaf /*float tgammaf(float);*/
69 -
70 /* Implement the following, as defined by SuSv3 */
71 #if 0
72 float acosf(float);
73 @@ -43,9 +29,14 @@
74 float coshf(float);
75 float erfcf(float);
76 float erff(float);
77 +float exp2f(float);
78 float expf(float);
79 float expm1f(float);
80 float fabsf(float);
81 +float fdimf(float, float);
82 +float fmaf(float, float, float);
83 +float fmaxf(float, float);
84 +float fminf(float, float);
85 float floorf(float);
86 float fmodf(float, float);
87 float frexpf(float value, int *);
88 @@ -53,24 +44,33 @@
89 int ilogbf(float);
90 float ldexpf(float, int);
91 float lgammaf(float);
92 +long long llrintf(float);
93 long long llroundf(float);
94 float log10f(float);
95 float log1pf(float);
96 +float log2f(float);
97 float logbf(float);
98 float logf(float);
99 +long lrintf(float);
100 long lroundf(float);
101 float modff(float, float *);
102 +float nearbyintf(float);
103 float nextafterf(float, float);
104 +float nexttowardf(float, long double);
105 float powf(float, float);
106 float remainderf(float, float);
107 +float remquof(float, float, int *);
108 float rintf(float);
109 float roundf(float);
110 float scalbnf(float, int);
111 +float scalblnf(float, long);
112 float sinf(float);
113 float sinhf(float);
114 float sqrtf(float);
115 float tanf(float);
116 float tanhf(float);
117 +float tgammaf(float);
118 +float truncf(float);
119 #endif
120
121
122 --- uClibc-0.9.29/libm/math_private.h~ 2006-03-22 21:00:25.000000000 +0100
123 +++ uClibc-0.9.29/libm/math_private.h 2008-09-14 15:08:00.000000000 +0200
124 @@ -157,6 +157,7 @@
125 extern double __ieee754_acos (double) attribute_hidden;
126 extern double __ieee754_acosh (double) attribute_hidden;
127 extern double __ieee754_log (double) attribute_hidden;
128 +extern double __ieee754_log2 (double) attribute_hidden;
129 extern double __ieee754_atanh (double) attribute_hidden;
130 extern double __ieee754_asin (double) attribute_hidden;
131 extern double __ieee754_atan2 (double,double) attribute_hidden;
132
133
134
135 1.1 src/patchsets/uclibc/0.9.30/math/15_all_uClibc-0.9.29-susv3-ldouble-3.patch
136
137 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.30/math/15_all_uClibc-0.9.29-susv3-ldouble-3.patch?rev=1.1&view=markup
138 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.30/math/15_all_uClibc-0.9.29-susv3-ldouble-3.patch?rev=1.1&content-type=text/plain
139
140 Index: 15_all_uClibc-0.9.29-susv3-ldouble-3.patch
141 ===================================================================
142 --- uClibc-0.9.29/extra/Configs/Config.in.arch.orig 2007-02-18 15:17:20.000000000 +0100
143 +++ uClibc-0.9.29/extra/Configs/Config.in.arch 2008-09-14 15:24:40.000000000 +0200
144 @@ -159,6 +159,16 @@
145 If your applications require the newer C99 math library functions,
146 then answer Y.
147
148 +config UCLIBC_HAS_LONG_DOUBLE_MATH
149 + bool "Enable long double support"
150 + depends on DO_C99_MATH
151 + depends on TARGET_i386 || TARGET_m68k || TARGET_sparc || TARGET_x86_64
152 + default y
153 + help
154 + If you want the uClibc math library to contain the full set of C99
155 + long double math library features, then answer Y. Don't enable it
156 + for sparc w/ 32bit ABI.
157 +
158 config KERNEL_HEADERS
159 string "Linux kernel header location"
160 default "/usr/include"
161 --- uClibc-0.9.29/include/complex.h~ 2008-09-14 14:02:44.000000000 +0200
162 +++ uClibc-0.9.29/include/complex.h 2008-09-14 15:26:10.000000000 +0200
163 @@ -84,7 +84,7 @@
164
165 /* And the long double versions. It is non-critical to define them
166 here unconditionally since `long double' is required in ISO C99. */
167 -#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
168 +#if __STDC__ - 0 || __GNUC__ - 0 && defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
169 # ifndef _Mlong_double_
170 # define _Mlong_double_ long double
171 # endif
172 --- uClibc-0.9.29/include/math.h~ 2006-08-24 02:15:09.000000000 +0200
173 +++ uClibc-0.9.29/include/math.h 2008-09-14 15:29:03.000000000 +0200
174 @@ -98,7 +98,7 @@
175 # undef __MATH_PRECNAME
176
177 # if (__STDC__ - 0 || __GNUC__ - 0) \
178 - && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
179 + && (defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ || defined __LDBL_COMPAT)
180 # ifdef __LDBL_COMPAT
181
182 # ifdef __USE_ISOC99
183 @@ -210,7 +210,7 @@
184 };
185
186 /* Return number of classification appropriate for X. */
187 -# ifdef __NO_LONG_DOUBLE_MATH
188 +# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
189 # define fpclassify(x) \
190 (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x))
191 # else
192 @@ -222,7 +222,7 @@
193 # endif
194
195 /* Return nonzero value if sign of X is negative. */
196 -# ifdef __NO_LONG_DOUBLE_MATH
197 +# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
198 # define signbit(x) \
199 (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x))
200 # else
201 @@ -234,7 +234,7 @@
202 # endif
203
204 /* Return nonzero value if X is not +-Inf or NaN. */
205 -# ifdef __NO_LONG_DOUBLE_MATH
206 +# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
207 # define isfinite(x) \
208 (sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x))
209 # else
210 @@ -250,7 +250,7 @@
211
212 /* Return nonzero value if X is a NaN. We could use `fpclassify' but
213 we already have this functions `__isnan' and it is faster. */
214 -# ifdef __NO_LONG_DOUBLE_MATH
215 +# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
216 # define isnan(x) \
217 (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
218 # else
219 @@ -262,7 +262,7 @@
220 # endif
221
222 /* Return nonzero value is X is positive or negative infinity. */
223 -# ifdef __NO_LONG_DOUBLE_MATH
224 +# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
225 # define isinf(x) \
226 (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
227 # else
228 --- uClibc-0.9.29/include/tgmath.h~ 2008-09-14 14:02:44.000000000 +0200
229 +++ uClibc-0.9.29/include/tgmath.h 2008-09-14 15:34:07.000000000 +0200
230 @@ -36,7 +36,7 @@
231
232 #if __GNUC_PREREQ(2, 7)
233
234 -# ifdef __NO_LONG_DOUBLE_MATH
235 +# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
236 # define __tgml(fct) fct
237 # else
238 # define __tgml(fct) fct ## l
239 --- uClibc-0.9.29~/libc/sysdeps/linux/alpha/bits/mathdef.h 2006-08-23 21:25:34.000000000 +0200
240 +++ uClibc-0.9.29/libc/sysdeps/linux/alpha/bits/mathdef.h 2008-09-14 15:49:57.000000000 +0200
241 @@ -78,7 +78,3 @@
242
243 # endif /* GNUC before 3.4 */
244 #endif /* COMPLEX_H */
245 -
246 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
247 -# define __NO_LONG_DOUBLE_MATH 1
248 -#endif
249 --- uClibc-0.9.29~/libc/sysdeps/linux/alpha/bits/wordsize.h 2006-02-19 11:42:00.000000000 +0100
250 +++ uClibc-0.9.29/libc/sysdeps/linux/alpha/bits/wordsize.h 2008-09-14 15:50:22.000000000 +0200
251 @@ -18,13 +18,13 @@
252
253 #define __WORDSIZE 64
254
255 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
256 +#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL
257
258 /* Signal that we didn't used to have a `long double'. The changes all
259 the `long double' function variants to be redirects to the double
260 functions. */
261 # define __LONG_DOUBLE_MATH_OPTIONAL 1
262 # ifndef __LONG_DOUBLE_128__
263 -# define __NO_LONG_DOUBLE_MATH 1
264 +# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
265 # endif
266 #endif
267 --- uClibc-0.9.29~/libc/sysdeps/linux/arm/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
268 +++ uClibc-0.9.29/libc/sysdeps/linux/arm/bits/mathdef.h 2008-09-14 15:39:12.000000000 +0200
269 @@ -34,11 +34,3 @@
270 # define FP_ILOGBNAN (2147483647)
271
272 #endif /* ISO C99 */
273 -
274 -#ifndef __NO_LONG_DOUBLE_MATH
275 -/* Signal that we do not really have a `long double'. This disables the
276 - declaration of all the `long double' function variants. */
277 -/* XXX The FPA does support this but the patterns in GCC are currently
278 - turned off. */
279 -# define __NO_LONG_DOUBLE_MATH 1
280 -#endif
281 --- uClibc-0.9.29~/libc/sysdeps/linux/common/bits/mathdef.h 2006-08-24 02:15:09.000000000 +0200
282 +++ uClibc-0.9.29/libc/sysdeps/linux/common/bits/mathdef.h 2008-09-14 15:38:54.000000000 +0200
283 @@ -35,9 +35,3 @@
284 # define FP_ILOGBNAN 2147483647
285
286 #endif /* ISO C99 */
287 -
288 -#ifndef __NO_LONG_DOUBLE_MATH
289 -/* Signal that we do not really have a `long double'. The disables the
290 - declaration of all the `long double' function variants. */
291 -# define __NO_LONG_DOUBLE_MATH 1
292 -#endif
293 --- uClibc-0.9.29~/libc/sysdeps/linux/i386/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
294 +++ uClibc-0.9.29/libc/sysdeps/linux/i386/bits/mathdef.h 2008-09-14 15:46:40.000000000 +0200
295 @@ -44,7 +44,3 @@
296 # define FP_ILOGBNAN (-2147483647 - 1)
297
298 #endif /* ISO C99 */
299 -
300 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
301 -# define __NO_LONG_DOUBLE_MATH 1
302 -#endif
303 --- uClibc-0.9.29~/libc/sysdeps/linux/ia64/bits/mathdef.h 2006-08-23 21:25:34.000000000 +0200
304 +++ uClibc-0.9.29/libc/sysdeps/linux/ia64/bits/mathdef.h 2008-09-14 15:42:34.000000000 +0200
305 @@ -35,7 +35,3 @@
306 # define FP_ILOGBNAN 2147483647
307
308 #endif /* ISO C99 */
309 -
310 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
311 -# define __NO_LONG_DOUBLE_MATH 1
312 -#endif
313 --- uClibc-0.9.29~/libc/sysdeps/linux/m68k/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
314 +++ uClibc-0.9.29/libc/sysdeps/linux/m68k/bits/mathdef.h 2008-09-14 15:49:48.000000000 +0200
315 @@ -36,7 +36,3 @@
316 # define FP_ILOGBNAN (2147483647)
317
318 #endif /* ISO C99 */
319 -
320 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
321 -# define __NO_LONG_DOUBLE_MATH 1
322 -#endif
323 --- uClibc-0.9.29~/libc/sysdeps/linux/mips/bits/mathdef.h 2006-08-23 21:25:34.000000000 +0200
324 +++ uClibc-0.9.29/libc/sysdeps/linux/mips/bits/mathdef.h 2008-09-14 15:46:23.000000000 +0200
325 @@ -39,10 +39,8 @@
326
327 #endif /* ISO C99 */
328
329 -#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
330 +#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && _MIPS_SIM == _ABIO32
331 /* Signal that we do not really have a `long double'. This disables the
332 declaration of all the `long double' function variants. */
333 -# define __NO_LONG_DOUBLE_MATH 1
334 -#elif !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
335 -# define __NO_LONG_DOUBLE_MATH 1
336 +# error defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ and _MIPS_SIM == _ABIO32
337 #endif
338 --- uClibc-0.9.29~/libc/sysdeps/linux/nios/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
339 +++ uClibc-0.9.29/libc/sysdeps/linux/nios/bits/mathdef.h 2008-09-14 15:36:55.000000000 +0200
340 @@ -34,11 +34,3 @@
341 # define FP_ILOGBNAN (2147483647)
342
343 #endif /* ISO C99 */
344 -
345 -#ifndef __NO_LONG_DOUBLE_MATH
346 -/* Signal that we do not really have a `long double'. This disables the
347 - declaration of all the `long double' function variants. */
348 -/* XXX The FPA does support this but the patterns in GCC are currently
349 - turned off. */
350 -# define __NO_LONG_DOUBLE_MATH 1
351 -#endif
352 --- uClibc-0.9.29~/libc/sysdeps/linux/nios2/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
353 +++ uClibc-0.9.29/libc/sysdeps/linux/nios2/bits/mathdef.h 2008-09-14 15:38:41.000000000 +0200
354 @@ -34,11 +34,3 @@
355 # define FP_ILOGBNAN (2147483647)
356
357 #endif /* ISO C99 */
358 -
359 -#ifndef __NO_LONG_DOUBLE_MATH
360 -/* Signal that we do not really have a `long double'. This disables the
361 - declaration of all the `long double' function variants. */
362 -/* XXX The FPA does support this but the patterns in GCC are currently
363 - turned off. */
364 -# define __NO_LONG_DOUBLE_MATH 1
365 -#endif
366 --- uClibc-0.9.29~/libc/sysdeps/linux/powerpc/bits/mathdef.h 2007-02-13 16:01:38.000000000 +0100
367 +++ uClibc-0.9.29/libc/sysdeps/linux/powerpc/bits/mathdef.h 2008-09-14 15:50:40.000000000 +0200
368 @@ -65,13 +65,11 @@
369
370 #endif /* ISO C99 */
371
372 -#ifndef __NO_LONG_DOUBLE_MATH
373 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
374 #include <bits/wordsize.h>
375 /* Signal that we do not really have a `long double'. The disables the
376 declaration of all the `long double' function variants. */
377 # if __WORDSIZE == 32
378 -# define __NO_LONG_DOUBLE_MATH 1
379 -# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
380 -# define __NO_LONG_DOUBLE_MATH 1
381 +# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
382 # endif /* __WORDSIZE == 32 */
383 -#endif /* __NO_LONG_DOUBLE_MATH */
384 +#endif /* __UCLIBC_HAS_LONG_DOUBLE_MATH__ */
385 --- uClibc-0.9.29~/libc/sysdeps/linux/powerpc/bits/wordsize.h 2006-02-22 06:27:38.000000000 +0100
386 +++ uClibc-0.9.29/libc/sysdeps/linux/powerpc/bits/wordsize.h 2008-09-14 15:48:31.000000000 +0200
387 @@ -7,13 +7,13 @@
388 # define __WORDSIZE 32
389 #endif
390
391 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
392 +#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL
393
394 /* Signal the glibc ABI didn't used to have a `long double'.
395 The changes all the `long double' function variants to be redirects
396 to the double functions. */
397 # define __LONG_DOUBLE_MATH_OPTIONAL 1
398 # ifndef __LONG_DOUBLE_128__
399 -# define __NO_LONG_DOUBLE_MATH 1
400 +# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
401 # endif
402 #endif
403 --- uClibc-0.9.29~/libc/sysdeps/linux/sh/bits/mathdef.h 2006-08-23 21:25:34.000000000 +0200
404 +++ uClibc-0.9.29/libc/sysdeps/linux/sh/bits/mathdef.h 2008-09-14 15:42:08.000000000 +0200
405 @@ -61,9 +61,3 @@
406 # define FP_ILOGBNAN 0x7fffffff
407
408 #endif /* ISO C99 */
409 -
410 -#ifndef __NO_LONG_DOUBLE_MATH
411 -/* Signal that we do not really have a `long double'. The disables the
412 - declaration of all the `long double' function variants. */
413 -# define __NO_LONG_DOUBLE_MATH 1
414 -#endif
415 --- uClibc-0.9.29~/libc/sysdeps/linux/sparc/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
416 +++ uClibc-0.9.29/libc/sysdeps/linux/sparc/bits/mathdef.h 2008-09-14 15:51:37.000000000 +0200
417 @@ -57,15 +57,13 @@
418
419 #endif /* ISO C99 */
420
421 -#ifndef __NO_LONG_DOUBLE_MATH
422 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
423
424 # if __WORDSIZE == 32
425 /* Signal that in 32bit ABI we do not really have a `long double'.
426 The disables the declaration of all the `long double' function
427 variants. */
428 -# define __NO_LONG_DOUBLE_MATH 1
429 -# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
430 -# define __NO_LONG_DOUBLE_MATH 1
431 +# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
432 # endif
433
434 #endif
435 --- uClibc-0.9.29~/libc/sysdeps/linux/sparc/bits/mathinline.h 2006-08-23 21:27:42.000000000 +0200
436 +++ uClibc-0.9.29/libc/sysdeps/linux/sparc/bits/mathinline.h 2008-09-14 15:52:16.000000000 +0200
437 @@ -37,7 +37,7 @@
438
439 # if __WORDSIZE == 32
440
441 -# ifndef __NO_LONG_DOUBLE_MATH
442 +# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
443
444 # define __unordered_cmp(x, y) \
445 (__extension__ \
446 @@ -157,7 +157,7 @@
447 return __u.__i[0] < 0;
448 }
449
450 -# ifndef __NO_LONG_DOUBLE_MATH
451 +# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
452 __MATH_INLINE int
453 __NTH (__signbitl (long double __x))
454 {
455 @@ -219,7 +219,7 @@
456 _Qp_sqrt (&__r, &__x);
457 return __r;
458 }
459 -# elif !defined __NO_LONG_DOUBLE_MATH
460 +# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
461 __MATH_INLINE long double
462 sqrtl (long double __x) __THROW
463 {
464 @@ -257,7 +257,7 @@
465 _Qp_sqrt(&__r, &__x);
466 return __r;
467 }
468 -# elif !defined __NO_LONG_DOUBLE_MATH
469 +# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
470 __MATH_INLINE long double
471 __ieee754_sqrtl (long double __x)
472 {
473 --- uClibc-0.9.29~/libc/sysdeps/linux/sparc/bits/wordsize.h 2006-08-23 21:27:42.000000000 +0200
474 +++ uClibc-0.9.29/libc/sysdeps/linux/sparc/bits/wordsize.h 2008-09-14 15:51:10.000000000 +0200
475 @@ -6,7 +6,7 @@
476 # define __WORDSIZE 32
477 #endif
478
479 -#if 0 /* uClibc: done in mathdefs.h: !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL*/
480 +#if 0 /* uClibc: done in mathdefs.h: defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL*/
481
482 # if __WORDSIZE == 32
483 /* Signal that in 32bit ABI we didn't used to have a `long double'.
484 @@ -14,7 +14,7 @@
485 to the double functions. */
486 # define __LONG_DOUBLE_MATH_OPTIONAL 1
487 # ifndef __LONG_DOUBLE_128__
488 -# define __NO_LONG_DOUBLE_MATH 1
489 +# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
490 # endif
491 # endif
492 #endif
493 --- uClibc-0.9.29~/libc/sysdeps/linux/x86_64/bits/mathdef.h 2006-08-23 21:27:42.000000000 +0200
494 +++ uClibc-0.9.29/libc/sysdeps/linux/x86_64/bits/mathdef.h 2008-09-14 15:37:13.000000000 +0200
495 @@ -46,7 +46,3 @@
496 # define FP_ILOGBNAN (-2147483647 - 1)
497
498 #endif /* ISO C99 */
499 -
500 -#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
501 -# define __NO_LONG_DOUBLE_MATH 1
502 -#endif
503 --- uClibc-0.9.29/test/math/Makefile~ 2006-07-05 12:23:12.000000000 +0200
504 +++ uClibc-0.9.29/test/math/Makefile 2008-09-14 16:01:47.000000000 +0200
505 @@ -1,10 +1,10 @@
506 # uClibc math tests
507 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
508
509 -TESTS := basic-test rint tst-definitions test-fpucw
510 -# test-double test-idouble
511 -# test-float test-ifloat
512 -# test-ldouble test-ildouble
513 +TESTS := basic-test rint tst-definitions test-fpucw test-float test-ifloat test-double test-idouble
514 +ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
515 +TESTS += test-ldouble test-ildouble
516 +endif
517
518 include ../Test.mak
519
520 @@ -15,7 +15,7 @@
521 ifeq ($(TARGET_ARCH),sh)
522 CFLAGS_basic-test := -mieee
523 endif
524 -EXTRA_CFLAGS := -DNO_LONG_DOUBLE -fno-builtin
525 +EXTRA_CFLAGS := -fno-builtin
526 EXTRA_LDFLAGS := -lm
527
528 PERL := /usr/bin/perl
529 --- uClibc-0.9.29/libm/nan.c~ 2002-05-09 10:15:21.000000000 +0200
530 +++ uClibc-0.9.29/libm/nan.c 2008-09-14 16:17:04.000000000 +0200
531 @@ -35,7 +35,7 @@
532 return NAN;
533 }
534
535 -#if 0
536 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
537 long double nanl (const char *tagp)
538 {
539 if (tagp[0] != '\0') {
540 --- uClibc-0.9.29/libm/fpmacros.c~ 2006-01-26 23:19:01.000000000 +0100
541 +++ uClibc-0.9.29/libm/fpmacros.c 2008-09-14 16:27:32.000000000 +0200
542 @@ -111,6 +111,14 @@
543 }
544 libm_hidden_def(__fpclassify)
545
546 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
547 +libm_hidden_proto(__fpclassifyl)
548 +int __fpclassifyl ( long double arg )
549 +{
550 + return (long double) __fpclassify( (double)arg );
551 +}
552 +libm_hidden_def(__fpclassifyl)
553 +#endif
554
555 /***********************************************************************
556 int __isnormalf(float x) returns nonzero if and only if x is a
557 @@ -174,6 +181,13 @@
558 strong_alias(__finite,finite)
559 #endif
560
561 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
562 +int __finitel ( long double x )
563 +{
564 + return ( __fpclassifyl ( x ) >= FP_ZERO );
565 +}
566 +strong_alias (__finitel, finitel)
567 +#endif
568
569 /***********************************************************************
570 int __signbitf(float x) returns nonzero if and only if the sign
571 @@ -222,6 +236,15 @@
572 libm_hidden_def(__signbit)
573
574
575 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
576 +libm_hidden_proto(__signbitl)
577 +int __signbitl ( long double arg )
578 +{
579 + return (long double) __signbit( (double)arg );
580 +}
581 +libm_hidden_def(__signbitl)
582 +#endif
583 +
584 /***********************************************************************
585 * int __isinff(float x) returns -1 if value represents negative
586 * infinity, 1 if value represents positive infinity,
587 @@ -249,10 +272,10 @@
588 }
589 strong_alias(__isinf,isinf)
590
591 -#if 0
592 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
593 int __isinfl ( long double x )
594 {
595 - int class = __fpclassify(x);
596 + int class = __fpclassifyl(x);
597 if ( class == FP_INFINITE ) {
598 return ( (__signbit(x)) ? -1 : 1);
599 }
600 @@ -292,12 +315,14 @@
601 libm_hidden_def(__isnan)
602 strong_alias(__isnan,isnan)
603
604 -#if 0
605 +#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
606 +libm_hidden_proto(__isnanl)
607 int __isnanl ( long double x )
608 {
609 - int class = __fpclassify(x);
610 + int class = __fpclassifyl(x);
611 return ( class == FP_NAN );
612 }
613 +libm_hidden_def(__isnanl)
614 strong_alias(__isnanl,isnanl)
615 #endif
616
617 --- uClibc-0.9.29/libm/Makefile.in~ 2008-09-14 17:06:57.000000000 +0200
618 +++ uClibc-0.9.29/libm/Makefile.in 2008-09-14 17:15:20.000000000 +0200
619 @@ -55,6 +55,7 @@
620 endif
621
622 FL_MSRC := float_wrappers.c
623 +LD_MSRC := ldouble_wrappers.c
624
625 ifeq ($(DO_C99_MATH),y)
626 libm_CSRC := \
627 @@ -83,6 +84,14 @@
628 nextafterf.o powf.o remainderf.o remquof.o rintf.o roundf.o \
629 scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \
630 tgammaf.o truncf.o cargf.o llrintf.o gammaf.o nexttowardf.o
631 +LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cbrtl.o \
632 + ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \
633 + expm1l.o fabsl.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o \
634 + frexpl.o gammal.o hypotl.o ilogbl.o ldexpl.o lgammal.o llrintl.o llroundl.o \
635 + log10l.o log1pl.o log2l.o logbl.o logl.o lrintl.o lroundl.o modfl.o nearbyintl.o \
636 + nextafterl.o nexttowardl.o powl.o remainderl.o remquol.o rintl.o roundl.o \
637 + scalblnl.o scalbnl.o sinhl.o sinl.o sqrtl.o tanhl.o tanl.o \
638 + tgammal.o truncl.o
639 else
640 # This list of math functions was taken from POSIX/IEEE 1003.1b-1993
641 libm_CSRC := \
642 @@ -122,9 +131,11 @@
643
644 # remove generic objects built from multi-sources, if arch specific version is present
645 FL_MOBJ := $(filter-out $(notdir $(libm_ARCH_OBJS)),$(FL_MOBJ))
646 +LD_MOBJ := $(filter-out $(notdir $(libm_ARCH_OBJS)),$(LD_MOBJ))
647
648 # we also try to remove % if s_% is in arch specific subdir
649 FL_MOBJ := $(filter-out $(patsubst s_%.o,%.o,$(notdir $(libm_ARCH_OBJS))),$(FL_MOBJ))
650 +LD_MOBJ := $(filter-out $(patsubst s_%.o,%.o,$(notdir $(libm_ARCH_OBJS))),$(LD_MOBJ))
651 endif
652 endif
653 endif
654 @@ -132,14 +143,22 @@
655 libm_SRC := $(patsubst %.c,$(libm_DIR)/%.c,$(libm_CSRC))
656 libm_OBJ := $(patsubst $(libm_DIR)/%.c,$(libm_OUT)/%.o,$(libm_SRC))
657
658 +ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
659 +libm_MSRC2 := $(libm_DIR)/$(LD_MSRC)
660 +libm_MOBJ2 := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ))
661 +endif
662 libm_MSRC := $(libm_DIR)/$(FL_MSRC)
663 libm_MOBJ := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
664
665 +
666 ifneq ($(DOMULTI),n)
667 CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
668 +ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
669 +CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ2))))
670 +endif
671 endif
672
673 -libm_OBJS := $(libm_OBJ) $(libm_MOBJ)
674 +libm_OBJS := $(libm_OBJ) $(libm_MOBJ) $(libm_MOBJ2)
675
676 ifeq ($(DOPIC),y)
677 libm-a-y += $(libm_OBJS:.o=.os)
678 @@ -169,7 +188,7 @@
679 $(do_strip)
680 $(do_ar)
681
682 -$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC) $(libm_ARCH_SRC)
683 +$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC) $(libm_MSRC2) $(libm_ARCH_SRC)
684 $(Q)$(RM) $@
685 $(compile-m)
686 $(do_t_strip)
687 @@ -183,8 +202,14 @@
688 $(libm_MOBJ): $(libm_MSRC)
689 $(compile.m)
690
691 +$(libm_MOBJ2): $(libm_MSRC2)
692 + $(compile.m)
693 +
694 $(libm_MOBJ:.o=.os): $(libm_MSRC)
695 $(compile.m)
696
697 +$(libm_MOBJ2:.o=.os): $(libm_MSRC2)
698 + $(compile.m)
699 +
700 libm_clean:
701 $(RM) $(libm_OUT)/{,*/,*/*/}*.{o,os,oS,a}