Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 Apr 2013 21:18:25 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: vfprintf.c:(.text+0xc6c): undefined reference to
 `__signbitl'

On Tue, Apr 09, 2013 at 10:15:40PM +0200, meres5@...ha.tmit.bme.hu wrote:
> Hi!
> 
> I have good, and bad news concerning this issue!
> 
> >
> > this is bad, it is 'double-double' long double format
> > which means broken long double arithmetics
> >
> 
> Its the out of the box debian, installed on our
> old IBM eServer pSeries 615 (7029 6C3).
> Surprisingly a native PPC host/target/and everything. . .
> 
> > if you want to play with static linking then it's better
> > not to use soft-float long double, that ruins it a lot
> 
> Well, we won't made any REAL (floating point) thing on this
> old machine. Performance is not an issue here.
> 
> > (every trivial program will get an entire floating point
> > emulation library linked in from libgcc pulled in by printf
> > so the students will get the impression that static linking
> > always gives bloated binaries..)
> 
> The picture is not that bad.
> Finally I managed to unleash the two functions in question
> in ~/src/musl-0.9.9/src/math: __signbitl and __fpclassifyl with some
> #if bombing and voilla!

Just providing those functions does not mean "it worked". Important
floating point code in musl, including printf, scanf, and strtod,
assumes that long double arithmetic conforms to IEEE requirements. IBM
double-double format does not, and it will result in seriously broken
behavior, at least incorrect processing of floating point values, but
possibly even including infinite loops or crashing. You should not try
to hack in support for double-double unless you really know what
you're doing, and even then it's a bad idea.

If on the other hand your toolchain is using IEEE quad precision
128-bit long-double, then these functions should work fine, and your
only problem will be insufficient precision in the long-double math
library and a few other broken functions.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.