This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] powerpc64le: Iterate over all object suffixes when appending -mfloat128

On Tue, 27 Jun 2017 15:15:25 +0200
Andreas Schwab <> 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:
and more recently (in the context of this file):

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/ |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64le/

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
 # 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/ b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/
new file mode 100644
index 0000000..17f89ca
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64le/
@@ -0,0 +1,3 @@
+# GCC emits a call to __getauxval from have_ieee_hw_p (libgcc)
+# ( __getauxval

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]