FreeBSD Bugzilla – Attachment 229581 Details for
Bug 259922
math/sleef: fix build on armv7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
math/sleef: fix build on armv7
0001-math-sleef-fix-build-on-armv7.patch (text/plain), 4.92 KB, created by
Robert Clausecker
on 2021-11-18 18:12:27 UTC
(
hide
)
Description:
math/sleef: fix build on armv7
Filename:
MIME Type:
Creator:
Robert Clausecker
Created:
2021-11-18 18:12:27 UTC
Size:
4.92 KB
patch
obsolete
>From 50b9e4dcada22c2b352a20d69f817826c43dcb15 Mon Sep 17 00:00:00 2001 >From: Robert Clausecker <fuz@fuz.su> >Date: Thu, 18 Nov 2021 18:29:25 +0100 >Subject: [PATCH] math/sleef: fix build on armv7 > > - patch uses of non standard function isinff > - patch a use of jmpbuf where sigjmpbuf is needed > - apply ppc64 workaround to armv6/armv7 > - fix wrong WWW > >PR: 254839 >--- > math/sleef/Makefile | 8 +++---- > .../files/patch-src_libm-tester_iutsimdmain.c | 21 +++++++++++++++++++ > .../patch-src_libm-tester_tester2simdsp.c | 11 ++++++++++ > .../files/patch-src_libm-tester_testerutil.c | 11 ++++++++++ > math/sleef/pkg-descr | 2 +- > math/sleef/pkg-plist | 6 +++--- > 6 files changed, 51 insertions(+), 8 deletions(-) > create mode 100644 math/sleef/files/patch-src_libm-tester_iutsimdmain.c > create mode 100644 math/sleef/files/patch-src_libm-tester_tester2simdsp.c > create mode 100644 math/sleef/files/patch-src_libm-tester_testerutil.c > >diff --git a/math/sleef/Makefile b/math/sleef/Makefile >index 6e53667c2ffb..db3df4dec066 100644 >--- a/math/sleef/Makefile >+++ b/math/sleef/Makefile >@@ -2,7 +2,7 @@ > > PORTNAME= sleef > DISTVERSION= 3.5.0 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= math > > MAINTAINER= jmd@FreeBSD.org >@@ -21,10 +21,10 @@ CFLAGS_powerpc64= -mpower8-vector > > .include <bsd.port.options.mk> > >-.if ${ARCH:Mpowerpc64*} >-PLIST_SUB+= NO_PPC64="@comment " >+.if ${ARCH:Mpowerpc64*} || ${ARCH:Marmv?} >+PLIST_SUB+= GNUABI="@comment " > .else >-PLIST_SUB+= NO_PPC64="" >+PLIST_SUB+= GNUABI="" > .endif > > .include <bsd.port.mk> >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; } >diff --git a/math/sleef/pkg-descr b/math/sleef/pkg-descr >index 3de8c8f868c5..03baf388822d 100644 >--- a/math/sleef/pkg-descr >+++ b/math/sleef/pkg-descr >@@ -4,4 +4,4 @@ In this library, functions for evaluating some elementary functions are > implemented. It provides a vectorized libm alternativ. The library also > includes DFT subroutines. > >-WWW: https://github.com/shibara/sleef >+WWW: https://github.com/shibatch/sleef >diff --git a/math/sleef/pkg-plist b/math/sleef/pkg-plist >index 114cfab88176..0fed0d7d0654 100644 >--- a/math/sleef/pkg-plist >+++ b/math/sleef/pkg-plist >@@ -6,7 +6,7 @@ lib/libsleef.so.3.5.0 > lib/libsleefdft.so > lib/libsleefdft.so.3 > lib/libsleefdft.so.3.5.0 >-%%NO_PPC64%%lib/libsleefgnuabi.so >-%%NO_PPC64%%lib/libsleefgnuabi.so.3 >-%%NO_PPC64%%lib/libsleefgnuabi.so.3.5 >+%%GNUABI%%lib/libsleefgnuabi.so >+%%GNUABI%%lib/libsleefgnuabi.so.3 >+%%GNUABI%%lib/libsleefgnuabi.so.3.5 > libdata/pkgconfig/sleef.pc >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 259922
:
229581
|
229583