glibc/sysdeps/ieee754/ldbl-128/Makefile
Joseph Myers f66780ba46 Fix build with GCC 13 _FloatN, _FloatNx built-in functions
GCC 13 has added more _FloatN and _FloatNx versions of existing
<math.h> and <complex.h> built-in functions, for use in libstdc++-v3.

This breaks the glibc build because of how those functions are defined
as aliases to functions with the same ABI but different types.  Add
appropriate -fno-builtin-* options for compiling relevant files, as
already done for the case of long double functions aliasing double
ones and based on the list of files used there.

I fixed some mistakes in that list of double files that I noticed
while implementing this fix, but there may well be more such
(harmless) cases, in this list or the new one (files that don't
actually exist or don't define the named functions as aliases so don't
need the options).  I did try to exclude cases where glibc doesn't
define certain functions for _FloatN or _FloatNx types at all from the
new uses of -fno-builtin-* options.  As with the options for double
files (see the commit message for commit
49348beafe, "Fix build with GCC 10 when
long double = double."), it's deliberate that the options are used
even if GCC currently doesn't have a built-in version of a given
functions, so providing some level of future-proofing against more
such built-in functions being added in future.

Tested with build-many-glibcs.py for aarch64-linux-gnu
powerpc-linux-gnu powerpc64le-linux-gnu x86_64-linux-gnu (compilers
and glibcs builds) with GCC mainline.
2022-10-31 23:20:08 +00:00

129 lines
8.4 KiB
Makefile

long-double-fcts = yes
ifeq ($(subdir),math)
CFLAGS-w_acosl.c += -fno-builtin-acosf64x -fno-builtin-acosf128
CFLAGS-w_acoshl.c += -fno-builtin-acoshf64x -fno-builtin-acoshf128
CFLAGS-w_asinl.c += -fno-builtin-asinf64x -fno-builtin-asinf128
CFLAGS-s_asinhl.c += -fno-builtin-asinhf64x -fno-builtin-asinhf128
CFLAGS-s_atanl.c += -fno-builtin-atanf64x -fno-builtin-atanf128
CFLAGS-w_atan2l.c += -fno-builtin-atan2f64x -fno-builtin-atan2f128
CFLAGS-w_atanhl.c += -fno-builtin-atanhf64x -fno-builtin-atanhf128
CFLAGS-s_cabsl.c += -fno-builtin-cabsf64x -fno-builtin-cabsf128
CFLAGS-s_cacosl.c += -fno-builtin-cacosf64x -fno-builtin-cacosf128
CFLAGS-s_cacoshl.c += -fno-builtin-cacoshf64x -fno-builtin-cacoshf128
CFLAGS-s_canonicalizel.c += -fno-builtin-canonicalizef64x -fno-builtin-canonicalizef128
CFLAGS-s_cargl.c += -fno-builtin-cargf64x -fno-builtin-cargf128
CFLAGS-s_casinl.c += -fno-builtin-casinf64x -fno-builtin-casinf128
CFLAGS-s_casinhl.c += -fno-builtin-casinhf64x -fno-builtin-casinhf128
CFLAGS-s_catanl.c += -fno-builtin-catanf64x -fno-builtin-catanf128
CFLAGS-s_catanhl.c += -fno-builtin-catanhf64x -fno-builtin-catanhf128
CFLAGS-s_cbrtl.c += -fno-builtin-cbrtf64x -fno-builtin-cbrtf128
CFLAGS-s_ccosl.c += -fno-builtin-ccosf64x -fno-builtin-ccosf128
CFLAGS-s_ccoshl.c += -fno-builtin-ccoshf64x -fno-builtin-ccoshf128
CFLAGS-s_ceill.c += -fno-builtin-ceilf64x -fno-builtin-ceilf128
CFLAGS-s_cexpl.c += -fno-builtin-cexpf64x -fno-builtin-cexpf128
CFLAGS-s_cimagl.c += -fno-builtin-cimagf64x -fno-builtin-cimagf128
CFLAGS-s_clogl.c += -fno-builtin-clogf64x -fno-builtin-clogf128
CFLAGS-s_clog10l.c += -fno-builtin-clog10f64x -fno-builtin-clog10f128
CFLAGS-s_conjl.c += -fno-builtin-conjf64x -fno-builtin-conjf128
CFLAGS-s_copysignl.c += -fno-builtin-copysignf64x -fno-builtin-copysignf128
CFLAGS-s_cosl.c += -fno-builtin-cosf64x -fno-builtin-cosf128
CFLAGS-w_coshl.c += -fno-builtin-coshf64x -fno-builtin-coshf128
CFLAGS-s_cpowl.c += -fno-builtin-cpowf64x -fno-builtin-cpowf128
CFLAGS-s_cprojl.c += -fno-builtin-cprojf64x -fno-builtin-cprojf128
CFLAGS-s_creall.c += -fno-builtin-crealf64x -fno-builtin-crealf128
CFLAGS-s_csinl.c += -fno-builtin-csinf64x -fno-builtin-csinf128
CFLAGS-s_csinhl.c += -fno-builtin-csinhf64x -fno-builtin-csinhf128
CFLAGS-s_csqrtl.c += -fno-builtin-csqrtf64x -fno-builtin-csqrtf128
CFLAGS-s_ctanl.c += -fno-builtin-ctanf64x -fno-builtin-ctanf128
CFLAGS-s_ctanhl.c += -fno-builtin-ctanhf64x -fno-builtin-ctanhf128
CFLAGS-s_daddl.c += -fno-builtin-f64addf64x -fno-builtin-f64addf128
CFLAGS-s_ddivl.c += -fno-builtin-f64divf64x -fno-builtin-f64divf128
CFLAGS-s_dfmal.c += -fno-builtin-f64fmaf64x -fno-builtin-f64fmaf128
CFLAGS-s_dmull.c += -fno-builtin-f64mulf64x -fno-builtin-f64mulf128
CFLAGS-s_dsqrtl.c += -fno-builtin-f64sqrtf64x -fno-builtin-f64sqrtf128
CFLAGS-s_dsubl.c += -fno-builtin-f64subf64x -fno-builtin-f64subf128
CFLAGS-s_erfl.c += -fno-builtin-erff64x -fno-builtin-erff128
CFLAGS-s_erfcl.c += -fno-builtin-erfcf64x -fno-builtin-erfcf128
CFLAGS-e_expl.c += -fno-builtin-expf64x -fno-builtin-expf128
CFLAGS-w_exp10l.c += -fno-builtin-exp10f64x -fno-builtin-exp10f128
CFLAGS-e_exp2l.c += -fno-builtin-exp2f64x -fno-builtin-exp2f128
CFLAGS-s_expm1l.c += -fno-builtin-expm1f64x -fno-builtin-expm1f128
CFLAGS-s_fabsl.c += -fno-builtin-fabsf64x -fno-builtin-fabsf128
CFLAGS-s_faddl.c += -fno-builtin-f32addf64x -fno-builtin-f32addf128
CFLAGS-s_fdiml.c += -fno-builtin-fdimf64x -fno-builtin-fdimf128
CFLAGS-s_fdivl.c += -fno-builtin-f32divf64x -fno-builtin-f32divf128
CFLAGS-s_ffmal.c += -fno-builtin-f32fmaf64x -fno-builtin-f32fmaf128
CFLAGS-s_floorl.c += -fno-builtin-floorf64x -fno-builtin-floorf128
CFLAGS-s_fmal.c += -fno-builtin-fmaf64x -fno-builtin-fmaf128
CFLAGS-s_fmaxl.c += -fno-builtin-fmaxf64x -fno-builtin-fmaxf128
CFLAGS-s_fmaximuml.c += -fno-builtin-fmaximumf64x -fno-builtin-fmaximumf128
CFLAGS-s_fmaximum_magl.c += -fno-builtin-fmaximum_magf64x -fno-builtin-fmaximum_magf128
CFLAGS-s_fmaximum_mag_numl.c += -fno-builtin-fmaximum_mag_numf64x -fno-builtin-fmaximum_mag_numf128
CFLAGS-s_fmaximum_numl.c += -fno-builtin-fmaximum_numf64x -fno-builtin-fmaximum_numf128
CFLAGS-s_fmaxmagl.c += -fno-builtin-fmaxmagf64x -fno-builtin-fmaxmagf128
CFLAGS-s_fminl.c += -fno-builtin-fminf64x -fno-builtin-fminf128
CFLAGS-s_fminimuml.c += -fno-builtin-fminimumf64x -fno-builtin-fminimumf128
CFLAGS-s_fminimum_magl.c += -fno-builtin-fminimum_magf64x -fno-builtin-fminimum_magf128
CFLAGS-s_fminimum_mag_numl.c += -fno-builtin-fminimum_mag_numf64x -fno-builtin-fminimum_mag_numf128
CFLAGS-s_fminimum_numl.c += -fno-builtin-fminimum_numf64x -fno-builtin-fminimum_numf128
CFLAGS-s_fminmagl.c += -fno-builtin-fminmagf64x -fno-builtin-fminmagf128
CFLAGS-w_fmodl.c += -fno-builtin-fmodf64x -fno-builtin-fmodf128
CFLAGS-s_fmull.c += -fno-builtin-f32mulf64x -fno-builtin-f32mulf128
CFLAGS-s_frexpl.c += -fno-builtin-frexpf64x -fno-builtin-frexpf128
CFLAGS-s_fromfpl.c += -fno-builtin-fromfpf64x -fno-builtin-fromfpf128
CFLAGS-s_fromfpxl.c += -fno-builtin-fromfpxf64x -fno-builtin-fromfpxf128
CFLAGS-s_fsqrtl.c += -fno-builtin-f32sqrtf64x -fno-builtin-f32sqrtf128
CFLAGS-s_fsubl.c += -fno-builtin-f32subf64x -fno-builtin-f32subf128
CFLAGS-s_getpayloadl.c += -fno-builtin-getpayloadf64x -fno-builtin-getpayloadf128
CFLAGS-w_hypotl.c += -fno-builtin-hypotf64x -fno-builtin-hypotf128
CFLAGS-w_ilogbl.c += -fno-builtin-ilogbf64x -fno-builtin-ilogbf128
CFLAGS-w_j0l.c += -fno-builtin-j0f64x -fno-builtin-j0f128
CFLAGS-w_j1l.c += -fno-builtin-j1f64x -fno-builtin-j1f128
CFLAGS-w_jnl.c += -fno-builtin-jnf64x -fno-builtin-jnf128
CFLAGS-s_ldexpl.c += -fno-builtin-ldexpf64x -fno-builtin-ldexpf128
CFLAGS-w_lgammal.c += -fno-builtin-lgammaf64x -fno-builtin-lgammaf128
CFLAGS-w_lgammal_r.c += -fno-builtin-lgammaf64x_r
CFLAGS-w_llogbl.c += -fno-builtin-llogbf64x -fno-builtin-llogbf128
CFLAGS-s_llrintl.c += -fno-builtin-llrintf64x -fno-builtin-llrintf128
CFLAGS-s_llroundl.c += -fno-builtin-llroundf64x -fno-builtin-llroundf128
CFLAGS-e_logl.c += -fno-builtin-logf64x -fno-builtin-logf128
CFLAGS-w_log10l.c += -fno-builtin-log10f64x -fno-builtin-log10f128
CFLAGS-w_log1pl.c += -fno-builtin-log1pf64x -fno-builtin-log1pf128
CFLAGS-e_log2l.c += -fno-builtin-log2f64x -fno-builtin-log2f128
CFLAGS-s_logbl.c += -fno-builtin-logbf64x -fno-builtin-logbf128
CFLAGS-s_lrintl.c += -fno-builtin-lrintf64x -fno-builtin-lrintf128
CFLAGS-s_lroundl.c += -fno-builtin-lroundf64x -fno-builtin-lroundf128
CFLAGS-s_modfl.c += -fno-builtin-modff64x -fno-builtin-modff128
CFLAGS-s_nanl.c += -fno-builtin-nanf64x -fno-builtin-nanf128
CFLAGS-s_nearbyintl.c += -fno-builtin-nearbyintf64x -fno-builtin-nearbyintf128
CFLAGS-s_nextafterl.c += -fno-builtin-nextafterf64x -fno-builtin-nextafterf128
CFLAGS-s_nextdownl.c += -fno-builtin-nextdownf64x -fno-builtin-nextdownf128
CFLAGS-s_nextupl.c += -fno-builtin-nextupf64x -fno-builtin-nextupf128
CFLAGS-e_powl.c += -fno-builtin-powf64x -fno-builtin-powf128
CFLAGS-w_remainderl.c += -fno-builtin-remainderf64x -fno-builtin-remainderf128
CFLAGS-s_remquol.c += -fno-builtin-remquof64x -fno-builtin-remquof128
CFLAGS-s_rintl.c += -fno-builtin-rintf64x -fno-builtin-rintf128
CFLAGS-s_roundl.c += -fno-builtin-roundf64x -fno-builtin-roundf128
CFLAGS-s_roundevenl.c += -fno-builtin-roundevenf64x -fno-builtin-roundevenf128
CFLAGS-w_scalblnl.c += -fno-builtin-scalblnf64x -fno-builtin-scalblnf128
CFLAGS-s_scalbnl.c += -fno-builtin-scalbnf64x -fno-builtin-scalbnf128
CFLAGS-s_setpayloadl.c += -fno-builtin-setpayloadf64x -fno-builtin-setpayloadf128
CFLAGS-s_setpayloadsigl.c += -fno-builtin-setpayloadsigf64x -fno-builtin-setpayloadsigf128
CFLAGS-s_sinl.c += -fno-builtin-sinf64x -fno-builtin-sinf128
CFLAGS-s_sincosl.c += -fno-builtin-sincosf64x -fno-builtin-sincosf128
CFLAGS-w_sinhl.c += -fno-builtin-sinhf64x -fno-builtin-sinhf128
CFLAGS-w_sqrtl.c += -fno-builtin-sqrtf64x -fno-builtin-sqrtf128
CFLAGS-s_tanl.c += -fno-builtin-tanf64x -fno-builtin-tanf128
CFLAGS-s_tanhl.c += -fno-builtin-tanhf64x -fno-builtin-tanhf128
CFLAGS-w_tgammal.c += -fno-builtin-tgammaf64x -fno-builtin-tgammaf128
CFLAGS-s_totalorderl.c += -fno-builtin-totalorderf64x -fno-builtin-totalorderf128
CFLAGS-s_totalordermagl.c += -fno-builtin-totalordermagf64x -fno-builtin-totalordermagf128
CFLAGS-s_truncl.c += -fno-builtin-truncf64x -fno-builtin-truncf128
CFLAGS-s_ufromfpl.c += -fno-builtin-ufromfpf64x -fno-builtin-ufromfpf128
CFLAGS-s_ufromfpxl.c += -fno-builtin-ufromfpxf64x -fno-builtin-ufromfpxf128
CFLAGS-s_y0l.c += -fno-builtin-y0f64x -fno-builtin-y0f128
CFLAGS-s_y1l.c += -fno-builtin-y1f64x -fno-builtin-y1f128
CFLAGS-s_ynl.c += -fno-builtin-ynf64x -fno-builtin-ynf128
endif