|
Packit |
6c4009 |
# When building float128 we need to ensure -mfloat128 is
|
|
Packit |
6c4009 |
# passed to all such object files.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# libgcc requires __tcb_parse_hwcap_and_convert_at_platform when built with
|
|
Packit |
6c4009 |
# a binary128 type. That symbol is provided by the loader on dynamically
|
|
Packit |
6c4009 |
# linked executables, forcing to link the loader after libgcc link.
|
|
Packit |
6c4009 |
f128-loader-link = $(as-needed) $(elf-objpfx)ld.so $(no-as-needed)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ifeq ($(subdir),math)
|
|
Packit |
6c4009 |
# sqrtf128 requires emulation before POWER9.
|
|
Packit |
6c4009 |
CPPFLAGS += -I../soft-fp
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# float128 requires adding a handful of extra flags.
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat128%$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),$(objpfx)test-ifloat64x%$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
# Pairs of types with _Float128 / _Float64x as the wider type but not
|
|
Packit |
6c4009 |
# the narrower one.
|
|
Packit |
6c4009 |
f128-pairs = float32-float64x float32-float128 float64-float64x \
|
|
Packit |
6c4009 |
float64-float128 float32x-float64x float32x-float128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),$(foreach pair,$(f128-pairs),$(objpfx)test-$(pair)%$(suf))): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-libm-test-support-float128.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-libm-test-support-float64x.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-test-math-iscanonical.cc += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-test-math-iseqsig.cc += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-test-math-issignaling.cc += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-test-math-iszero.cc += -mfloat128
|
|
Packit |
6c4009 |
$(foreach test, \
|
|
Packit |
6c4009 |
test-float128% test-ifloat128% test-float64x% test-ifloat64x% \
|
|
Packit |
6c4009 |
$(foreach pair,$(f128-pairs),test-$(pair)%) \
|
|
Packit |
6c4009 |
test-math-iscanonical test-math-iseqsig test-math-issignaling \
|
|
Packit |
6c4009 |
test-math-iszero, \
|
|
Packit |
6c4009 |
$(objpfx)$(test)): \
|
|
Packit |
6c4009 |
gnulib-tests += $(f128-loader-link)
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Append flags to string <-> _Float128 routines.
|
|
Packit |
6c4009 |
ifneq ($(filter $(subdir),wcsmbs stdlib),)
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-bug-strtod.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-bug-strtod2.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-strtod-round.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-wcstod-round.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-strtod-nan-locale.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-wcstod-nan-locale.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-strtod6.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-strfrom.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-strfrom-locale.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-strfrom-skeleton.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-strtod-nan-sign.c += -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-tst-wcstod-nan-sign.c += -mfloat128
|
|
Packit |
6c4009 |
$(foreach test,bug-strtod bug-strtod2 bug-strtod2 tst-strtod-round \
|
|
Packit |
6c4009 |
tst-wcstod-round tst-strtod6 tst-strrom tst-strfrom-locale \
|
|
Packit |
6c4009 |
tst-strtod-nan-locale tst-wcstod-nan-locale \
|
|
Packit |
6c4009 |
strfrom-skeleton tst-strtod-nan-sign tst-wcstod-nan-sign, \
|
|
Packit |
6c4009 |
$(objpfx)$(test)): gnulib-tests += $(f128-loader-link)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# When building glibc with support for _Float128, the powers of ten tables in
|
|
Packit |
6c4009 |
# fpioconst.c and in the string conversion functions must be extended. Some
|
|
Packit |
6c4009 |
# Makefiles (e.g.: wcsmbs/Makefile) override CFLAGS defined by the Makefiles in
|
|
Packit |
6c4009 |
# sysdeps. This is avoided with the use sysdep-CFLAGS instead of CFLAGS.
|
|
Packit |
6c4009 |
sysdep-CFLAGS += $(sysdep-CFLAGS-$(
|
|
Packit |
6c4009 |
sysdep-CFLAGS-fpioconst.c += -mfloat128
|
|
Packit |
6c4009 |
sysdep-CFLAGS-strtod_l.c += -mfloat128
|
|
Packit |
6c4009 |
sysdep-CFLAGS-strtof_l.c += -mfloat128
|
|
Packit |
6c4009 |
sysdep-CFLAGS-strtold_l.c += -mfloat128
|
|
Packit |
6c4009 |
sysdep-CFLAGS-wcstod_l.c += -mfloat128
|
|
Packit |
6c4009 |
sysdep-CFLAGS-wcstof_l.c += -mfloat128
|
|
Packit |
6c4009 |
sysdep-CFLAGS-wcstold_l.c += -mfloat128
|
|
Packit |
6c4009 |
endif
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
# Append flags to printf routines.
|
|
Packit |
6c4009 |
ifeq ($(subdir),stdio-common)
|
|
Packit |
6c4009 |
CFLAGS-printf_fp.c = -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-printf_fphex.c = -mfloat128
|
|
Packit |
6c4009 |
CFLAGS-printf_size.c = -mfloat128
|
|
Packit |
6c4009 |
endif
|