public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Disable attempts to pass -mlong-double-128 to clang
@ 2021-08-28  0:40 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-28  0:40 UTC (permalink / raw)
  To: glibc-cvs

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

commit d21dfbccdc1a49c240e0dbbe80f32578623b665a
Author: Stan Shebs <stanshebs@google.com>
Date:   Wed Sep 26 13:13:31 2018 -0700

    Disable attempts to pass -mlong-double-128 to clang

Diff:
---
 sysdeps/ieee754/float128/Makeconfig   |  5 ++
 sysdeps/ieee754/ldbl-128ibm/Makefile  | 97 +++++++++++++++++++++++++++++++++++
 sysdeps/ieee754/ldbl-opt/Makefile     |  3 ++
 sysdeps/ieee754/ldbl-opt/configure    |  3 ++
 sysdeps/ieee754/ldbl-opt/configure.ac |  4 ++
 5 files changed, 112 insertions(+)

diff --git a/sysdeps/ieee754/float128/Makeconfig b/sysdeps/ieee754/float128/Makeconfig
index 99ae5e07bb..24d023cdaf 100644
--- a/sysdeps/ieee754/float128/Makeconfig
+++ b/sysdeps/ieee754/float128/Makeconfig
@@ -1,4 +1,9 @@
 # Include this earlier so it can be used earlier in Makefiles,
 # and sysdep/ makefiles.
 float128-fcts = $(enable-float128)
+# on ppc, float64x is tied to float128
+ifeq ($(findstring powerpc,$(config-sysdirs)),powerpc)
+float64x-alias-fcts = $(enable-float128)
+else
 float64x-alias-fcts = yes
+endif
diff --git a/sysdeps/ieee754/ldbl-128ibm/Makefile b/sysdeps/ieee754/ldbl-128ibm/Makefile
index bdba6cc6b5..c303154137 100644
--- a/sysdeps/ieee754/ldbl-128ibm/Makefile
+++ b/sysdeps/ieee754/ldbl-128ibm/Makefile
@@ -2,7 +2,9 @@
 # -mlong-double-128 option is used (or when it becomes a default
 # when -mlong-double-64 is not used).
 long-double-fcts = yes
+ifneq ($(with-clang),yes)
 sysdep-CFLAGS += -mlong-double-128
+endif
 
 ifeq ($(subdir),stdlib)
 tests += tst-strtold-ldbl-128ibm
@@ -14,3 +16,98 @@ tests += test-fmodl-ldbl-128ibm test-remainderl-ldbl-128ibm \
 	 test-remquol-ldbl-128ibm test-canonical-ldbl-128ibm \
 	 test-totalorderl-ldbl-128ibm
 endif
+
+# clang crashing a lot trying to optimize any of this
+ifeq ($(with-clang),yes)
+CFLAGS-test-canonical-ldbl-128ibm.c = -O0
+CFLAGS-test-totalorderl-ldbl-128ibm.c = -O0
+
+CFLAGS-e_acoshl.c = -O0
+CFLAGS-e_acosl.c = -O0
+CFLAGS-e_asinl.c = -O0
+CFLAGS-e_atan2l.c = -O0
+CFLAGS-e_atanhl.c = -O0
+CFLAGS-e_coshl.c = -O0
+CFLAGS-e_exp10l.c = -O0
+CFLAGS-e_expl.c = -O0
+CFLAGS-e_fmodl.c = -O0
+CFLAGS-e_gammal_r.c = -O0
+CFLAGS-e_hypotl.c = -O0
+CFLAGS-e_ilogbl.c = -O0
+CFLAGS-e_j0l.c = -O0
+CFLAGS-e_j1l.c = -O0
+CFLAGS-e_jnl.c = -O0
+CFLAGS-e_lgammal_r.c = -O0
+CFLAGS-e_log10l.c = -O0
+CFLAGS-e_log2l.c = -O0
+CFLAGS-e_logl.c = -O0
+CFLAGS-e_powl.c = -O0
+CFLAGS-e_remainderl.c = -O0
+CFLAGS-e_rem_pio2l.c = -O0
+CFLAGS-e_sinhl.c = -O0
+CFLAGS-e_sqrtl.c = -O0
+CFLAGS-gamma_productl.c = -O0
+CFLAGS-k_cosl.c = -O0
+CFLAGS-k_sincosl.c = -O0
+CFLAGS-k_sinl.c = -O0
+CFLAGS-k_tanl.c = -O0
+CFLAGS-ldbl2mpn.c = -O0
+CFLAGS-lgamma_negl.c = -O0
+CFLAGS-lgamma_productl.c = -O0
+CFLAGS-mpn2ldbl.c = -O0
+CFLAGS-printf_fphex.c = -O0
+CFLAGS-s_asinhl.c = -O0
+CFLAGS-s_atanl.c = -O0
+CFLAGS-s_cbrtl.c = -O0
+CFLAGS-s_ceill.c = -O0
+CFLAGS-s_copysignl.c = -O0
+CFLAGS-s_cosl.c = -O0
+CFLAGS-s_erfl.c = -O0
+CFLAGS-s_expm1l.c = -O0
+CFLAGS-s_fabsl.c = -O0
+CFLAGS-s_finitel.c = -O0
+CFLAGS-s_floorl.c = -O0
+CFLAGS-s_fmal.c = -O0
+CFLAGS-s_fpclassifyl.c = -O0
+CFLAGS-s_frexpl.c = -O0
+CFLAGS-s_fromfpl.c = -O0
+CFLAGS-s_fromfpl_main.c = -O0
+CFLAGS-s_fromfpxl.c = -O0
+CFLAGS-s_getpayloadl.c = -O0
+CFLAGS-s_iscanonicall.c = -O0
+CFLAGS-s_isinfl.c = -O0
+CFLAGS-s_isnanl.c = -O0
+CFLAGS-s_issignalingl.c = -O0
+CFLAGS-s_llrintl.c = -O0
+CFLAGS-s_llroundl.c = -O0
+CFLAGS-s_log1pl.c = -O0
+CFLAGS-s_logbl.c = -O0
+CFLAGS-s_lrintl.c = -O0
+CFLAGS-s_lroundl.c = -O0
+CFLAGS-s_modfl.c = -O0
+CFLAGS-s_nearbyintl.c = -O0
+CFLAGS-s_nextafterl.c = -O0
+CFLAGS-s_nexttoward.c = -O0
+CFLAGS-s_nexttowardf.c = -O0
+CFLAGS-s_nextupl.c = -O0
+CFLAGS-s_remquol.c = -O0
+CFLAGS-s_rintl.c = -O0
+CFLAGS-s_roundevenl.c = -O0
+CFLAGS-s_roundl.c = -O0
+CFLAGS-s_scalblnl.c = -O0
+CFLAGS-s_scalbnl.c = -O0
+CFLAGS-s_setpayloadl.c = -O0
+CFLAGS-s_setpayloadl_main.c = -O0
+CFLAGS-s_setpayloadsigl.c = -O0
+CFLAGS-s_signbitl.c = -O0
+CFLAGS-s_sincosl.c = -O0
+CFLAGS-s_sinl.c = -O0
+CFLAGS-s_tanhl.c = -O0
+CFLAGS-s_tanl.c = -O0
+CFLAGS-s_totalorderl.c = -O0
+CFLAGS-s_totalordermagl.c = -O0
+CFLAGS-s_truncl.c = -O0
+CFLAGS-s_ufromfpl.c = -O0
+CFLAGS-s_ufromfpxl.c = -O0
+CFLAGS-t_sincosl.c = -O0
+endif
diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile
index ffc55d1d9a..ab8ee248ca 100644
--- a/sysdeps/ieee754/ldbl-opt/Makefile
+++ b/sysdeps/ieee754/ldbl-opt/Makefile
@@ -2,9 +2,12 @@
 # -mlong-double-128 option is used (or when it becomes a default
 # when -mlong-double-64 is not used).
 long-double-fcts = yes
+# Skip this for clang (or stub out whole dir?)
+ifeq ($(with-clang),no)
 ifeq (,$(filter -mlong-double-128,$(sysdep-CFLAGS)))
 sysdep-CFLAGS += -mlong-double-128
 endif
+endif
 
 ifeq ($(subdir),math)
 libm-routines += s_nexttowardfd
diff --git a/sysdeps/ieee754/ldbl-opt/configure b/sysdeps/ieee754/ldbl-opt/configure
index ad9d77b88c..779fd82b9a 100644
--- a/sysdeps/ieee754/ldbl-opt/configure
+++ b/sysdeps/ieee754/ldbl-opt/configure
@@ -1,6 +1,7 @@
 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
  # Local configure fragment for sysdeps/ieee754/ldbl-opt/.
 
+if test "$with_clang" = no; then
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS supports -mlong-double-128" >&5
 $as_echo_n "checking whether $CC $CFLAGS supports -mlong-double-128... " >&6; }
@@ -37,3 +38,5 @@ $as_echo "$libc_cv_mlong_double_128" >&6; }
 if test "$libc_cv_mlong_double_128" = no; then
   as_fn_error $? "this configuration requires -mlong-double-128 support" "$LINENO" 5
 fi
+
+fi # with_clang
diff --git a/sysdeps/ieee754/ldbl-opt/configure.ac b/sysdeps/ieee754/ldbl-opt/configure.ac
index a77fadd1c4..69ee5769d0 100644
--- a/sysdeps/ieee754/ldbl-opt/configure.ac
+++ b/sysdeps/ieee754/ldbl-opt/configure.ac
@@ -2,6 +2,8 @@ sinclude(./aclocal.m4)dnl Autoconf lossage
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/ieee754/ldbl-opt/.
 
+if test "$with_clang" = no; then
+
 AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128,
 	       libc_cv_mlong_double_128, [dnl
 save_CFLAGS="$CFLAGS"
@@ -17,3 +19,5 @@ CFLAGS="$save_CFLAGS"])
 if test "$libc_cv_mlong_double_128" = no; then
   AC_MSG_ERROR([this configuration requires -mlong-double-128 support])
 fi
+
+fi # with_clang


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-28  0:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  0:40 [glibc/google/grte/v5-2.27/master] Disable attempts to pass -mlong-double-128 to clang Fangrui Song

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).