summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/le
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/powerpc64/le
parent5c7ccc29830fb59d39d67222caca5b4bd6ca2e0f (diff)
downloadglibc-051be01f6b41a1466b07ae4bd7f5894a8ec5fe67.tar.gz
glibc-051be01f6b41a1466b07ae4bd7f5894a8ec5fe67.tar.xz
glibc-051be01f6b41a1466b07ae4bd7f5894a8ec5fe67.zip
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/powerpc64/le')
-rw-r--r--sysdeps/powerpc/powerpc64/le/Implies-before1
-rw-r--r--sysdeps/powerpc/powerpc64/le/Makefile4
2 files changed, 5 insertions, 0 deletions
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