diff mbox series

[v2,12/30] ldbl-128ibm-compat: Reuse tests for err.h and error.h functions

Message ID 20191025153410.15405-13-gabriel@inconstante.net.br
State New
Headers show
Series Add IEEE long double <-> string functions for powerpc64le | expand

Commit Message

Gabriel F. T. Gomes Oct. 25, 2019, 3:33 p.m. UTC
From: "Gabriel F. T. Gomes" <gabrielftg@linux.ibm.com>

No changes since v1.

-- 8< --
Commit IDs 9771e6cb5102 and 7597b0c7f711 added tests for the functions
from err.h and error.h that can take long double parameters.
Afterwards, commit ID f0eaf8627654 reused them on architectures that
changed the long double format from the same as double to something else
(i.e.: architectures that imply ldbl-opt).  This patch reuses it again
for IEEE long double on powerpc64le.

Tested for powerpc64le.
---
 sysdeps/ieee754/ldbl-128ibm-compat/Makefile | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Paul E Murphy Nov. 8, 2019, 10:25 p.m. UTC | #1
On 10/25/19 10:33 AM, Gabriel F. T. Gomes wrote:
> From: "Gabriel F. T. Gomes" <gabrielftg@linux.ibm.com>
> 
> No changes since v1.
> 
> -- 8< --
> Commit IDs 9771e6cb5102 and 7597b0c7f711 added tests for the functions
> from err.h and error.h that can take long double parameters.
> Afterwards, commit ID f0eaf8627654 reused them on architectures that
> changed the long double format from the same as double to something else
> (i.e.: architectures that imply ldbl-opt).  This patch reuses it again
> for IEEE long double on powerpc64le.
> 
> Tested for powerpc64le.
> ---
>   sysdeps/ieee754/ldbl-128ibm-compat/Makefile | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
> 
> diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
> index a09209a2dd..ed0e2ec098 100644
> --- a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
> +++ b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
> @@ -177,6 +177,21 @@ endif
>   ifeq ($(subdir),misc)
>   ldbl-extra-routines += err \
>   		       error
> +
> +tests-internal += tst-ibm128-warn tst-ieee128-warn
> +tests-internal += tst-ibm128-error tst-ieee128-error
> +
> +$(objpfx)tst-ibm128-%.c: tst-ldbl-%.c
> +	cp $< $@
> +
> +$(objpfx)tst-ieee128-%.c: tst-ldbl-%.c
> +	cp $< $@
> +
> +CFLAGS-tst-ibm128-warn.c += -mabi=ibmlongdouble -Wno-psabi
> +CFLAGS-tst-ibm128-error.c += -mabi=ibmlongdouble -Wno-psabi
> +
> +CFLAGS-tst-ieee128-warn.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi
> +CFLAGS-tst-ieee128-error.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi
>   endif
> 
>   # Add IEEE binary128 files as make targets.
> 

OK.
diff mbox series

Patch

diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
index a09209a2dd..ed0e2ec098 100644
--- a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
+++ b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile
@@ -177,6 +177,21 @@  endif
 ifeq ($(subdir),misc)
 ldbl-extra-routines += err \
 		       error
+
+tests-internal += tst-ibm128-warn tst-ieee128-warn
+tests-internal += tst-ibm128-error tst-ieee128-error
+
+$(objpfx)tst-ibm128-%.c: tst-ldbl-%.c
+	cp $< $@
+
+$(objpfx)tst-ieee128-%.c: tst-ldbl-%.c
+	cp $< $@
+
+CFLAGS-tst-ibm128-warn.c += -mabi=ibmlongdouble -Wno-psabi
+CFLAGS-tst-ibm128-error.c += -mabi=ibmlongdouble -Wno-psabi
+
+CFLAGS-tst-ieee128-warn.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi
+CFLAGS-tst-ieee128-error.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi
 endif
 
 # Add IEEE binary128 files as make targets.