[RFC] libm replacement for Busybox

Denys Vlasenko vda.linux at googlemail.com
Tue Oct 21 12:06:28 UTC 2008


On Monday 20 October 2008 10:56:22 am Loïc Grenié wrote:
> >> > >     They are neither very fast nor very precise (the
> >> > >   trigonometric functions are awful, up to 16 bits are
> >> > >   false)
> >> >
> >> > We use trigonometry in bb? wow. where?
> >>
> >> CONFIG_FEATURE_AWK_MATH, which already has a big warning that it requires
> >> libm.
> >
> > Thanks Rob.
> >
> > I checked, only this option and dc applet seem to be the things
> > needing libm on my machine. dc has no analogous CONFIG_FEATURE_DC_MATH.
> >
> > Will it satisfy you Loïc if we will rename CONFIG_FEATURE_AWK_MATH
> > to CONFIG_FEATURE_AWK_LIBM (or ..._MATH_LIB, taking into account
> > newbie user's needs) to indicate more clearly that this option
> > will pull in libm, and add CONFIG_FEATURE_DC_LIBM too?
> >
> > Whoever doesn't want to link against libm is very likely
> > to not require these awk/dc features, so [s]he will
> > just unselect these two options.
> 
> You just can let everything as is. I just offered an add-on,
> if it does not  look like an improvement, do not change anything.

It's more like I did not fully understand your use case.
You want to be able to not bloat busybox
with standard libm (indeed, ~9k on 32bit x86).

You proposed some replacement, "small libm". I read that people
found it not precise enough (I did not test it).

I found out that there is other method to not bloat busybox -
just switch off parts which require libm.

What I do not know, and therefore ask you, is this an acceptable
solution for this use case? Is your use case require pow and exp
functions in awk and dc?
--
vda



More information about the busybox mailing list