Message ID | 20230512102259.2329923-1-bmahi496@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | powerpc:GCC(<10) doesn't allow -mlong-double-64 after -mabi=ieeelongdouble | expand |
* 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
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 >
* 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
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 >
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 >>
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
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(+)