aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <prka@google.com>2023-12-27 21:56:41 +0000
committerPranav Kant <prka@google.com>2023-12-27 22:22:08 +0000
commit57afddcb68c168e7cbe448d55c73a7842e21c52d (patch)
treec5f0380ca3536b83748f58d143966f066af79390
parent60417c3867eb05526efe734196b09a98eeceef15 (diff)
downloadglibc-57afddcb68c168e7cbe448d55c73a7842e21c52d.zip
glibc-57afddcb68c168e7cbe448d55c73a7842e21c52d.tar.gz
glibc-57afddcb68c168e7cbe448d55c73a7842e21c52d.tar.bz2
-DWANT_FLOAT usage and enable float128 tests
-rw-r--r--Makefile4
-rw-r--r--math/Makefile4
-rw-r--r--sysdeps/ieee754/float128/Makefile127
3 files changed, 135 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bea4e27f..084fec3 100644
--- a/Makefile
+++ b/Makefile
@@ -252,6 +252,10 @@ mostlyclean: parent-mostlyclean
tests-clean:
@$(MAKE) subdir_testclean no_deps=t
+ifeq ($(enable-float128),yes)
+CPPFLAGS += -DWANT_FLOAT128=1
+endif
+
ifneq (,$(CXX))
vpath c++-types.data $(+sysdep_dirs)
diff --git a/math/Makefile b/math/Makefile
index ec7d91c..6ad3cce 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -160,6 +160,10 @@ gen-calls = s_ldexpF
generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
+ifeq ($(enable-float128),yes)
+math-CPPFLAGS += -DWANT_FLOAT128=1
+endif
+
ifeq ($(build-mathvec),yes)
# We need to install libm.so and libm.a as linker scripts
# for transparent use of vector math library.
diff --git a/sysdeps/ieee754/float128/Makefile b/sysdeps/ieee754/float128/Makefile
index 70bb3ac..2b73684 100644
--- a/sysdeps/ieee754/float128/Makefile
+++ b/sysdeps/ieee754/float128/Makefile
@@ -11,4 +11,131 @@ endif
ifeq ($(subdir),wcsmbs)
routines += wcstof128_l wcstof128 wcstof128_nan
endif
+
+ifeq ($(subdir),math)
+CFLAGS-w_acosf128.c += -fno-builtin-acosf64x
+CFLAGS-w_acoshf128.c += -fno-builtin-acoshf64x
+CFLAGS-w_asinf128.c += -fno-builtin-asinf64x
+CFLAGS-s_asinhf128.c += -fno-builtin-asinhf64x
+CFLAGS-s_atanf128.c += -fno-builtin-atanf64x
+CFLAGS-w_atan2f128.c += -fno-builtin-atan2f64x
+CFLAGS-w_atanhf128.c += -fno-builtin-atanhf64x
+CFLAGS-s_cabsf128.c += -fno-builtin-cabsf64x
+CFLAGS-s_cacosf128.c += -fno-builtin-cacosf64x
+CFLAGS-s_cacoshf128.c += -fno-builtin-cacoshf64x
+CFLAGS-s_canonicalizef128.c += -fno-builtin-canonicalizef64x
+CFLAGS-s_cargf128.c += -fno-builtin-cargf64x
+CFLAGS-s_casinf128.c += -fno-builtin-casinf64x
+CFLAGS-s_casinhf128.c += -fno-builtin-casinhf64x
+CFLAGS-s_catanf128.c += -fno-builtin-catanf64x
+CFLAGS-s_catanhf128.c += -fno-builtin-catanhf64x
+CFLAGS-s_cbrtf128.c += -fno-builtin-cbrtf64x
+CFLAGS-s_ccosf128.c += -fno-builtin-ccosf64x
+CFLAGS-s_ccoshf128.c += -fno-builtin-ccoshf64x
+CFLAGS-s_ceilf128.c += -fno-builtin-ceilf64x
+CFLAGS-s_cexpf128.c += -fno-builtin-cexpf64x
+CFLAGS-s_cimagf128.c += -fno-builtin-cimagf64x
+CFLAGS-s_clogf128.c += -fno-builtin-clogf64x
+CFLAGS-s_clog10f128.c += -fno-builtin-clog10f64x
+CFLAGS-s_conjf128.c += -fno-builtin-conjf64x
+CFLAGS-s_copysignf128.c += -fno-builtin-copysignf64x
+CFLAGS-s_cosf128.c += -fno-builtin-cosf64x
+CFLAGS-w_coshf128.c += -fno-builtin-coshf64x
+CFLAGS-s_cpowf128.c += -fno-builtin-cpowf64x
+CFLAGS-s_cprojf128.c += -fno-builtin-cprojf64x
+CFLAGS-s_crealf128.c += -fno-builtin-crealf64x
+CFLAGS-s_csinf128.c += -fno-builtin-csinf64x
+CFLAGS-s_csinhf128.c += -fno-builtin-csinhf64x
+CFLAGS-s_csqrtf128.c += -fno-builtin-csqrtf64x
+CFLAGS-s_ctanf128.c += -fno-builtin-ctanf64x
+CFLAGS-s_ctanhf128.c += -fno-builtin-ctanhf64x
+CFLAGS-s_daddf128.c += -fno-builtin-f64addf64x
+CFLAGS-s_ddivf128.c += -fno-builtin-f64divf64x
+CFLAGS-s_dfmaf128.c += -fno-builtin-f64fmaf64x
+CFLAGS-s_dmulf128.c += -fno-builtin-f64mulf64x
+CFLAGS-s_dsqrtf128.c += -fno-builtin-f64sqrtf64x
+CFLAGS-s_dsubf128.c += -fno-builtin-f64subf64x
+CFLAGS-s_erff128.c += -fno-builtin-erff64x
+CFLAGS-s_erfcf128.c += -fno-builtin-erfcf64x
+CFLAGS-e_expf128.c += -fno-builtin-expf64x
+CFLAGS-w_exp10f128.c += -fno-builtin-exp10f64x
+CFLAGS-e_exp2f128.c += -fno-builtin-exp2f64x
+CFLAGS-s_expm1f128.c += -fno-builtin-expm1f64x
+CFLAGS-s_fabsf128.c += -fno-builtin-fabsf64x
+CFLAGS-s_faddf128.c += -fno-builtin-f32addf64x
+CFLAGS-s_fdimf128.c += -fno-builtin-fdimf64x
+CFLAGS-s_fdivf128.c += -fno-builtin-f32divf64x
+CFLAGS-s_ffmaf128.c += -fno-builtin-f32fmaf64x
+CFLAGS-s_floorf128.c += -fno-builtin-floorf64x
+CFLAGS-s_fmaf128.c += -fno-builtin-fmaf64x
+CFLAGS-s_fmaxf128.c += -fno-builtin-fmaxf64x
+CFLAGS-s_fmaximumf128.c += -fno-builtin-fmaximumf64x
+CFLAGS-s_fmaximum_magf128.c += -fno-builtin-fmaximum_magf64x
+CFLAGS-s_fmaximum_mag_numf128.c += -fno-builtin-fmaximum_mag_numf64x
+CFLAGS-s_fmaximum_numf128.c += -fno-builtin-fmaximum_numf64x
+CFLAGS-s_fmaxmagf128.c += -fno-builtin-fmaxmagf64x
+CFLAGS-s_fminf128.c += -fno-builtin-fminf64x
+CFLAGS-s_fminimumf128.c += -fno-builtin-fminimumf64x
+CFLAGS-s_fminimum_magf128.c += -fno-builtin-fminimum_magf64x
+CFLAGS-s_fminimum_mag_numf128.c += -fno-builtin-fminimum_mag_numf64x
+CFLAGS-s_fminimum_numf128.c += -fno-builtin-fminimum_numf64x
+CFLAGS-s_fminmagf128.c += -fno-builtin-fminmagf64x
+CFLAGS-w_fmodf128.c += -fno-builtin-fmodf64x
+CFLAGS-s_fmulf128.c += -fno-builtin-f32mulf64x
+CFLAGS-s_frexpf128.c += -fno-builtin-frexpf64x
+CFLAGS-s_fromfpf128.c += -fno-builtin-fromfpf64x
+CFLAGS-s_fromfpxf128.c += -fno-builtin-fromfpxf64x
+CFLAGS-s_fsqrtf128.c += -fno-builtin-f32sqrtf64x
+CFLAGS-s_fsubf128.c += -fno-builtin-f32subf64x
+CFLAGS-s_getpayloadf128.c += -fno-builtin-getpayloadf64x
+CFLAGS-w_hypotf128.c += -fno-builtin-hypotf64x
+CFLAGS-w_ilogbf128.c += -fno-builtin-ilogbf64x
+CFLAGS-w_j0f128.c += -fno-builtin-j0f64x
+CFLAGS-w_j1f128.c += -fno-builtin-j1f64x
+CFLAGS-w_jnf128.c += -fno-builtin-jnf64x
+CFLAGS-s_ldexpf128.c += -fno-builtin-ldexpf64x
+CFLAGS-w_lgammaf128.c += -fno-builtin-lgammaf64x
+CFLAGS-w_lgammaf128_r.c += -fno-builtin-lgammaf64x_r
+CFLAGS-w_llogbf128.c += -fno-builtin-llogbf64x
+CFLAGS-s_llrintf128.c += -fno-builtin-llrintf64x
+CFLAGS-s_llroundf128.c += -fno-builtin-llroundf64x
+CFLAGS-e_logf128.c += -fno-builtin-logf64x
+CFLAGS-w_log10f128.c += -fno-builtin-log10f64x
+CFLAGS-w_log1pf128.c += -fno-builtin-log1pf64x
+CFLAGS-e_log2f128.c += -fno-builtin-log2f64x
+CFLAGS-s_logbf128.c += -fno-builtin-logbf64x
+CFLAGS-s_lrintf128.c += -fno-builtin-lrintf64x
+CFLAGS-s_lroundf128.c += -fno-builtin-lroundf64x
+CFLAGS-s_modff128.c += -fno-builtin-modff64x
+CFLAGS-s_nanf128.c += -fno-builtin-nanf64x
+CFLAGS-s_nearbyintf128.c += -fno-builtin-nearbyintf64x
+CFLAGS-s_nextafterf128.c += -fno-builtin-nextafterf64x
+CFLAGS-s_nextdownf128.c += -fno-builtin-nextdownf64x
+CFLAGS-s_nextupf128.c += -fno-builtin-nextupf64x
+CFLAGS-e_powf128.c += -fno-builtin-powf64x
+CFLAGS-w_remainderf128.c += -fno-builtin-remainderf64x
+CFLAGS-s_remquof128.c += -fno-builtin-remquof64x
+CFLAGS-s_rintf128.c += -fno-builtin-rintf64x
+CFLAGS-s_roundf128.c += -fno-builtin-roundf64x
+CFLAGS-s_roundevenf128.c += -fno-builtin-roundevenf64x
+CFLAGS-w_scalblnf128.c += -fno-builtin-scalblnf64x
+CFLAGS-s_scalbnf128.c += -fno-builtin-scalbnf64x
+CFLAGS-s_setpayloadf128.c += -fno-builtin-setpayloadf64x
+CFLAGS-s_setpayloadsigf128.c += -fno-builtin-setpayloadsigf64x
+CFLAGS-s_sinf128.c += -fno-builtin-sinf64x
+CFLAGS-s_sincosf128.c += -fno-builtin-sincosf64x
+CFLAGS-w_sinhf128.c += -fno-builtin-sinhf64x
+CFLAGS-w_sqrtf128.c += -fno-builtin-sqrtf64x
+CFLAGS-s_tanf128.c += -fno-builtin-tanf64x
+CFLAGS-s_tanhf128.c += -fno-builtin-tanhf64x
+CFLAGS-w_tgammaf128.c += -fno-builtin-tgammaf64x
+CFLAGS-s_totalorderf128.c += -fno-builtin-totalorderf64x
+CFLAGS-s_totalordermagf128.c += -fno-builtin-totalordermagf64x
+CFLAGS-s_truncf128.c += -fno-builtin-truncf64x
+CFLAGS-s_ufromfpf128.c += -fno-builtin-ufromfpf64x
+CFLAGS-s_ufromfpxf128.c += -fno-builtin-ufromfpxf64x
+CFLAGS-s_y0f128.c += -fno-builtin-y0f64x
+CFLAGS-s_y1f128.c += -fno-builtin-y1f64x
+CFLAGS-s_ynf128.c += -fno-builtin-ynf64x
+endif
endif # enable-float128