diff mbox series

PowerPC: Add -mno-gnu-attributes to ibm-ldouble.o

Message ID 20201022220510.GA11556@ibm-toto.the-meissners.org
State New
Headers show
Series PowerPC: Add -mno-gnu-attributes to ibm-ldouble.o | expand

Commit Message

Michael Meissner Oct. 22, 2020, 10:05 p.m. UTC
PowerPC: Add -mno-gnu-attributes to ibm-ldouble.o.

I have split all of these patches into separate patches to hopefully get them
into the tree.

This patch is split off from the patch adding __float128 <-> Decimal
conversions.  This patch is needed to prevent the linker from issuing a
warning when the long double format is IEEE 128-bit.

I have tested this patch with bootstrap builds on a little endian power9 system
running Linux.  With the other patches, I have built two full bootstrap builds
using this patch and the patches after this patch.  One build used the current
default for long double (IBM extended double) and the other build switched the
default to IEEE 128-bit.  I used the Advance Toolchain AT 14.0 compiler as the
library used by this compiler.  There are no regressions between the tests.
There are 3 fortran benchmarks (ieee/large_2.f90, default_format_2.f90, and
default_format_denormal_2.f90) that now pass.

Can I install this into the trunk?

We have gotten some requests to back port these changes to GCC 10.x.  At the
moment, I am not planning to do the back port, but I may need to in the future.

libgcc/
2020-10-22  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/t-float128: Compile ibm-ldouble.o with
	-mno-gnu-attributes.
---
 libgcc/config/rs6000/t-float128 | 5 +++++
 1 file changed, 5 insertions(+)

Comments

will schmidt Oct. 26, 2020, 10:49 p.m. UTC | #1
On Thu, 2020-10-22 at 18:05 -0400, Michael Meissner via Gcc-patches wrote:
> PowerPC: Add -mno-gnu-attributes to ibm-ldouble.o.
> 
> I have split all of these patches into separate patches to hopefully get them
> into the tree.
> 
> This patch is split off from the patch adding __float128 <-> Decimal
> conversions.  This patch is needed to prevent the linker from issuing a
> warning when the long double format is IEEE 128-bit.
> 
> I have tested this patch with bootstrap builds on a little endian power9 system
> running Linux.  With the other patches, I have built two full bootstrap builds
> using this patch and the patches after this patch.  One build used the current
> default for long double (IBM extended double) and the other build switched the
> default to IEEE 128-bit.  I used the Advance Toolchain AT 14.0 compiler as the
> library used by this compiler.  There are no regressions between the tests.
> There are 3 fortran benchmarks (ieee/large_2.f90, default_format_2.f90, and
> default_format_denormal_2.f90) that now pass.
> 
> Can I install this into the trunk?
> 
> We have gotten some requests to back port these changes to GCC 10.x.  At the
> moment, I am not planning to do the back port, but I may need to in the future.
> 
> libgcc/
> 2020-10-22  Michael Meissner  <meissner@linux.ibm.com>
> 
> 	* config/rs6000/t-float128: Compile ibm-ldouble.o with
> 	-mno-gnu-attributes.
> ---
>  libgcc/config/rs6000/t-float128 | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
> index d5413445189..c2cb3e2b705 100644
> --- a/libgcc/config/rs6000/t-float128
> +++ b/libgcc/config/rs6000/t-float128
> @@ -69,6 +69,11 @@ $(fp128_ppc_obj)	 : INTERNAL_CFLAGS += $(FP128_CFLAGS_SW)
>  $(fp128_obj)		 : $(fp128_includes)
>  $(fp128_obj)		 : $(srcdir)/config/rs6000/quad-float128.h
> 
> +
> +# Turn off gnu attributes to allow using the IBM extended double support for
> +# __ibm128 if long double uses the IEEE 128-bit representation.
> +ibm-ldouble$(objext)	: INTERNAL_CFLAGS += -mno-gnu-attribute
> +

I think from context you can drop the "if long double uses the IEEE
128-bit representation." portion of that comment. 

(Though this corrects
a condition based on the configury, etc, there is no conditional logic
here..)



>  $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
>  	@src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
>  	echo "Create $@"; \
> -- 
> 2.22.0
> 
>
Michael Meissner Oct. 29, 2020, 12:46 a.m. UTC | #2
Please withdraw from consideration the patch that turned on -mno-gnu-attribute
for just the ibm-ldouble.o module in favor of the patch for PR libgcc/97543
that I just posted:

PR libgcc/97543 patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557413.html
Withdrawn patch:       https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556863.html
diff mbox series

Patch

diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128
index d5413445189..c2cb3e2b705 100644
--- a/libgcc/config/rs6000/t-float128
+++ b/libgcc/config/rs6000/t-float128
@@ -69,6 +69,11 @@  $(fp128_ppc_obj)	 : INTERNAL_CFLAGS += $(FP128_CFLAGS_SW)
 $(fp128_obj)		 : $(fp128_includes)
 $(fp128_obj)		 : $(srcdir)/config/rs6000/quad-float128.h
 
+
+# Turn off gnu attributes to allow using the IBM extended double support for
+# __ibm128 if long double uses the IEEE 128-bit representation.
+ibm-ldouble$(objext)	: INTERNAL_CFLAGS += -mno-gnu-attribute
+
 $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
 	@src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
 	echo "Create $@"; \