diff options
author | Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> | 2018-06-28 15:17:42 +0530 |
---|---|---|
committer | Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> | 2019-12-03 13:30:37 -0300 |
commit | 66fa30828a1eb3d96cb92c080fa0b7376bda9b11 (patch) | |
tree | 47caacec459b8a73f24d3d6eb304db3b57dde8d8 /sysdeps/ieee754/ldbl-128ibm-compat/Makefile | |
parent | 5d39f37b260a98cfcc5ac312817ce8de534c00b1 (diff) | |
download | glibc-66fa30828a1eb3d96cb92c080fa0b7376bda9b11.tar.gz glibc-66fa30828a1eb3d96cb92c080fa0b7376bda9b11.tar.xz glibc-66fa30828a1eb3d96cb92c080fa0b7376bda9b11.zip |
ldbl-128ibm-compat: Add strfmon_l with IEEE long double format
Similarly to what has been done for printf-like functions, more specifically to the internal implementation in __vfprintf_internal, this patch extends __vstrfmon_l_internal to deal with long double values with binary128 format (as a third format option and reusing the float128 implementation). Tested for powerpc64le, powerpc64, x86_64, and with build-many-glibcs. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm-compat/Makefile')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm-compat/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile index 61f47f2f83..6ec0739b4c 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile +++ b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile @@ -214,6 +214,18 @@ CFLAGS-test-syslog-chk-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi CFLAGS-test-syslog-chk-ibm128.c += -mabi=ibmlongdouble -Wno-psabi endif +ifeq ($(subdir),stdlib) +ldbl-extra-routines += strfmon strfmon_l + +# Printing long double values with IEEE binary128 format reuses part +# of the internal float128 implementation (__printf_fp, __printf_fphex, +# and __float128 variables and union members). Thus, the compilation of +# the following files, must have -mfloat128 passed to the compiler. +# Also, guarantee that they are compiled in IBM long double mode. +CFLAGS-strfmon.c += -mfloat128 -mabi=ibmlongdouble +CFLAGS-strfmon_l.c += -mfloat128 -mabi=ibmlongdouble +endif + # Add IEEE binary128 files as make targets. routines += $(foreach r,$(ldbl-extra-routines),ieee128-$(r)) |