From 051be01f6b41a1466b07ae4bd7f5894a8ec5fe67 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Thu, 11 Jul 2019 11:48:28 -0300 Subject: powerpc64le: Enable support for IEEE long double On platforms where long double may have two different formats, i.e.: the same format as double (64-bits) or something else (128-bits), building with -mlong-double-128 is the default and function calls in the user program match the name of the function in Glibc. When building with -mlong-double-64, Glibc installed headers redirect such calls to the appropriate function. Likewise, the internals of glibc are now built against IEEE long double. However, the only (minimally) notable usage of long double is difftime. Reviewed-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/fpu/libm-test-ulps | 4 ++++ sysdeps/powerpc/powerpc64/le/Implies-before | 1 + sysdeps/powerpc/powerpc64/le/Makefile | 4 ++++ 3 files changed, 9 insertions(+) (limited to 'sysdeps/powerpc') diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps index 1c989e020f..cd2a5fed45 100644 --- a/sysdeps/powerpc/fpu/libm-test-ulps +++ b/sysdeps/powerpc/fpu/libm-test-ulps @@ -1266,21 +1266,25 @@ ldouble: 1 Function: "gamma": double: 3 float: 4 +float128: 5 ldouble: 3 Function: "gamma_downward": double: 4 float: 4 +float128: 8 ldouble: 15 Function: "gamma_towardzero": double: 4 float: 3 +float128: 5 ldouble: 16 Function: "gamma_upward": double: 4 float: 5 +float128: 8 ldouble: 11 Function: "hypot": diff --git a/sysdeps/powerpc/powerpc64/le/Implies-before b/sysdeps/powerpc/powerpc64/le/Implies-before index 7c20db4e97..2139f4dae8 100644 --- a/sysdeps/powerpc/powerpc64/le/Implies-before +++ b/sysdeps/powerpc/powerpc64/le/Implies-before @@ -1,4 +1,5 @@ # On PowerPC we use the IBM extended long double format. +ieee754/ldbl-128ibm-compat ieee754/ldbl-128ibm ieee754/ldbl-opt ieee754/dbl-64 diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile index 6afa1228dd..05ab13d85c 100644 --- a/sysdeps/powerpc/powerpc64/le/Makefile +++ b/sysdeps/powerpc/powerpc64/le/Makefile @@ -20,6 +20,10 @@ no-gnu-attribute-CFLAGS = -mno-gnu-attribute # We built an object file and extract the desired .gnu.attributes section # to be inserted into lib{c,m}.so. ifeq ($(build-shared),yes) + +# Build everything with IEEE 128-bit long double. +sysdep-CFLAGS += -mabi=ieeelongdouble -Wno-psabi $(no-gnu-attribute-CFLAGS) + before-compile += $(common-objpfx)no_ldbl_gnu_attribute.bin $(common-objpfx)no_ldbl_gnu_attribute.bin: $(..)sysdeps/powerpc/powerpc64/le/no_ldbl_gnu_attribute.c -- cgit 1.4.1