1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

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, [&]() {
This commit is contained in:
Piotr Kubaj 2021-06-17 00:07:38 +00:00
parent 0c5491c62a
commit 6a7e7adbca
2 changed files with 26 additions and 1 deletions

View File

@ -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

View File

@ -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