mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: musl + PowerPC + GCC 5
Date: Wed, 14 Dec 2016 11:53:06 +0100	[thread overview]
Message-ID: <20161214105306.GG16379@port70.net> (raw)
In-Reply-To: <585118BF.6040004@adelielinux.org>

* A. Wilcox <awilfox@adelielinux.org> [2016-12-14 04:02:39 -0600]:
> Compiler output is:
> 
> powerpc-foxkit-linux-musl-gcc   -g -O2 -mlong-double-64 -ggdb
> - -fno-omit-frame-pointer -pipe -O2  -g -O2 -mlong-double-64 -ggdb
> - -fno-omit-frame-pointer -pipe -DIN_GCC    -W -Wall -Wno-narrowing
> - -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> - -Wold-style-definition  -isystem ./include   -fPIC -mlong-double-128
> - -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc
> - -fno-stack-protector   -fPIC -mlong-double-128 -mno-minimal-toc -I.
> - -I. -I../.././gcc
> - -I/usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc
> - -I/usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/.
> - -I/usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/../gcc
> - -I/usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/../include
> - -I/usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/../libdecnumber/
> dpd
> - -I/usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/../libdecnumber
> - -DHAVE_CC_TLS
>  -o _sd_to_tf.o -MT _sd_to_tf.o -MD -MP -MF _sd_to_tf.dep
> - -DFINE_GRAINED_LIBRARIES -DL_sd_to_tf -DWIDTH=32 -c
> /usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/dfp-bit.c
> In file included from
> /usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/dfp-bit.c:40:0:
> /usr/src/sys-devel/gcc-5.4.0-r2/work/gcc-5.4.0/libgcc/dfp-bit.h:288:2:
> error: #error "unknown long double size, cannot define BFP_FMT"
>  #error "unknown long double size, cannot define BFP_FMT"
>   ^
> make[2]: *** [Makefile:684: _sd_to_tf.o] Error 1
> 

this happens when 128bit float to decimal float conversion code
is compiled: then libc sprintf with BFP_FMT is used to do the
conversion and for that libc LDBL_MANT_DIG is checked and musl
has no support for this.

i think the simplest fix is to config with --disable-decimal-float

the second simplest fix is to patch the ifdef logic (e.g. define
BFP_FMT "%Le") but then the conversion code would be broken at
runtime: the code is compiled with -mlong-double-128 and musl
expects 64 bit long double. (most likely the bootstrap process
does not depend on this to work so this is a workaround hack
that only breaks 128bit float to decimal conversion.)

the correct way on musl is to build libgcc without -mlong-double-128
and without all the 128bit (TF mode) float stuff, but this may need
some configure and build system changes as i don't immediately see
an option to turn tf mode things off.


  reply	other threads:[~2016-12-14 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 10:02 A. Wilcox
2016-12-14 10:53 ` Szabolcs Nagy [this message]
2016-12-15  4:11   ` A. Wilcox
2016-12-15 10:59     ` Szabolcs Nagy
2016-12-15 18:58       ` Rich Felker

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=20161214105306.GG16379@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).