From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3083 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: vfprintf.c:(.text+0xc6c): undefined reference to `__signbitl' Date: Tue, 9 Apr 2013 21:18:25 -0400 Message-ID: <20130410011824.GA315@brightrain.aerifal.cx> References: <3be4bde4515370b19e34c578d4ebfe3e.squirrel@alpha.tmit.bme.hu> <20130408200535.GW30576@port70.net> <20130408212602.GX30576@port70.net> <7a37c76ee25fa3c3de54644f67e86a2f.squirrel@alpha.tmit.bme.hu> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1365556718 18395 80.91.229.3 (10 Apr 2013 01:18:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Apr 2013 01:18:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3087-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 10 03:18:42 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UPjgM-0007gS-UD for gllmg-musl@plane.gmane.org; Wed, 10 Apr 2013 03:18:39 +0200 Original-Received: (qmail 30442 invoked by uid 550); 10 Apr 2013 01:18:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30434 invoked from network); 10 Apr 2013 01:18:38 -0000 Content-Disposition: inline In-Reply-To: <7a37c76ee25fa3c3de54644f67e86a2f.squirrel@alpha.tmit.bme.hu> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3083 Archived-At: On Tue, Apr 09, 2013 at 10:15:40PM +0200, meres5@alpha.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