From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10793 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl + PowerPC + GCC 5 Date: Wed, 14 Dec 2016 11:53:06 +0100 Message-ID: <20161214105306.GG16379@port70.net> References: <585118BF.6040004@adelielinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1481712805 29254 195.159.176.226 (14 Dec 2016 10:53:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2016 10:53:25 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-10806-gllmg-musl=m.gmane.org@lists.openwall.com Wed Dec 14 11:53:19 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cH7BU-0006GC-Hj for gllmg-musl@m.gmane.org; Wed, 14 Dec 2016 11:53:16 +0100 Original-Received: (qmail 22165 invoked by uid 550); 14 Dec 2016 10:53:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22147 invoked from network); 14 Dec 2016 10:53:18 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <585118BF.6040004@adelielinux.org> Xref: news.gmane.org gmane.linux.lib.musl.general:10793 Archived-At: * A. Wilcox [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.