From 6f82d05034178eee756dfe09472948130748ad39 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Fri, 7 Feb 2020 14:08:12 -0600 Subject: powerpc64le: Enforce -mabi=ibmlongdouble when -mfloat128 used I have observed a bug on 7.4.0 whereby __mulkc3 calls are swapped with __multc3 depending on ABI selection. For the sake of being overly cautious, build all _Float128 files with ibm128 to workaround these compilers. This has been noted in GCC BZ 84914, and will not be fixed for GCC 7. Likewise, non-math files built with _Float128 are assumed to have ibm long double. Explicilty preserve this assumption. Finally, add some bootstrapping code to avoid applying these options until IEEE long double is enabled as they require GCC 7 and above. Reviewed-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile') diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile index 6fb9eb3a98..8747b02127 100644 --- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile @@ -2,9 +2,9 @@ ifeq ($(subdir),math) libm-sysdep_routines += s_fmaf128-ppc64 s_fmaf128-power9 \ w_sqrtf128-power9 w_sqrtf128-ppc64le -CFLAGS-s_fmaf128-ppc64.c += -mfloat128 $(no-gnu-attribute-CFLAGS) -CFLAGS-s_fmaf128-power9.c += -mfloat128 -mcpu=power9 $(no-gnu-attribute-CFLAGS) +CFLAGS-s_fmaf128-ppc64.c += $(type-float128-CFLAGS) $(no-gnu-attribute-CFLAGS) +CFLAGS-s_fmaf128-power9.c += $(type-float128-CFLAGS) -mcpu=power9 $(no-gnu-attribute-CFLAGS) -CFLAGS-w_sqrtf128-ppc64le.c += -mfloat128 $(no-gnu-attribute-CFLAGS) -CFLAGS-w_sqrtf128-power9.c += -mfloat128 -mcpu=power9 $(no-gnu-attribute-CFLAGS) +CFLAGS-w_sqrtf128-ppc64le.c += $(type-float128-CFLAGS) $(no-gnu-attribute-CFLAGS) +CFLAGS-w_sqrtf128-power9.c += $(type-float128-CFLAGS) -mcpu=power9 $(no-gnu-attribute-CFLAGS) endif -- cgit 1.4.1