mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: vfprintf.c:(.text+0xc6c): undefined reference to `__signbitl'
Date: Wed, 10 Apr 2013 00:38:06 +0200	[thread overview]
Message-ID: <20130409223806.GZ30576@port70.net> (raw)
In-Reply-To: <7a37c76ee25fa3c3de54644f67e86a2f.squirrel@alpha.tmit.bme.hu>

* meres5@alpha.tmit.bme.hu <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


  reply	other threads:[~2013-04-09 22:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 19:39 meres5
2013-04-08 20:05 ` Szabolcs Nagy
2013-04-08 20:41   ` meres5
2013-04-08 21:26     ` Szabolcs Nagy
2013-04-09 20:15       ` meres5
2013-04-09 22:38         ` Szabolcs Nagy [this message]
2013-04-10  1:18         ` Rich Felker
2013-04-10 10:55           ` meres5
2013-04-10  8:24         ` John Spencer
2013-04-10  9:47           ` Szabolcs Nagy
2013-04-10 14:14             ` Isaac Dunham
2013-04-10 14:31               ` Rich Felker
2013-08-11 21:30                 ` Justin Cormack
2013-04-10  5:14     ` Rob Landley
2013-04-10  6:21       ` Rich Felker
2013-04-08 20:09 ` Rich Felker
2013-04-08 20:47   ` meres5

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130409223806.GZ30576@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).