Date: Wed, 10 Apr 2013 00:38:06 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Subject: Re: vfprintf.c:(.text+0xc6c): undefined reference to `__signbitl' * meres5@...ha.tmit.bme.hu <meres5@...ha.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@...ha:/home/meres5/tmp# ld crt1.o stdhello.o -L. -lc -lgcc -o stdhello > root@...ha:/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
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.