[uClibc]Problem when I try to print fp numbers with fprintf

Jon Loeliger jdl at vivato.net
Fri May 30 17:22:38 UTC 2003


> 
> On Thu May 29, 2003 at 04:15:00PM -0700, Jon Loeliger wrote:
> > > >
> > > > How do I use the old printf?
> > >
> > > In your uClibc/.config file set the USE_OLD_VFPRINTF option.
> > > This is most easily done by using 'make menuconfig'
> >
> > Hmmm... That just seems too, how-do-you-say-it?, easy.  :-)
> 
> :-)

So I gave this a shot.  Well, almost a fair shot.  I compiled up
new uclibc libs with the old vfprintf enabled and statically cross
compiled my test program rather than building the entire embedded
environment and dynamically linking it on the platform.

This was even worse behavior.  I was unable to get even simple
string output at all.  Same segmentation fault.  Fooey.

> >
> > Oh, yeah, there are a bunch of them:
> >     lwc1, mtc1, sub.d, cvt.d, c.eq.d, mul.d
> >
> > But that's OK, right, because we have the Algorithmics FPU
> > emulation code in the kernel to support all of those...
> 
> Hmmm.  Ok.  And this same code works flawlessly on
> other architectures?  And does nothing silly like
>     printf("The answer is %f\n", value/0.0);
> ?

Right.  It appears to me that the FPU emulation is working.

And I'm not the only one to see this issue either.  Over in:

    http://www.uclibc.org/lists/uclibc/2003-April/008305.html

Steve Seeger wrote:

    Hey guys. I built my toolchain using the toolchain script and the
latest
    0.9.19 release (not the snapshot.) I notice that whenever I use
printf with
    a float, it segfaults. The processor is a MIPS R4k core, and there
is Kernel
    FPU emulation. Interestingly enough, cout with floats seems to work.

Which is frightfully similar to what I had happen.

jdl



More information about the uClibc mailing list