From: Florian Weimer <fweimer@redhat.com>
To: DJ Delorie via Libc-alpha <libc-alpha@sourceware.org>
Cc: DJ Delorie <dj@redhat.com>,
Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>,
Paul E. Murphy <murphyp@linux.vnet.ibm.com>
Subject: Re: ppc64le: gcc 12 vs -mabi=ibmlongdouble
Date: Mon, 24 Jan 2022 16:38:31 +0100 [thread overview]
Message-ID: <87bl012lfs.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <xnilucwa6k.fsf@greed.delorie.com> (DJ Delorie via Libc-alpha's message of "Sat, 22 Jan 2022 01:34:27 -0500")
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
* DJ Delorie via Libc-alpha:
> I've been working on updating glibc for Fedora Rawhide, and have
> stumbled upon this issue (after working around the -Wuse-after-free
> issues with a cflags hack)... A few of the math tests explicitly add
> -mlong-double-64 but configure adds -mabi=ibmlongdouble
>
> I would guess that we need a "CFLAGS -= -mabi=ibmlongdouble" in all
> the places we add -mlong-double-64 but I don't see an easy way of
> doing that, nor am I sure that's a valid solution. Alternately, gcc
> could be changed to accept the conflicting flags in a meaningful way,
> if there is one. Is there an -mabi= that undoes the
> -mabi=ibmlongdouble that we can just add to the -mlong-double-64 flag
> lines?
> cc1: error: '-mabi=ibmlongdouble' requires '-mlong-double-128'
I was able to reproduce with a GCC 12 build configured using
--with-long-double-format=ieee.
I tried the attached patch to remove the unwanted -mabi=ibmlongdouble,
but it does not work: it removes CFLAGS-*.c processing as a side effect.
Any suggestions how we can fix this properly?
Thanks,
Florian
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-powerpc64le-Filter-out-mabi-longdouble-in-64-bit-dou.patch --]
[-- Type: text/x-patch, Size: 2728 bytes --]
From b865fb6228bea8e956e6413002e7641f10d6e5e6 Mon Sep 17 00:00:00 2001
Message-Id: <b865fb6228bea8e956e6413002e7641f10d6e5e6.1643038207.git.fweimer@redhat.com>
From: Florian Weimer <fweimer@redhat.com>
Date: Mon, 24 Jan 2022 11:19:53 +0100
Subject: [PATCH] powerpc64le: Filter out -mabi=*longdouble in 64-bit double
tests
To: libc-alpha@sourceware.org
GCC 12 configured with --with-long-double-format=ieee does not
accept -mabi=ibmlongdouble in combination with -mlong-double-64,
but this was how glibc tries to build these tests before this change.
sysdeps/unix/sysv/linux/configure adds -mabi=ibmlongdouble to CFLAGS,
so this variable has to be filtered as well.
---
sysdeps/powerpc/powerpc64/le/Makefile | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile
index 7c036b45fc..2aaed2b75a 100644
--- a/sysdeps/powerpc/powerpc64/le/Makefile
+++ b/sysdeps/powerpc/powerpc64/le/Makefile
@@ -95,8 +95,12 @@ $(foreach suf,$(all-object-suffixes),\
$(objpfx)test-narrow-macros-ldbl-64$(suf) \
$(objpfx)test-nldbl-redirect$(suf) \
$(objpfx)test-redirection-ldbl-64$(suf) \
- ): sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS))
-
+ ): CFLAGS := $(filter-out -mabi=%longdouble,$(CFLAGS))
+$(foreach suf,$(all-object-suffixes),\
+ $(objpfx)test-narrow-macros-ldbl-64$(suf) \
+ $(objpfx)test-nldbl-redirect$(suf) \
+ $(objpfx)test-redirection-ldbl-64$(suf) \
+ ): sysdep-CFLAGS := $(filter-out -mabi=%longdouble,$(sysdep-CFLAGS))
endif
# Newer GCC (>7) doesn't like -mabi=* and -mlong-double-64
@@ -104,14 +108,21 @@ ifeq ($(subdir),misc)
$(foreach suf,$(all-object-suffixes),\
$(objpfx)tst-nldbl-warn$(suf) \
$(objpfx)tst-nldbl-error$(suf) \
- ): sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS))
+ ): CFLAGS := $(filter-out -mabi=%longdouble,$(CFLAGS))
+$(foreach suf,$(all-object-suffixes),\
+ $(objpfx)tst-nldbl-warn$(suf) \
+ $(objpfx)tst-nldbl-error$(suf) \
+ ): sysdep-CFLAGS := $(filter-out -mabi=%longdouble,$(sysdep-CFLAGS))
endif
# Newer GCC (>7) doesn't like -mabi=* and -mlong-double-64
ifeq ($(subdir),argp)
$(foreach suf,$(all-object-suffixes),\
$(objpfx)tst-nldbl-argp$(suf) \
- ): sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS))
+ ): CFLAGS := $(filter-out -mabi=%longdouble,$(CFLAGS))
+$(foreach suf,$(all-object-suffixes),\
+ $(objpfx)tst-nldbl-argp$(suf) \
+ ): sysdep-CFLAGS := $(filter-out -mabi=%longdouble,$(sysdep-CFLAGS))
endif
--
2.34.1
next prev parent reply other threads:[~2022-01-24 15:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 6:34 DJ Delorie
2022-01-24 15:38 ` Florian Weimer [this message]
2022-01-24 16:44 ` Bill Schmidt
2022-01-24 18:32 ` Florian Weimer
2022-01-24 17:37 ` Adhemerval Zanella
2022-01-24 17:46 ` Paul E Murphy
2022-01-24 17:56 ` Florian Weimer
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=87bl012lfs.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=dj@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=murphyp@linux.vnet.ibm.com \
--cc=tuliom@linux.vnet.ibm.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.
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).