public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/fw/builtin-syscalls-4] ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128
@ 2019-12-31 10:49 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2019-12-31 10:49 UTC (permalink / raw)
  To: glibc-cvs

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

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9ae967bf45aaa190687ae219a589e0c542669a51

commit 9ae967bf45aaa190687ae219a589e0c542669a51
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.
    
    Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>

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

diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
index 8f6a090..7efbd00 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,12 @@ 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))
+
+# Explicitly add -mabi=ibm-long-double to required files.
 $(call obj-suf-foreach,$(ldbl-ibm128-files)): \
   sysdep-CFLAGS += -mabi=ibmlongdouble


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-31 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-31 10:49 [glibc/fw/builtin-syscalls-4] ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128 Florian Weimer

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).