This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] powerpc64le: Iterate over all object suffixes when appending -mfloat128
- From: "Gabriel F. T. Gomes" <gftg at linux dot vnet dot ibm dot com>
- To: schwab at suse dot de
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 27 Jun 2017 21:54:28 -0300
- Subject: [PATCH] powerpc64le: Iterate over all object suffixes when appending -mfloat128
- Authentication-results: sourceware.org; auth=none
- References: <mvm4lv1o9le.fsf@suse.de>
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
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
--
2.4.11