diff --git a/math/sleef/Makefile b/math/sleef/Makefile index db3df4dec066..4b380b603f18 100644 --- a/math/sleef/Makefile +++ b/math/sleef/Makefile @@ -1,30 +1,30 @@ # Created by: Johannes M Dieterich PORTNAME= sleef DISTVERSION= 3.5.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= math MAINTAINER= jmd@FreeBSD.org COMMENT= SIMD Library for Evaluating Elementary Functions, vectorized libm LICENSE= BSL LICENSE_FILE= ${WRKSRC}/LICENSE.txt USES= cmake compiler:c11 USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= shibatch CFLAGS_powerpc64= -mpower8-vector .include .if ${ARCH:Mpowerpc64*} || ${ARCH:Marmv?} PLIST_SUB+= GNUABI="@comment " .else PLIST_SUB+= GNUABI="" .endif .include 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 + #include + +-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; }