From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3082 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: vfprintf.c:(.text+0xc6c): undefined reference to `__signbitl' Date: Wed, 10 Apr 2013 00:38:06 +0200 Message-ID: <20130409223806.GZ30576@port70.net> 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 1365547097 31195 80.91.229.3 (9 Apr 2013 22:38:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Apr 2013 22:38:17 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3086-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 10 00:38:20 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 1UPhBE-0008OH-0Z for gllmg-musl@plane.gmane.org; Wed, 10 Apr 2013 00:38:20 +0200 Original-Received: (qmail 25711 invoked by uid 550); 9 Apr 2013 22:38:19 -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 25700 invoked from network); 9 Apr 2013 22:38:18 -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:3082 Archived-At: * meres5@alpha.tmit.bme.hu [2013-04-09 22:15:40 +0200]: > > 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. . . yes, double-double is also called the 128bit ibm format and it used to be defined this way in the powerpc abi (recently gcc changed to the 128bit ieee format if i understood the libgcc code correctly) > > (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! > > root@alpha:/home/meres5/tmp# ld crt1.o stdhello.o -L. -lc -lgcc -o stdhello > root@alpha:/home/meres5/tmp# chroot . ./stdhello > Hello > > worked and its 'only' 25k. nice > > linux did not drop it, but for some reason the glibc and > > binutils maintainers thought that dynamic linking is always > > better so it's enough to support that > Yep. > Finally I got it - thanks for the MUSL team! > > And the good news: > - worked > - I have checked several other libc for embedded, supporting static ld > and only musl prevails with some really little hack in source. > Others claimed broken tool-chain (by being surprised not in a > cross compling toolchain) i'm glad it worked > Bad news: > - Someone had better to have a look at those conditionals in > __signbitl.c and __fpclassifyl.c adding support for a new long double representation is non-trivial but you are right that code without floating-point should work even on systems with weird long double i will look into that later meanwhile on powerpc gcc has -mlong-double-64 option to compile with 64bit long doubles, maybe the musl config script should check for that and add it when the long double format is unsupported