From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53982 invoked by alias); 15 Oct 2019 19:04:21 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 53960 invoked by uid 10126); 15 Oct 2019 19:04:21 -0000 Date: Tue, 15 Oct 2019 19:04:00 -0000 Message-ID: <20191015190421.53959.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Gabriel F.T.Gomes To: glibc-cvs@sourceware.org Subject: [glibc/gabriel/powerpc-ieee128-printscan] ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128 X-Act-Checkin: glibc X-Git-Author: Gabriel F. T. Gomes X-Git-Refname: refs/heads/gabriel/powerpc-ieee128-printscan X-Git-Oldrev: a4b0f5cf0f30f3e71d2f4dc3428fb65673d432b5 X-Git-Newrev: 1383090d1047e6d4c108e8478e94511307de77cd X-SW-Source: 2019-q4/txt/msg00067.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1383090d1047e6d4c108e8478e94511307de77cd commit 1383090d1047e6d4c108e8478e94511307de77cd Author: Gabriel F. T. Gomes 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