aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2021-11-15 10:02:24 +0000
committerMikael Urankar <mikael@FreeBSD.org>2021-12-21 16:23:47 +0000
commit8288c59996e1635170a2866bb3b18b4f6e804cea (patch)
tree71cb410373c44b9320752b6c5c4aaf398aa5fe77
parent7a9f4b317a0a8eecc36ef8877412eb697b937a60 (diff)
downloadports-8288c59996e1635170a2866bb3b18b4f6e804cea.tar.gz
ports-8288c59996e1635170a2866bb3b18b4f6e804cea.zip
math/cln: unbreak on armv7
This patch fixes the build for math/cln on armv7 by patching some wrong declarations. It also hooks up the test suite to "make test". PR: 259854 Approved by: wen (maintainer timeout)
-rw-r--r--math/cln/Makefile1
-rw-r--r--math/cln/files/patch-src_base_low_cl__low__div.cc28
-rw-r--r--math/cln/files/patch-src_base_low_cl__low__mul.cc14
3 files changed, 43 insertions, 0 deletions
diff --git a/math/cln/Makefile b/math/cln/Makefile
index c6d28c62fd19..d66381a41000 100644
--- a/math/cln/Makefile
+++ b/math/cln/Makefile
@@ -18,6 +18,7 @@ LIB_DEPENDS= libgmp.so:math/gmp
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-gmp=${LOCALBASE}
INSTALL_TARGET= install-strip
+TEST_TARGET= check
USES= compiler:c11 gmake libtool pathfix pkgconfig tar:bzip2
USE_LDCONFIG= yes
diff --git a/math/cln/files/patch-src_base_low_cl__low__div.cc b/math/cln/files/patch-src_base_low_cl__low__div.cc
index 15124551e323..a759e811a95b 100644
--- a/math/cln/files/patch-src_base_low_cl__low__div.cc
+++ b/math/cln/files/patch-src_base_low_cl__low__div.cc
@@ -1,5 +1,33 @@
--- src/base/low/cl_low_div.cc.orig 2011-04-08 21:07:28 UTC
+++ src/base/low/cl_low_div.cc
+@@ -10,11 +10,11 @@
+ // Implementation.
+
+ #ifdef NEED_VAR_divu_16_rest
+-uint16 divu_16_rest;
++extern "C" uint16 divu_16_rest;
+ #endif
+
+ #ifdef NEED_FUNCTION_divu_3216_1616_
+-uint16 divu_16_rest;
++extern "C" uint16 divu_16_rest = 0;
+ namespace cln {
+ #if 1
+ // Most processors have a good 32 by 32 bit division, use that.
+@@ -101,11 +101,11 @@ uint32 divu_3232_3232_(uint32 x, uint32 y)
+ #endif
+
+ #ifdef NEED_VAR_divu_32_rest
+-uint32 divu_32_rest;
++extern "C" uint32 divu_32_rest;
+ #endif
+
+ #ifdef NEED_FUNCTION_divu_6432_3232_
+-uint32 divu_32_rest;
++extern "C" uint32 divu_32_rest = 0;
+ namespace cln {
+ uint32 divu_6432_3232_(uint32 xhi, uint32 xlo, uint32 y)
+ // Methode:
@@ -207,7 +207,7 @@ uint32 divu_6432_3232_(uint32 xhi, uint32 xlo, uint32
#endif
diff --git a/math/cln/files/patch-src_base_low_cl__low__mul.cc b/math/cln/files/patch-src_base_low_cl__low__mul.cc
index 8e8c48c4de2e..4b53103cb060 100644
--- a/math/cln/files/patch-src_base_low_cl__low__mul.cc
+++ b/math/cln/files/patch-src_base_low_cl__low__mul.cc
@@ -1,5 +1,19 @@
--- src/base/low/cl_low_mul.cc.orig 2011-04-08 21:06:30 UTC
+++ src/base/low/cl_low_mul.cc
+@@ -10,11 +10,11 @@
+ // Implementation.
+
+ #ifdef NEED_VAR_mulu32_high
+-uint32 mulu32_high;
++extern "C" uint32 mulu32_high;
+ #endif
+
+ #ifdef NEED_FUNCTION_mulu32_
+-uint32 mulu32_high;
++extern "C" uint32 mulu32_high = 0;
+ namespace cln {
+ uint32 mulu32_ (uint32 x, uint32 y)
+ {
@@ -50,11 +50,11 @@ uint64 mulu32_w (uint32 arg1, uint32 arg2)