Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 2023 11:13:56 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 5b5da69612a3 - main - math/libpoly: fix build on powerpc*
Message-ID:  <202312031113.3B3BDumh070623@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

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

commit 5b5da69612a3f32311b2855dec87a3d2d523cbdf
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-12-02 21:13:34 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-12-03 11:13:47 +0000

    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
               ^
---
 math/libpoly/files/patch-test_polyxx_doctest.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312031113.3B3BDumh070623>