public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/google/grte/v5-2.27/master] Disable -mfloat128 for clang, lets power9 insns into power8 executables
Date: Sat, 28 Aug 2021 00:42:00 +0000 (GMT)	[thread overview]
Message-ID: <20210828004200.D50493857805@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=43afb700332f2d1e29079b8e2a9a4828f0ca29b2

commit 43afb700332f2d1e29079b8e2a9a4828f0ca29b2
Author: Stan Shebs <stanshebs@google.com>
Date:   Mon Mar 25 15:21:27 2019 -0700

    Disable -mfloat128 for clang, lets power9 insns into power8 executables

Diff:
---
 sysdeps/powerpc/powerpc64le/Makefile | 80 ++++++++++++++++++------------------
 1 file changed, 41 insertions(+), 39 deletions(-)

diff --git a/sysdeps/powerpc/powerpc64le/Makefile b/sysdeps/powerpc/powerpc64le/Makefile
index c4d36464be..8312d0e414 100644
--- a/sysdeps/powerpc/powerpc64le/Makefile
+++ b/sysdeps/powerpc/powerpc64le/Makefile
@@ -1,9 +1,11 @@
 # When building float128 we need to ensure -mfloat128 is
 # passed to all such object files.
 
-pow9-flag =
+float128-flags = -mfloat128
 ifeq ($(with-clang),yes)
-pow9-flag = -mcpu=pwr9
+float128-flags =
+#Enable this when we know we are targeting power9
+#float128-flags += -mcpu=pwr9
 endif
 
 # libgcc requires __tcb_parse_hwcap_and_convert_at_platform when built with
@@ -16,18 +18,18 @@ ifeq ($(subdir),math)
 CPPFLAGS += -I../soft-fp
 
 # float128 requires adding a handful of extra flags.
-$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-CFLAGS-libm-test-support-float128.c += -mfloat128 $(pow9-flag)
-CFLAGS-libm-test-support-float64x.c += -mfloat128 $(pow9-flag)
-CFLAGS-test-math-iscanonical.cc += -mfloat128 $(pow9-flag)
-CFLAGS-test-math-iseqsig.cc += -mfloat128 $(pow9-flag)
-CFLAGS-test-math-issignaling.cc += -mfloat128 $(pow9-flag)
-CFLAGS-test-math-iszero.cc += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += $(float128-flags)
+CFLAGS-libm-test-support-float128.c += $(float128-flags)
+CFLAGS-libm-test-support-float64x.c += $(float128-flags)
+CFLAGS-test-math-iscanonical.cc += $(float128-flags)
+CFLAGS-test-math-iseqsig.cc += $(float128-flags)
+CFLAGS-test-math-issignaling.cc += $(float128-flags)
+CFLAGS-test-math-iszero.cc += $(float128-flags)
 $(foreach test, \
 	  test-float128% test-ifloat128% test-float64x% test-ifloat64x% \
 	  test-math-iscanonical test-math-iseqsig test-math-issignaling \
@@ -38,21 +40,21 @@ endif
 
 # Append flags to string <-> _Float128 routines.
 ifneq ($(filter $(subdir),wcsmbs stdlib),)
-$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128 $(pow9-flag)
-CFLAGS-bug-strtod.c += -mfloat128 $(pow9-flag)
-CFLAGS-bug-strtod2.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-strtod-round.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-wcstod-round.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-strtod-nan-locale.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-wcstod-nan-locale.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-strtod6.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-strfrom.c += -mfloat128 $(pow9-flag)
-CFLAGS-tst-strfrom-locale.c += -mfloat128 $(pow9-flag)
-CFLAGS-strfrom-skeleton.c += -mfloat128 $(pow9-flag)
+$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += $(float128-flags)
+$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += $(float128-flags)
+CFLAGS-bug-strtod.c += $(float128-flags)
+CFLAGS-bug-strtod2.c += $(float128-flags)
+CFLAGS-tst-strtod-round.c += $(float128-flags)
+CFLAGS-tst-wcstod-round.c += $(float128-flags)
+CFLAGS-tst-strtod-nan-locale.c += $(float128-flags)
+CFLAGS-tst-wcstod-nan-locale.c += $(float128-flags)
+CFLAGS-tst-strtod6.c += $(float128-flags)
+CFLAGS-tst-strfrom.c += $(float128-flags)
+CFLAGS-tst-strfrom-locale.c += $(float128-flags)
+CFLAGS-strfrom-skeleton.c += $(float128-flags)
 $(foreach test,bug-strtod bug-strtod2 bug-strtod2 tst-strtod-round \
 tst-wcstod-round tst-strtod6 tst-strrom tst-strfrom-locale \
 tst-strtod-nan-locale tst-wcstod-nan-locale \
@@ -64,18 +66,18 @@ strfrom-skeleton,$(objpfx)$(test)): gnulib-tests += $(f128-loader-link)
 # sysdeps.  This is avoided with the use sysdep-CFLAGS instead of CFLAGS.
 sysdep-CFLAGS += $(sysdep-CFLAGS-$(<F))
 #  -mllvm -enable-ppc-quad-precision
-sysdep-CFLAGS-fpioconst.c += -mfloat128 $(pow9-flag)
-sysdep-CFLAGS-strtod_l.c += -mfloat128 $(pow9-flag)
-sysdep-CFLAGS-strtof_l.c += -mfloat128 $(pow9-flag)
-sysdep-CFLAGS-strtold_l.c += -mfloat128 $(pow9-flag)
-sysdep-CFLAGS-wcstod_l.c += -mfloat128 $(pow9-flag)
-sysdep-CFLAGS-wcstof_l.c += -mfloat128 $(pow9-flag)
-sysdep-CFLAGS-wcstold_l.c += -mfloat128 $(pow9-flag)
+sysdep-CFLAGS-fpioconst.c += $(float128-flags)
+sysdep-CFLAGS-strtod_l.c += $(float128-flags)
+sysdep-CFLAGS-strtof_l.c += $(float128-flags)
+sysdep-CFLAGS-strtold_l.c += $(float128-flags)
+sysdep-CFLAGS-wcstod_l.c += $(float128-flags)
+sysdep-CFLAGS-wcstof_l.c += $(float128-flags)
+sysdep-CFLAGS-wcstold_l.c += $(float128-flags)
 endif
 
 # Append flags to printf routines.
 ifeq ($(subdir),stdio-common)
-CFLAGS-printf_fp.c = -mfloat128 $(pow9-flag)
-CFLAGS-printf_fphex.c = -mfloat128 $(pow9-flag)
-CFLAGS-printf_size.c = -mfloat128 $(pow9-flag)
+CFLAGS-printf_fp.c = $(float128-flags)
+CFLAGS-printf_fphex.c = $(float128-flags)
+CFLAGS-printf_size.c = $(float128-flags)
 endif


                 reply	other threads:[~2021-08-28  0:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210828004200.D50493857805@sourceware.org \
    --to=maskray@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).