git: d5babb3b84b9 - main - math/sleef: add ARMv7 patch files

From: Johannes M Dieterich <jmd_at_FreeBSD.org>
Date: Sat, 01 Jan 2022 17:25:16 UTC
The branch main has been updated by jmd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d5babb3b84b9d787f2549a4da906fa30f25037a4

commit d5babb3b84b9d787f2549a4da906fa30f25037a4
Author:     Johannes M Dieterich <jmd@FreeBSD.org>
AuthorDate: 2022-01-01 17:23:09 +0000
Commit:     Johannes M Dieterich <jmd@FreeBSD.org>
CommitDate: 2022-01-01 17:24:31 +0000

    math/sleef: add ARMv7 patch files
    
    PR:             259922
---
 math/sleef/Makefile                                 |  2 +-
 .../sleef/files/patch-src_libm-tester_iutsimdmain.c | 21 +++++++++++++++++++++
 .../files/patch-src_libm-tester_tester2simdsp.c     | 11 +++++++++++
 math/sleef/files/patch-src_libm-tester_testerutil.c | 11 +++++++++++
 4 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/math/sleef/Makefile b/math/sleef/Makefile
index db3df4dec066..4b380b603f18 100644
--- a/math/sleef/Makefile
+++ b/math/sleef/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	sleef
 DISTVERSION=	3.5.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	math
 
 MAINTAINER=	jmd@FreeBSD.org
diff --git a/math/sleef/files/patch-src_libm-tester_iutsimdmain.c b/math/sleef/files/patch-src_libm-tester_iutsimdmain.c
new file mode 100644
index 000000000000..4adba3c77702
--- /dev/null
+++ b/math/sleef/files/patch-src_libm-tester_iutsimdmain.c
@@ -0,0 +1,21 @@
+--- src/libm-tester/iutsimdmain.c.orig	2021-11-18 16:48:35 UTC
++++ src/libm-tester/iutsimdmain.c
+@@ -9,16 +9,16 @@
+ #include <signal.h>
+ #include <setjmp.h>
+ 
+-static jmp_buf sigjmp;
+-
+ int do_test(int argc, char **argv);
+ int check_featureDP(double d);
+ int check_featureSP(float d);
+ 
+ #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
++static jmp_buf sigjmp;
+ #define SETJMP(x) setjmp(x)
+ #define LONGJMP longjmp
+ #else
++static sigjmp_buf sigjmp;
+ #define SETJMP(x) sigsetjmp(x, 1)
+ #define LONGJMP siglongjmp
+ #endif
diff --git a/math/sleef/files/patch-src_libm-tester_tester2simdsp.c b/math/sleef/files/patch-src_libm-tester_tester2simdsp.c
new file mode 100644
index 000000000000..888501278a4b
--- /dev/null
+++ b/math/sleef/files/patch-src_libm-tester_tester2simdsp.c
@@ -0,0 +1,11 @@
+--- src/libm-tester/tester2simdsp.c.orig	2021-11-18 16:25:52 UTC
++++ src/libm-tester/tester2simdsp.c
+@@ -828,7 +828,7 @@ int main(int argc,char **argv)
+       double u0 = countULPsp(t = vget(xacoshf(vd), e), frx);
+       
+       if ((fabs(d) < sqrt(FLT_MAX) && u0 > 1.0001) ||
+-	  (d >=  sqrt(FLT_MAX) && !(u0 <= 1.0001 || (isinff(t) && t > 0))) ||
++	  (d >=  sqrt(FLT_MAX) && !(u0 <= 1.0001 || (isinf(t) && t > 0))) ||
+ 	  (d <= -sqrt(FLT_MAX) && !isnan(t))) {
+ 	printf(ISANAME " acoshf arg=%.20g ulp=%.20g\n", d, u0);
+ 	fflush(stdout); ecnt++;
diff --git a/math/sleef/files/patch-src_libm-tester_testerutil.c b/math/sleef/files/patch-src_libm-tester_testerutil.c
new file mode 100644
index 000000000000..b06eab3f5e06
--- /dev/null
+++ b/math/sleef/files/patch-src_libm-tester_testerutil.c
@@ -0,0 +1,11 @@
+--- src/libm-tester/testerutil.c.orig	2021-11-18 16:26:40 UTC
++++ src/libm-tester/testerutil.c
+@@ -45,7 +45,7 @@ int isMinusZero(double x) { return x == 0 && copysign(
+ double sign(double d) { return d < 0 ? -1 : 1; }
+ int xisnan(double x) { return x != x; }
+ 
+-int isnumberf(float x) { return !isinff(x) && !isnanf(x); }
++int isnumberf(float x) { return !isinf(x) && !isnanf(x); }
+ int isPlusZerof(float x) { return x == 0 && copysignf(1, x) == 1; }
+ int isMinusZerof(float x) { return x == 0 && copysignf(1, x) == -1; }
+ float signf(float d) { return d < 0 ? -1 : 1; }