From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: [PATCH] better long double check
Date: Sun, 17 Sep 2017 17:38:55 +0200 [thread overview]
Message-ID: <20170917153855.GE15263@port70.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
s390x gcc default long double (64bit) does not
match the expected one in musl (128bit) but this
was not caught by the current configure check.
[-- Attachment #2: 0001-better-configure-check-for-long-double-support.patch --]
[-- Type: text/x-diff, Size: 1007 bytes --]
From 94666565318b7ed966d77811e5d880f69bdecccf Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 17 Sep 2017 15:35:55 +0000
Subject: [PATCH] better configure check for long double support
---
configure | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 02b736ce..501a7219 100755
--- a/configure
+++ b/configure
@@ -706,9 +706,8 @@ esac
#
printf "checking whether compiler's long double definition matches float.h... "
echo '#include <float.h>' > "$tmpc"
-echo '#if LDBL_MANT_DIG == 53' >> "$tmpc"
-echo 'typedef char ldcheck[9-(int)sizeof(long double)];' >> "$tmpc"
-echo '#endif' >> "$tmpc"
+echo '#define C(m,s) (m==LDBL_MANT_DIG && s==sizeof(long double))' >> "$tmpc"
+echo 'typedef char ldcheck[(C(53,8)||C(64,12)||C(64,16)||C(113,16))*2-1];' >> "$tmpc"
if $CC $CFLAGS_C99FSE \
-I$srcdir/arch/$ARCH -I$srcdir/arch/generic -I$srcdir/include \
$CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
--
2.14.1
reply other threads:[~2017-09-17 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170917153855.GE15263@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).