Question regarding libm
Peter S. Mazinger
ps.m at gmx.net
Sat Oct 1 08:19:49 UTC 2005
On Fri, 30 Sep 2005, Jan-Benedict Glaw wrote:
> On Fri, 2005-09-30 11:07:05 +0200, Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:
> > On Fri, 2005-09-30 08:32:51 +0200, Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:
> > diff -Nurp src-uclibc-fresh/extra/Configs/Config.in.arch src-uclibc-hacked/extra/Configs/Config.in.arch
> > --- src-uclibc-fresh/extra/Configs/Config.in.arch 2005-06-05 18:39:50.000000000 +0200
> > +++ src-uclibc-hacked/extra/Configs/Config.in.arch 2005-09-30 10:14:36.000000000 +0200
> > @@ -40,13 +40,24 @@ config UCLIBC_HAS_FLOATS
> > help
> > This option allows you to entirely omit all floating point number
> > support from uClibc. This will cause floating point functions like
> > - strtod() to be omitted from uClibc. Other floating point functions,
> > - such as printf() and scanf() will still be included in the library,
> > + strtod() to be omitted from uClibc. Other floating point functions,
> > + such as printf() and scanf() will still be included in the library,
> > but will not contain support for floating point numbers.
> >
> > Answering N to this option can reduce the size of uClibc. Most people
> > will answer Y.
> >
> > +config TARGET_HAS_NEGATIVE_ZERO_FLOATS
> > + bool " Target CPU differs between +0 and -0"
> > + default y
> > + depends on UCLIBC_HAS_FLOATS
I would rather do in config UCLIBC_HAS_FLOATS:
select TARGET_HAS_NEGATIVE_ZERO_FLOATS if some archs (so that it is
enforced where appropiate
or at least one of
default y if some archs
default n if some archs
Peter
> > + help
> > + If your target CPU can differ +0 and -0 (IEEE floating point
> > + support works that way), then you should enable this option.
> > +
> > + Most people will answer Y, because nearly all CPUs do use IEEE
> > + floating point support.
> > +
> > config HAS_FPU
> > bool "Target CPU has a floating point unit (FPU)"
> > depends on UCLIBC_HAS_FLOATS
> > diff -Nurp src-uclibc-fresh/libc/stdio/_fpmaxtostr.c src-uclibc-hacked/libc/stdio/_fpmaxtostr.c
> > --- src-uclibc-fresh/libc/stdio/_fpmaxtostr.c 2005-07-30 22:29:22.000000000 +0200
> > +++ src-uclibc-hacked/libc/stdio/_fpmaxtostr.c 2005-09-30 10:20:42.000000000 +0200
> > @@ -275,7 +275,7 @@ ssize_t _fpmaxtostr(FILE * fp, __fpmax_t
> > }
> >
> > if (x == 0) { /* Handle 0 now to avoid false positive. */
> > -#if 1
> > +#ifdef __TARGET_HAS_NEGATIVE_ZERO_FLOATS__
> > if (zeroisnegative(x)) { /* Handle 'signed' zero. */
> > *sign_str = '-';
> > }
>
> Please comment on the patch (I've only left the interesting part above
> and snipped all whitespace differences.)
>
> Thanks, JBG
>
>
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the uClibc
mailing list