[vlc-commits] contrib: aom: fix cpufeatures support

Victorien Le Couviour--Tuffet git at videolan.org
Tue Oct 23 17:25:12 CEST 2018


vlc/vlc-3.0 | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Wed Sep 19 16:15:06 2018 +0200| [6971f258b7c4d588a6ef5f39ffb8f47f6025e6b3] | committer: Thomas Guillem

contrib: aom: fix cpufeatures support

Fixes android NDK 17 build

(cherry picked from commit 530b1c0e76aad02b5c60e2fbe457578aed795ec9)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6971f258b7c4d588a6ef5f39ffb8f47f6025e6b3
---

 contrib/src/aom/aom-android-cpufeatures.patch | 27 +++++++++++++++++++++++++++
 contrib/src/aom/rules.mak                     |  4 ++++
 2 files changed, 31 insertions(+)

diff --git a/contrib/src/aom/aom-android-cpufeatures.patch b/contrib/src/aom/aom-android-cpufeatures.patch
new file mode 100644
index 0000000000..82339c2e23
--- /dev/null
+++ b/contrib/src/aom/aom-android-cpufeatures.patch
@@ -0,0 +1,27 @@
+diff --git a/aom_ports/aom_ports.cmake b/aom_ports/aom_ports.cmake
+index 6272fc0..2d795f8 100644
+--- a/aom_ports/aom_ports.cmake
++++ b/aom_ports/aom_ports.cmake
+@@ -30,7 +30,8 @@ list(APPEND AOM_PORTS_ASM_X86 "${AOM_ROOT}/aom_ports/emms.asm")
+ list(APPEND AOM_PORTS_INCLUDES_X86 "${AOM_ROOT}/aom_ports/x86_abi_support.asm")
+ 
+ list(APPEND AOM_PORTS_SOURCES_ARM "${AOM_ROOT}/aom_ports/arm.h"
+-            "${AOM_ROOT}/aom_ports/arm_cpudetect.c")
++            "${AOM_ROOT}/aom_ports/arm_cpudetect.c"
++            "${AOM_ROOT}/aom_ports/cpu-features.c")
+ 
+ list(APPEND AOM_PORTS_SOURCES_PPC "${AOM_ROOT}/aom_ports/ppc.h"
+             "${AOM_ROOT}/aom_ports/ppc_cpudetect.c")
+diff --git a/aom_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c
+index 70efee9..86efb8e 100644
+--- a/aom_ports/arm_cpudetect.c
++++ b/aom_ports/arm_cpudetect.c
+@@ -88,7 +88,7 @@ int arm_cpu_caps(void) {
+ }
+ 
+ #elif defined(__ANDROID__) /* end _MSC_VER */
+-#include <cpu-features.h>
++#include "cpu-features.h"
+ 
+ int arm_cpu_caps(void) {
+   int flags;
diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak
index 2cedf05749..a13a7632ac 100644
--- a/contrib/src/aom/rules.mak
+++ b/contrib/src/aom/rules.mak
@@ -25,8 +25,12 @@ ifdef HAVE_WINSTORE
 endif
 ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/aom/aom-android-pthreads.patch
+	$(APPLY) $(SRC)/aom/aom-android-cpufeatures.patch
 endif
 	$(MOVE)
+ifdef HAVE_ANDROID
+	cp $(ANDROID_NDK)/sources/android/cpufeatures/cpu-features.c $(ANDROID_NDK)/sources/android/cpufeatures/cpu-features.h aom/aom_ports/
+endif
 
 DEPS_aom =
 



More information about the vlc-commits mailing list