diff mbox

powerpc64le: Iterate over all object suffixes when appending -mfloat128

Message ID 1498611268-1929-1-git-send-email-gftg@linux.vnet.ibm.com
State New
Headers show

Commit Message

Gabriel F. T. Gomes June 28, 2017, 12:54 a.m. UTC
On Tue, 27 Jun 2017 15:15:25 +0200
Andreas Schwab <schwab@suse.de> wrote:

> You need to iterate over all object suffixes.

This patch addresses this comment.

> Why sysdep-CFLAGS-* and not CFLAGS-*?

Machine-specific CFLAGS could be overriden depending on when the Rules file
gets included in the Makefile.  This has been discussed in a few threads,
such as:
https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html
https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html
and more recently (in the context of this file):
https://sourceware.org/ml/libc-alpha/2017-03/msg00218.html

I'm using sysdep-CFLAGS based on this.

> Wouldn't it make sense to always pass -mfloat128?

We can't use this flag globally, since it would mix -mfloat128 with other
flags that are not supported at the same time.  For instance, mcount.c and
dl-lookup.c are compiled with -mno-vsx, but -mfloat1128 requires vsx.

-- 8< --
On powerpc64le, the compilation of the files related to float128 support
requires the option -mfloat128 to be passed to gcc.  However, not all
possible object suffixes were covered in the Makefile.  This patch uses
$(all-object-suffixes) in all remaining rules.

Tested for powerpc64le.

	* sysdeps/powerpc/powerpc64le/Makefile: Use $(all-object-suffixes)
	to iterate over all possible object suffixes.
---
 sysdeps/powerpc/powerpc64le/Makefile                      | 10 +++++++---
 sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data

Comments

Andreas Schwab June 28, 2017, 7:19 a.m. UTC | #1
On Jun 27 2017, "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com> wrote:

> 	* sysdeps/powerpc/powerpc64le/Makefile: Use $(all-object-suffixes)
> 	to iterate over all possible object suffixes.

Ok.

> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data
> new file mode 100644
> index 0000000..17f89ca
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data
> @@ -0,0 +1,3 @@
> +# GCC emits a call to __getauxval from have_ieee_hw_p (libgcc)
> +# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193)
> +libc.so: __getauxval

This is unrelated and should not be part of the commit.

Andreas.
Andreas Schwab June 28, 2017, 7:22 a.m. UTC | #2
On Jun 27 2017, "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com> wrote:

>> Why sysdep-CFLAGS-* and not CFLAGS-*?
>
> Machine-specific CFLAGS could be overriden depending on when the Rules file
> gets included in the Makefile.  This has been discussed in a few threads,
> such as:
> https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html
> https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html
> and more recently (in the context of this file):
> https://sourceware.org/ml/libc-alpha/2017-03/msg00218.html
>
> I'm using sysdep-CFLAGS based on this.

Can you add a comment please?

Andreas.
Gabriel F. T. Gomes June 28, 2017, 11:58 a.m. UTC | #3
On Wed, 28 Jun 2017 09:19:54 +0200
Andreas Schwab <schwab@suse.de> wrote:

> > diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data
> > new file mode 100644
> > index 0000000..17f89ca
> > --- /dev/null
> > +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data
> > @@ -0,0 +1,3 @@
> > +# GCC emits a call to __getauxval from have_ieee_hw_p (libgcc)
> > +# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193)
> > +libc.so: __getauxval  
> 
> This is unrelated and should not be part of the commit.

Sorry about that.  It got included in the patch when I was amending the
commit message right before for submission to this list.
Joseph Myers July 10, 2017, 10:22 a.m. UTC | #4
On Tue, 27 Jun 2017, Gabriel F. T. Gomes wrote:

> 	* sysdeps/powerpc/powerpc64le/Makefile: Use $(all-object-suffixes)
> 	to iterate over all possible object suffixes.

This appears not to have been committed.  Thus powerpc64le-linux-gnu build 
is broken with build-many-glibcs.py now that uses --enable-profile.
Tulio Magno Quites Machado Filho July 11, 2017, 2:07 p.m. UTC | #5
Joseph Myers <joseph@codesourcery.com> writes:

> On Tue, 27 Jun 2017, Gabriel F. T. Gomes wrote:
>
>> 	* sysdeps/powerpc/powerpc64le/Makefile: Use $(all-object-suffixes)
>> 	to iterate over all possible object suffixes.
>
> This appears not to have been committed.  Thus powerpc64le-linux-gnu build 
> is broken with build-many-glibcs.py now that uses --enable-profile.

LGTM without the __getauxval part that Andreas already pointed out.
Gabriel F. T. Gomes July 11, 2017, 5:20 p.m. UTC | #6
On Tue, 11 Jul 2017 11:07:32 -0300
"Tulio Magno Quites Machado Filho" <tuliom@linux.vnet.ibm.com> wrote:
> 
> LGTM without the __getauxval part that Andreas already pointed out.
 
Now committed with this change and with a comment about the use of
sysdep-CFLAGS (also suggested by Andreas).  Thank you.
diff mbox

Patch

diff --git a/sysdeps/powerpc/powerpc64le/Makefile b/sysdeps/powerpc/powerpc64le/Makefile
index bd8a82d..e940298 100644
--- a/sysdeps/powerpc/powerpc64le/Makefile
+++ b/sysdeps/powerpc/powerpc64le/Makefile
@@ -8,14 +8,18 @@  CPPFLAGS += -I../soft-fp
 # float128 requires adding a handful of extra flags.
 $(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
 $(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128
-$(objpfx)test-float128%.o $(objpfx)test-float128%.os: CFLAGS += -mfloat128
-$(objpfx)test-ifloat128%.o $(objpfx)test-ifloat128%.os: CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128
 CFLAGS-libm-test-support-float128.c += -mfloat128
 endif
 
 # Append flags to string <-> _Float128 routines.
 ifneq ($(filter $(subdir),wcsmbs stdlib),)
-%f128.o %f128.os %f128_l.o %f128_l.os %f128_nan.o %f128_nan.os %float1282mpn.o %float1282mpn.os %mpn2float128.o %mpn2float128.os: CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128
+$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128
 CFLAGS-bug-strtod.c += -mfloat128
 CFLAGS-bug-strtod2.c += -mfloat128
 CFLAGS-tst-strtod-round.c += -mfloat128
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data
new file mode 100644
index 0000000..17f89ca
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/localplt.data
@@ -0,0 +1,3 @@ 
+# GCC emits a call to __getauxval from have_ieee_hw_p (libgcc)
+# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193)
+libc.so: __getauxval