git: 3729900bf2f7 - main - audio/ardour: fix build on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 Jan 2023 17:46:07 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=3729900bf2f7a644fea876448a1cc1e25314b609 commit 3729900bf2f7a644fea876448a1cc1e25314b609 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2023-01-03 17:42:36 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-01-03 17:46:05 +0000 audio/ardour: fix build on powerpc64* In file included from ../libs/ardour/ardour/plugin.h:37: ../libs/ardour/ardour/cycles.h:75:10: fatal error: 'sys/platform/ppc.h' file not found --- .../ardour/files/patch-libs_ardour_ardour_cycles.h | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/audio/ardour/files/patch-libs_ardour_ardour_cycles.h b/audio/ardour/files/patch-libs_ardour_ardour_cycles.h new file mode 100644 index 000000000000..666c0bfde27c --- /dev/null +++ b/audio/ardour/files/patch-libs_ardour_ardour_cycles.h @@ -0,0 +1,25 @@ +--- libs/ardour/ardour/cycles.h.orig 2023-01-03 16:39:59 UTC ++++ libs/ardour/ardour/cycles.h +@@ -72,12 +72,22 @@ static inline cycles_t get_cycles (void) + + #elif defined(__powerpc64__) + ++#ifdef __linux__ + #include <sys/platform/ppc.h> + typedef uint64_t cycles_t; + static inline cycles_t get_cycles(void) + { + return __ppc_get_timebase(); + } ++#elif defined(__FreeBSD__) ++typedef uint64_t cycles_t; ++static inline cycles_t get_cycles(void) ++{ ++ cycles_t tbr; ++ asm volatile("mfspr %0, 268" : "=r"(tbr)); ++ return tbr; ++} ++#endif + + #elif defined(__powerpc__) +