powerpc64le: add -mno-gnu-attribute to *f128 objects and difftime

In practice, this flag should be applied globally, but it makes a good
sanity check to ensure ibm128 and ieee128 long double files are not
getting mismatched.  _Float128 files use no long double, thus are
always safe to use this option.

Similarly, when investigating the linker complaints, difftime
makes trivial, self contained, usage of long double, so thus it
is also explicitly marked as such.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
This commit is contained in:
Paul E. Murphy 2020-02-07 14:08:01 -06:00
parent 3618e5fece
commit 39517c008f
2 changed files with 16 additions and 9 deletions

View File

@ -4,8 +4,10 @@
# Bootstrapping code for enabling IEEE 128. This can be removed and # Bootstrapping code for enabling IEEE 128. This can be removed and
# any indirections simplified once IEEE 128 long double is enabled. # any indirections simplified once IEEE 128 long double is enabled.
type-ldouble-CFLAGS = type-ldouble-CFLAGS =
no-gnu-attribute-CFLAGS =
ifeq ($(ibm128-fcts),yes) ifeq ($(ibm128-fcts),yes)
type-ldouble-CFLAGS += -mabi=ibmlongdouble type-ldouble-CFLAGS += -mabi=ibmlongdouble
no-gnu-attribute-CFLAGS = -mno-gnu-attribute
endif endif
ifeq ($(subdir),math) ifeq ($(subdir),math)
@ -13,8 +15,9 @@ ifeq ($(subdir),math)
CPPFLAGS += -I../soft-fp CPPFLAGS += -I../soft-fp
# float128 requires adding a handful of extra flags. # float128 requires adding a handful of extra flags.
$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 # Similarly, disable
$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
$(foreach suf,$(all-object-suffixes),%f128_r$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
$(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),$(objpfx)test-float128%$(suf)): CFLAGS += -mfloat128
$(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),$(objpfx)test-float64x%$(suf)): CFLAGS += -mfloat128
# Pairs of types with _Float128 / _Float64x as the wider type but not # Pairs of types with _Float128 / _Float64x as the wider type but not
@ -69,11 +72,11 @@ endif
# Append flags to string <-> _Float128 routines. # Append flags to string <-> _Float128 routines.
ifneq ($(filter $(subdir),wcsmbs stdlib),) ifneq ($(filter $(subdir),wcsmbs stdlib),)
$(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),%f128$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
$(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),%f128_l$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
$(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),%f128_nan$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
$(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),%float1282mpn$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
$(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128 $(foreach suf,$(all-object-suffixes),%mpn2float128$(suf)): CFLAGS += -mfloat128 $(no-gnu-attribute-CFLAGS)
CFLAGS-bug-strtod.c += -mfloat128 CFLAGS-bug-strtod.c += -mfloat128
CFLAGS-bug-strtod2.c += -mfloat128 CFLAGS-bug-strtod2.c += -mfloat128
CFLAGS-tst-strtod-round.c += -mfloat128 CFLAGS-tst-strtod-round.c += -mfloat128
@ -108,6 +111,10 @@ CFLAGS-printf_fphex.c = -mfloat128
CFLAGS-printf_size.c = -mfloat128 CFLAGS-printf_size.c = -mfloat128
endif endif
# Disable linker noise on files using ieee128 long double internally
ifeq ($(subdir),time)
CFLAGS-difftime.c += $(no-gnu-attribute-CFLAGS)
endif
$(foreach suf,$(all-object-suffixes),$(objpfx)nldbl-%$(suf)): \ $(foreach suf,$(all-object-suffixes),$(objpfx)nldbl-%$(suf)): \
CFLAGS += $(type-ldouble-CFLAGS) CFLAGS += $(type-ldouble-CFLAGS)

View File

@ -1,6 +1,6 @@
ifeq ($(subdir),math) ifeq ($(subdir),math)
libm-sysdep_routines += w_sqrtf128-power9 w_sqrtf128-ppc64le libm-sysdep_routines += w_sqrtf128-power9 w_sqrtf128-ppc64le
CFLAGS-w_sqrtf128-ppc64le.c += -mfloat128 CFLAGS-w_sqrtf128-ppc64le.c += -mfloat128 $(no-gnu-attribute-CFLAGS)
CFLAGS-w_sqrtf128-power9.c += -mfloat128 -mcpu=power9 CFLAGS-w_sqrtf128-power9.c += -mfloat128 -mcpu=power9 $(no-gnu-attribute-CFLAGS)
endif endif