aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2018-09-26 13:13:31 -0700
committerFangrui Song <i@maskray.me>2021-08-27 17:23:13 -0700
commitd21dfbccdc1a49c240e0dbbe80f32578623b665a (patch)
tree9d837cca1057388ea877b66b45fb03f9bae58ba3 /sysdeps/ieee754
parentacf11f442023133bd885aa3f6fdc02eef4112557 (diff)
downloadglibc-d21dfbccdc1a49c240e0dbbe80f32578623b665a.zip
glibc-d21dfbccdc1a49c240e0dbbe80f32578623b665a.tar.gz
glibc-d21dfbccdc1a49c240e0dbbe80f32578623b665a.tar.bz2
Disable attempts to pass -mlong-double-128 to clang
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/float128/Makeconfig5
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/Makefile97
-rw-r--r--sysdeps/ieee754/ldbl-opt/Makefile3
-rw-r--r--sysdeps/ieee754/ldbl-opt/configure3
-rw-r--r--sysdeps/ieee754/ldbl-opt/configure.ac4
5 files changed, 112 insertions, 0 deletions
diff --git a/sysdeps/ieee754/float128/Makeconfig b/sysdeps/ieee754/float128/Makeconfig
index 99ae5e0..24d023c 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 bdba6cc..c303154 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 ffc55d1..ab8ee24 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 ad9d77b..779fd82 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 a77fadd..69ee576 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