aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-12-02 21:13:34 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-12-03 11:13:47 +0000
commit5b5da69612a3f32311b2855dec87a3d2d523cbdf (patch)
tree33f729eab158243cbbf1385288989c12f0240e38 /math
parentfc4c69b3a879bc17fd2036969e7255ab7b9fcf72 (diff)
downloadports-5b5da69612a3f32311b2855dec87a3d2d523cbdf.tar.gz
ports-5b5da69612a3f32311b2855dec87a3d2d523cbdf.zip
math/libpoly: fix build on powerpc*
/wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/test_algebraic_number.cpp:31:3: error: invalid operand for instruction CHECK(-1.5 < d1); ^ /wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/doctest.h:2971:20: note: expanded from macro 'CHECK' ^ /wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/doctest.h:2442:28: note: expanded from macro 'DOCTEST_CHECK' ^ /wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/doctest.h:2398:9: note: expanded from macro 'DOCTEST_ASSERT_IMPLEMENT_1' DOCTEST_ASSERT_IMPLEMENT_2(assert_type, __VA_ARGS__); \ ^ /wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/doctest.h:2393:5: note: expanded from macro 'DOCTEST_ASSERT_IMPLEMENT_2' DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB) \ ^ /wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/doctest.h:2139:17: note: expanded from macro 'DOCTEST_ASSERT_LOG_REACT_RETURN' if(b.log()) DOCTEST_BREAK_INTO_DEBUGGER(); \ ^ /wrkdirs/usr/ports/math/libpoly/work/libpoly-0.1.13/test/polyxx/doctest.h:462:47: note: expanded from macro 'DOCTEST_BREAK_INTO_DEBUGGER' ^ <inline asm>:1:5: note: instantiated into assembly here li r0, 20 ^
Diffstat (limited to 'math')
-rw-r--r--math/libpoly/files/patch-test_polyxx_doctest.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/math/libpoly/files/patch-test_polyxx_doctest.h b/math/libpoly/files/patch-test_polyxx_doctest.h
new file mode 100644
index 000000000000..11cd1d47ef28
--- /dev/null
+++ b/math/libpoly/files/patch-test_polyxx_doctest.h
@@ -0,0 +1,11 @@
+--- test/polyxx/doctest.h.orig 2023-12-02 21:09:53 UTC
++++ test/polyxx/doctest.h
+@@ -459,7 +459,7 @@ namespace doctest { namespace detail {
+ // Break at the location of the failing check if possible
+ #define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("int $3\n" : :) // NOLINT(hicpp-no-assembler)
+ #elif defined(__ppc__) || defined(__ppc64__)
+-#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" : : : "memory","r0","r3","r4" ) /* NOLINT */
++#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("li 0, 20\nsc\nnop\nli 0, 37\nli 4, 2\nsc\nnop\n" : : : "memory","0","3","4" ) /* NOLINT */
+ #else
+ #include <signal.h>
+ #define DOCTEST_BREAK_INTO_DEBUGGER() raise(SIGTRAP)