aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabrielftg@linux.ibm.com>2019-07-11 11:48:28 -0300
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-04-30 08:52:08 -0500
commit051be01f6b41a1466b07ae4bd7f5894a8ec5fe67 (patch)
treeed6a5039071b23a77ff5f7f52570bff2b1023da2 /sysdeps/powerpc
parent5c7ccc29830fb59d39d67222caca5b4bd6ca2e0f (diff)
downloadglibc-051be01f6b41a1466b07ae4bd7f5894a8ec5fe67.zip
glibc-051be01f6b41a1466b07ae4bd7f5894a8ec5fe67.tar.gz
glibc-051be01f6b41a1466b07ae4bd7f5894a8ec5fe67.tar.bz2
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 <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/fpu/libm-test-ulps4
-rw-r--r--sysdeps/powerpc/powerpc64/le/Implies-before1
-rw-r--r--sysdeps/powerpc/powerpc64/le/Makefile4
3 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index 1c989e0..cd2a5fe 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 7c20db4..2139f4d 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 6afa122..05ab13d 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