Skip to content

Commit 52fbaee

Browse files
committed
MACOSXPPC: Update libvpx and don't let it use pthread_setname_np()
That API only appeared on OSX 10.6+.
1 parent b0e281d commit 52fbaee

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

toolchains/macosx-ppc/packages/libvpx/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#! /bin/sh
22

3-
LIBVPX_VERSION=1.13.0
3+
LIBVPX_VERSION=1.15.0
4+
#LIBVPX_VERSION=1.14.1
45
#LIBVPX_SHA256=30f93e9c63ee627d1a2cedcf59ac34d45bf30240982f99e44c6e015466b4e73d
56

67
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
pthread_setname_np() doesn't exist before OSX 10.6
2+
3+
--- a/vpx_util/vpx_thread.c
4+
+++ b/vpx_util/vpx_thread.c
5+
@@ -27,6 +27,10 @@
6+
7+
#if CONFIG_MULTITHREAD
8+
9+
+#ifdef __APPLE__
10+
+#include <AvailabilityMacros.h>
11+
+#endif
12+
+
13+
struct VPxWorkerImpl {
14+
pthread_mutex_t mutex_;
15+
pthread_cond_t condition_;
16+
@@ -39,7 +43,7 @@ static void execute(VPxWorker *const worker); // Forward declaration.
17+
18+
static THREADFN thread_loop(void *ptr) {
19+
VPxWorker *const worker = (VPxWorker *)ptr;
20+
-#ifdef __APPLE__
21+
+#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
22+
if (worker->thread_name != NULL) {
23+
// Apple's version of pthread_setname_np takes one argument and operates on
24+
// the current thread only. The maximum size of the thread_name buffer was

toolchains/macosx-ppc/packages/libvpx/patches/wrong-ppc-vpx-ports-type.patch

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,3 @@ From MacPorts.
2828
#include "vpx_ports/ppc.h"
2929
#elif VPX_ARCH_MIPS
3030
#include "vpx_ports/mips.h"
31-
@@ -96,7 +96,7 @@
32-
ctx->cpu_caps = arm_cpu_caps();
33-
#elif VPX_ARCH_X86 || VPX_ARCH_X86_64
34-
ctx->cpu_caps = x86_simd_caps();
35-
-#elif VPX_ARCH_PPC
36-
+#elif VPX_ARCH_PPC64LE
37-
ctx->cpu_caps = ppc_simd_caps();
38-
#elif VPX_ARCH_MIPS
39-
ctx->cpu_caps = mips_cpu_caps();
40-

0 commit comments

Comments
 (0)