public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Gabriel F. T. Gomes" <gabriel@inconstante.eti.br>
To: <libc-alpha@sourceware.org>
Subject: [PATCH 3/3] powerpc64le: Disable compiler support for float128 when reusing ldbl-128
Date: Thu, 07 Sep 2017 10:44:00 -0000	[thread overview]
Message-ID: <20170907104352.7748-4-gabriel@inconstante.eti.br> (raw)
In-Reply-To: <20170907104352.7748-1-gabriel@inconstante.eti.br>

Some files under sysdeps/ieee754/ldbl-128ibm are able to reuse the
implementation in sysdeps/ieee754/ldbl-128 by defining _Float128 to long
double.  This relies on compiler support for _Float128 being disabled.

On powerpc, such support is currently disabled by default, however, it
will get enabled by default [1], requiring that this Makefile actively
disable compiler support for float128 for the required files.

[1] https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01028.html

Tested for powerpc64le with patched [1] and unpatched gcc.

	* sysdeps/powerpc/powerpc64le/Makefile (CFLAGS-e_expl.c)
	(CFLAGS-e_j0l.c, CFLAGS-e_j1l.c, CFLAGS-e_lgammal_r.c)
	(CFLAGS-s_cbrtl.c): New variables.
---
 sysdeps/powerpc/powerpc64le/Makefile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sysdeps/powerpc/powerpc64le/Makefile b/sysdeps/powerpc/powerpc64le/Makefile
index 3fd9d9a715..a1d37135e5 100644
--- a/sysdeps/powerpc/powerpc64le/Makefile
+++ b/sysdeps/powerpc/powerpc64le/Makefile
@@ -20,6 +20,19 @@ CFLAGS-test-math-issignaling.cc += -mfloat128
 CFLAGS-test-math-iszero.cc += -mfloat128
 $(objpfx)test-float128% $(objpfx)test-ifloat128% $(objpfx)test-math-iszero: \
   gnulib-tests += $(f128-loader-link)
+
+# Some files under sysdeps/ieee754/ldbl-128ibm are able to reuse the
+# implementation in sysdeps/ieee754/ldbl-128 by defining _Float128 to
+# long double.  This relies on compiler support for _Float128 being
+# disabled.  On powerpc, such support used to be disabled by default,
+# however, it will get enabled by default [1], requiring that this
+# Makefile actively disable it for the following files.
+# [1] https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01028.html
+CFLAGS-e_expl.c += -mno-float128
+CFLAGS-e_j0l.c += -mno-float128
+CFLAGS-e_j1l.c += -mno-float128
+CFLAGS-e_lgammal_r.c += -mno-float128
+CFLAGS-s_cbrtl.c += -mno-float128
 endif
 
 # Append flags to string <-> _Float128 routines.
-- 
2.13.5

  parent reply	other threads:[~2017-09-07 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 10:44 [PATCH 0/3] Fixes for -mfloat128 being enabled by default on gcc for power Gabriel F. T. Gomes
2017-09-07 10:44 ` [PATCH 1/3] powerpc: Add -mfloat128 to tst-strtod-nan-locale testcase Gabriel F. T. Gomes
2017-09-07 10:44 ` Gabriel F. T. Gomes [this message]
2017-09-07 14:45   ` [PATCH 3/3] powerpc64le: Disable compiler support for float128 when reusing ldbl-128 Joseph Myers
2017-09-07 10:44 ` [PATCH 2/3] powerpc: Add redirection for finitef128, isinf128, and isnanf128 Gabriel F. T. Gomes
2017-09-07 14:39   ` Joseph Myers
2017-09-08 15:25     ` Gabriel F. T. Gomes
2017-09-08 16:24       ` Joseph Myers
2017-09-26 22:05 ` [PATCH 0/3] Fixes for -mfloat128 being enabled by default on gcc for power Joseph Myers

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=20170907104352.7748-4-gabriel@inconstante.eti.br \
    --to=gabriel@inconstante.eti.br \
    --cc=libc-alpha@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).