public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Gabriel F.T.Gomes <gftg@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/gabriel/powerpc-ieee128-printscan] ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128
Date: Tue, 15 Oct 2019 19:04:00 -0000	[thread overview]
Message-ID: <20191015190421.53959.qmail@sourceware.org> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2800 bytes --]

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1383090d1047e6d4c108e8478e94511307de77cd

commit 1383090d1047e6d4c108e8478e94511307de77cd
Author: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Date:   Tue Sep 10 08:05:03 2019 -0500

    ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128
    
    Some compiler versions, e.g. GCC 7, complain when -mlong-double-128 is
    used together with -mabi=ibmlongdouble or -mabi=ieeelongdouble,
    producing the following error message:
    
      cc1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’
    
    This patch removes -mlong-double-128 from the compilation lines that
    explicitly request -mabi=*longdouble.
    
    Tested for powerpc64le.

Diff:
---
 sysdeps/ieee754/ldbl-128ibm-compat/Makefile | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
index 1489680..3a0060b 100644
--- a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
@@ -258,6 +258,13 @@ ldbl-extra-routines += err \
 CFLAGS-ieee128-qefgcvt.c += -mabi=ieeelongdouble -Wno-psabi -mno-gnu-attribute
 CFLAGS-ieee128-qefgcvt_r.c += -mabi=ieeelongdouble -Wno-psabi -mno-gnu-attribute
 
+# Remove -mlong-double-128 because it does not work correctly with
+# -mabi=ibmlongdoule in some GCC versions, e.g. GCC 7.
+$(foreach o,$(all-object-suffixes),$(objpfx)ieee128-qefgcvt$(o)): \
+  sysdep-CFLAGS := $(filter-out -mlong-double-128, $(sysdep-CFLAGS))
+$(foreach o,$(all-object-suffixes),$(objpfx)ieee128-qefgcvt_r$(o)): \
+  sysdep-CFLAGS := $(filter-out -mlong-double-128, $(sysdep-CFLAGS))
+
 tests-internal += tst-ibm128-warn tst-ieee128-warn
 tests-internal += tst-ibm128-error tst-ieee128-error
 tests-internal += tst-ibm128-efgcvt tst-ieee128-efgcvt
@@ -334,5 +341,17 @@ ldbl-ibm128-files := $(objpfx)test-%-ibm128^ \
 		     $(foreach r,$(ldbl-extra-routines),$(objpfx)$(r)^) \
 		     $(foreach r,$(ldbl-extra-routines),$(objpfx)$(r)-internal^)
 obj-suf-foreach = $(foreach suf,$(all-object-suffixes),$(subst ^,$(suf),$(1)))
+
+# Remove -mlong-double-128 because it does not work correctly with
+# -mabi=ibmlongdoule in some GCC versions, e.g. GCC 7.
+$(call obj-suf-foreach,$(ldbl-ibm128-files)): \
+  sysdep-CFLAGS := $(filter-out -mlong-double-128, $(sysdep-CFLAGS))
+
+# Removing -mabi=ieeelongdouble is not required, but helps when
+# analyzing the flags that were passed to the compiler.
+$(call obj-suf-foreach,$(ldbl-ibm128-files)): \
+  sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble, $(sysdep-CFLAGS))
+
+# Explicitly add -mabi=ibm-long-double to required files.
 $(call obj-suf-foreach,$(ldbl-ibm128-files)): \
   sysdep-CFLAGS += -mabi=ibmlongdouble


             reply	other threads:[~2019-10-15 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 19:04 Gabriel F.T.Gomes [this message]
2019-10-25 15:35 Gabriel F.T.Gomes
2019-12-03 17:04 Gabriel F.T.Gomes
2019-12-13 22:28 Gabriel F.T.Gomes

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=20191015190421.53959.qmail@sourceware.org \
    --to=gftg@sourceware.org \
    --cc=glibc-cvs@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).