[vlc-devel] [PATCH 08/13] contrib: vpx: fix toolchain path

Victorien Le Couviour--Tuffet victorien.lecouviour.tuffet at gmail.com
Tue Oct 2 11:14:31 CEST 2018


Fixes android NDK 17 build
---
 .../vpx/libvpx-android-toolchain_path.patch   | 21 +++++++++++++++++++
 contrib/src/vpx/rules.mak                     |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 contrib/src/vpx/libvpx-android-toolchain_path.patch

diff --git a/contrib/src/vpx/libvpx-android-toolchain_path.patch b/contrib/src/vpx/libvpx-android-toolchain_path.patch
new file mode 100644
index 0000000000..c6ef44ee9a
--- /dev/null
+++ b/contrib/src/vpx/libvpx-android-toolchain_path.patch
@@ -0,0 +1,21 @@
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 2e0b239..8853d18 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -951,9 +951,14 @@ EOF
+         android*)
+           if [ -n "${sdk_path}" ]; then
+             SDK_PATH=${sdk_path}
++            if [ ${tgt_isa} != "arm64" ]; then
++                tools_prefix=arm-linux-androideabi-
++            else
++                tools_prefix=aarch64-linux-android-
++            fi
+             COMPILER_LOCATION=`find "${SDK_PATH}" \
+-              -name "arm-linux-androideabi-gcc*" -print -quit`
+-            TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi-
++              -name "${tools_prefix}gcc*" -print -quit`
++            TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/${tools_prefix}
+             CC=clang
+             CXX=clang++
+             AR=${TOOLCHAIN_PATH}ar
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index fe392a4eb7..8ff15c98d4 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -20,6 +20,7 @@ libvpx: libvpx-$(VPX_VERSION).tar.gz .sum-vpx
 ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/vpx/libvpx-android.patch
 	$(APPLY) $(SRC)/vpx/libvpx-android-fix_cortex_a8-flag.patch
+	$(APPLY) $(SRC)/vpx/libvpx-android-toolchain_path.patch
 endif
 	$(APPLY) $(SRC)/vpx/0001-ads2gas-Add-a-noelf-option.patch
 	$(APPLY) $(SRC)/vpx/0002-configure-Add-an-armv7-win32-gcc-target.patch
-- 
2.19.0



More information about the vlc-devel mailing list