diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2021-06-17 00:07:38 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2021-06-17 00:07:38 +0000 |
commit | 6a7e7adbca15546da4181cd1d0b2d4cd72953303 (patch) | |
tree | 3c1ca120336060569f250641482edf17cc35c585 /audio/sfizz | |
parent | games/openarena: fix build on powerpc (diff) |
audio/sfizz: fix build on powerpc*
ori 0,0,0 is nop instruction on powerpc*
Additional headers are necessary:
In file included from /wrkdirs/usr/ports/audio/sfizz/work/sfizz-0.4.0/external/abseil-cpp/absl/base/internal/unscaledcycleclock.cc:27:
/usr/include/sys/sysctl.h:1185:25: error: unknown type name 'u_int'
int sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
^
/wrkdirs/usr/ports/audio/sfizz/work/sfizz-0.4.0/external/abseil-cpp/absl/base/internal/unscaledcycleclock.cc:91:10: error: unknown type name 'once_flag'
static once_flag init_timebase_frequency_once;
^
/wrkdirs/usr/ports/audio/sfizz/work/sfizz-0.4.0/external/abseil-cpp/absl/base/internal/unscaledcycleclock.cc:93:18: error: no member named 'LowLevelCallOnce' in namespace 'absl::lts_2020_02_25::base_internal'
base_internal::LowLevelCallOnce(&init_timebase_frequency_once, [&]() {
Diffstat (limited to 'audio/sfizz')
-rw-r--r-- | audio/sfizz/files/patch-external_abseil-cpp_absl_base_internal_unscaledcycleclock.cc | 14 | ||||
-rw-r--r-- | audio/sfizz/files/patch-src_external_atomic__queue_defs.h | 13 |
2 files changed, 26 insertions, 1 deletions
diff --git a/audio/sfizz/files/patch-external_abseil-cpp_absl_base_internal_unscaledcycleclock.cc b/audio/sfizz/files/patch-external_abseil-cpp_absl_base_internal_unscaledcycleclock.cc new file mode 100644 index 000000000000..7b0b8cd82099 --- /dev/null +++ b/audio/sfizz/files/patch-external_abseil-cpp_absl_base_internal_unscaledcycleclock.cc @@ -0,0 +1,14 @@ +--- external/abseil-cpp/absl/base/internal/unscaledcycleclock.cc.orig 2021-06-16 13:17:13 UTC ++++ external/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +@@ -24,8 +24,10 @@ + #ifdef __GLIBC__ + #include <sys/platform/ppc.h> + #elif defined(__FreeBSD__) +-#include <sys/sysctl.h> ++#include "absl/base/call_once.h" + #include <sys/types.h> ++#include <sys/sysctl.h> ++#include <threads.h> + #endif + #endif + diff --git a/audio/sfizz/files/patch-src_external_atomic__queue_defs.h b/audio/sfizz/files/patch-src_external_atomic__queue_defs.h index 7060dfbfb388..f0bb602e4b16 100644 --- a/audio/sfizz/files/patch-src_external_atomic__queue_defs.h +++ b/audio/sfizz/files/patch-src_external_atomic__queue_defs.h @@ -1,4 +1,4 @@ ---- src/external/atomic_queue/defs.h.orig 2020-04-20 01:14:22 UTC +--- src/external/atomic_queue/defs.h.orig 2020-07-23 22:01:34 UTC +++ src/external/atomic_queue/defs.h @@ -6,11 +6,15 @@ @@ -26,3 +26,14 @@ static inline void spin_loop_pause() noexcept { #if (defined(__ARM_ARCH_6K__) || \ defined(__ARM_ARCH_6Z__) || \ +@@ -37,6 +41,10 @@ static inline void spin_loop_pause() noexcept { + #endif + } + } // namespace atomic_queue ++#elif defined(__powerpc__) ++static inline void spin_loop_pause() noexcept { ++ asm volatile("ori 0,0,0" ::: "memory"); ++} + #else + #error "Unknown CPU architecture." + #endif |