public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble
@ 2023-05-12 10:22 MAHESH BODAPATI
  2023-05-15 13:09 ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: MAHESH BODAPATI @ 2023-05-12 10:22 UTC (permalink / raw)
  To: libc-alpha; +Cc: rajis, Mahesh Bodapati

From: Mahesh Bodapati <mahesh.bodapati@ibm.com>

Removed -mabi=ieeelongdouble on failing tests. It resolves the error.
error: ‘-mabi=ieeelongdouble’ requires ‘-mlong-double-128’
---
 sysdeps/powerpc/powerpc64/le/Makefile | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile
index 53644d50cc..5214eb40ad 100644
--- a/sysdeps/powerpc/powerpc64/le/Makefile
+++ b/sysdeps/powerpc/powerpc64/le/Makefile
@@ -158,6 +158,23 @@ ifeq ($(subdir),stdio-common)
 CFLAGS-printf_fp.c = $(type-float128-CFLAGS)
 CFLAGS-printf_fphex.c = $(type-float128-CFLAGS)
 CFLAGS-printf_size.c = $(type-float128-CFLAGS)
+#Older GCC (<10) doesn't like -mabi=ieeelongdouble and -mlong-double-64.
+$(foreach suf,$(all-object-suffixes),\
+         $(objpfx)tst-nldbl-scanf-binary-c11$(suf) \
+         $(objpfx)tst-nldbl-scanf-binary-c2x$(suf) \
+         $(objpfx)tst-nldbl-scanf-binary-gnu11$(suf) \
+         $(objpfx)tst-nldbl-scanf-binary-gnu89$(suf) \
+         ): sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS))
+endif
+
+#Older GCC (<10) doesn't like -mabi=ieeelongdouble and -mlong-double-64.
+ifeq ($(subdir), wcsmbs)
+$(foreach suf,$(all-object-suffixes),\
+         $(objpfx)tst-nldbl-wscanf-binary-c11$(suf) \
+         $(objpfx)tst-nldbl-wscanf-binary-c2x$(suf) \
+         $(objpfx)tst-nldbl-wscanf-binary-gnu11$(suf) \
+         $(objpfx)tst-nldbl-wscanf-binary-gnu89$(suf) \
+         ): sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS))
 endif
 
 # Disable linker noise on files using ieee128 long double internally
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble
  2023-05-12 10:22 [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble MAHESH BODAPATI
@ 2023-05-15 13:09 ` Florian Weimer
  2023-05-15 18:03   ` MAHESH BODAPATI
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2023-05-15 13:09 UTC (permalink / raw)
  To: MAHESH BODAPATI via Libc-alpha; +Cc: MAHESH BODAPATI, rajis, Mahesh Bodapati

* MAHESH BODAPATI via Libc-alpha:

> From: Mahesh Bodapati <mahesh.bodapati@ibm.com>
>
> Removed -mabi=ieeelongdouble on failing tests. It resolves the error.
> error: ‘-mabi=ieeelongdouble’ requires ‘-mlong-double-128’

I think this is only need if GCC defaults to -mabi=ieeelongdouble, and
GCC 10 is not ready for that for different reasons?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble
  2023-05-15 13:09 ` Florian Weimer
@ 2023-05-15 18:03   ` MAHESH BODAPATI
  2023-05-15 19:26     ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: MAHESH BODAPATI @ 2023-05-15 18:03 UTC (permalink / raw)
  To: Florian Weimer, MAHESH BODAPATI via Libc-alpha; +Cc: rajis, Mahesh Bodapati


On 15/05/23 6:39 pm, Florian Weimer wrote:
> * MAHESH BODAPATI via Libc-alpha:
>
>> From: Mahesh Bodapati <mahesh.bodapati@ibm.com>
>>
>> Removed -mabi=ieeelongdouble on failing tests. It resolves the error.
>> error: ‘-mabi=ieeelongdouble’ requires ‘-mlong-double-128’
> I think this is only need if GCC defaults to -mabi=ieeelongdouble, and
> GCC 10 is not ready for that for different reasons?

Yes,these tests are under "sysdeps/ieee754/ldbl-opt" and ieee754 
defaults to -mabi=ieeelongdouble and the

CFLAGS were appended with -mlong-double-64 in commit 
dee2bea048b688b643a9a ,but powerpc gcc (<10)

doesn't support mabi=ieeelongdouble with -mlong-double-64.the support 
has been addedin gcc 12.1 and

it has been back-ported till gcc 10 so we are filtering out the 
-mabi=ieelongdouble to make it work

on lower gcc versions as well.

>
> Thanks,
> Florian
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble
  2023-05-15 18:03   ` MAHESH BODAPATI
@ 2023-05-15 19:26     ` Florian Weimer
  2023-05-16  7:48       ` MAHESH BODAPATI
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2023-05-15 19:26 UTC (permalink / raw)
  To: MAHESH BODAPATI; +Cc: MAHESH BODAPATI via Libc-alpha, rajis, Mahesh Bodapati

* MAHESH BODAPATI:

> On 15/05/23 6:39 pm, Florian Weimer wrote:
>> * MAHESH BODAPATI via Libc-alpha:
>>
>>> From: Mahesh Bodapati <mahesh.bodapati@ibm.com>
>>>
>>> Removed -mabi=ieeelongdouble on failing tests. It resolves the error.
>>> error: ‘-mabi=ieeelongdouble’ requires ‘-mlong-double-128’
>> I think this is only need if GCC defaults to -mabi=ieeelongdouble, and
>> GCC 10 is not ready for that for different reasons?
>
> Yes,these tests are under "sysdeps/ieee754/ldbl-opt" and ieee754
> defaults to -mabi=ieeelongdouble and the
>
> CFLAGS were appended with -mlong-double-64 in commit
> dee2bea048b688b643a9a ,but powerpc gcc (<10)
>
> doesn't support mabi=ieeelongdouble with -mlong-double-64.the support
> has been addedin gcc 12.1 and
>
> it has been back-ported till gcc 10 so we are filtering out the
> -mabi=ieelongdouble to make it work

I think if you backport this stuff to GCC 10, you should also pick up
the commit that fixed GCC.  I believe its commit cb16bc3b5f34733ef9bb
("rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble
[PR104208, P R87496]").

Thanks,
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble
  2023-05-15 19:26     ` Florian Weimer
@ 2023-05-16  7:48       ` MAHESH BODAPATI
  2023-05-17 22:08         ` Rajalakshmi Srinivasaraghavan
  0 siblings, 1 reply; 6+ messages in thread
From: MAHESH BODAPATI @ 2023-05-16  7:48 UTC (permalink / raw)
  To: Florian Weimer; +Cc: MAHESH BODAPATI via Libc-alpha, rajis, Mahesh Bodapati


On 16/05/23 12:56 am, Florian Weimer wrote:
> * MAHESH BODAPATI:
>
>> On 15/05/23 6:39 pm, Florian Weimer wrote:
>>> * MAHESH BODAPATI via Libc-alpha:
>>>
>>>> From: Mahesh Bodapati <mahesh.bodapati@ibm.com>
>>>>
>>>> Removed -mabi=ieeelongdouble on failing tests. It resolves the error.
>>>> error: ‘-mabi=ieeelongdouble’ requires ‘-mlong-double-128’
>>> I think this is only need if GCC defaults to -mabi=ieeelongdouble, and
>>> GCC 10 is not ready for that for different reasons?
>> Yes,these tests are under "sysdeps/ieee754/ldbl-opt" and ieee754
>> defaults to -mabi=ieeelongdouble and the
>>
>> CFLAGS were appended with -mlong-double-64 in commit
>> dee2bea048b688b643a9a ,but powerpc gcc (<10)
>>
>> doesn't support mabi=ieeelongdouble with -mlong-double-64.the support
>> has been addedin gcc 12.1 and
>>
>> it has been back-ported till gcc 10 so we are filtering out the
>> -mabi=ieelongdouble to make it work
> I think if you backport this stuff to GCC 10, you should also pick up
> the commit that fixed GCC.  I believe its commit cb16bc3b5f34733ef9bb
> ("rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble
> [PR104208, P R87496]").

Yes,that's the commit. we planned to switch the flags with respect to 
GCC version but I don't see a existing mechanism for switching the 
CFLAGS based on the target and GCC version so

we are filtering out the flag "-mabi=ieeelongdouble" to make it work on 
all the PowerPC GCC versions.

>
> Thanks,
> Florian
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble
  2023-05-16  7:48       ` MAHESH BODAPATI
@ 2023-05-17 22:08         ` Rajalakshmi Srinivasaraghavan
  0 siblings, 0 replies; 6+ messages in thread
From: Rajalakshmi Srinivasaraghavan @ 2023-05-17 22:08 UTC (permalink / raw)
  To: MAHESH BODAPATI, Florian Weimer
  Cc: MAHESH BODAPATI via Libc-alpha, rajis, Mahesh Bodapati


On 5/16/23 2:48 AM, MAHESH BODAPATI wrote:
>
> On 16/05/23 12:56 am, Florian Weimer wrote:
>> * MAHESH BODAPATI:
>>
>>> On 15/05/23 6:39 pm, Florian Weimer wrote:
>>>> * MAHESH BODAPATI via Libc-alpha:
>>>>
>>>>> From: Mahesh Bodapati <mahesh.bodapati@ibm.com>
>>>>>
>>>>> Removed -mabi=ieeelongdouble on failing tests. It resolves the error.
>>>>> error: ‘-mabi=ieeelongdouble’ requires ‘-mlong-double-128’
>>>> I think this is only need if GCC defaults to -mabi=ieeelongdouble, and
>>>> GCC 10 is not ready for that for different reasons?
>>> Yes,these tests are under "sysdeps/ieee754/ldbl-opt" and ieee754
>>> defaults to -mabi=ieeelongdouble and the
>>>
>>> CFLAGS were appended with -mlong-double-64 in commit
>>> dee2bea048b688b643a9a ,but powerpc gcc (<10)
>>>
>>> doesn't support mabi=ieeelongdouble with -mlong-double-64.the support
>>> has been addedin gcc 12.1 and
>>>
>>> it has been back-ported till gcc 10 so we are filtering out the
>>> -mabi=ieelongdouble to make it work
>> I think if you backport this stuff to GCC 10, you should also pick up
>> the commit that fixed GCC.  I believe its commit cb16bc3b5f34733ef9bb
>> ("rs6000: Allow -mlong-double-64 after -mabi={ibm,ieee}longdouble
>> [PR104208, P R87496]").
>
> Yes,that's the commit. we planned to switch the flags with respect to 
> GCC version but I don't see a existing mechanism for switching the 
> CFLAGS based on the target and GCC version so
>
> we are filtering out the flag "-mabi=ieeelongdouble" to make it work 
> on all the PowerPC GCC versions.


LGTM.  This should help to fix CI build issues with older compilers.

>
>>
>> Thanks,
>> Florian
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-17 22:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12 10:22 [PATCH] powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble MAHESH BODAPATI
2023-05-15 13:09 ` Florian Weimer
2023-05-15 18:03   ` MAHESH BODAPATI
2023-05-15 19:26     ` Florian Weimer
2023-05-16  7:48       ` MAHESH BODAPATI
2023-05-17 22:08         ` Rajalakshmi Srinivasaraghavan

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