[vlc-commits] contrib: vpx: fix android clang build

Thomas Guillem git at videolan.org
Mon Aug 29 13:36:24 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Aug 25 16:35:43 2016 +0200| [18f5358a613d303d333ec4267bcdb64cca52a878] | committer: Thomas Guillem

contrib: vpx: fix android clang build

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18f5358a613d303d333ec4267bcdb64cca52a878
---

 contrib/src/vpx/libvpx-android.patch | 34 +++++++++++++++++++++++++++++++++-
 contrib/src/vpx/rules.mak            |  4 +---
 2 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/contrib/src/vpx/libvpx-android.patch b/contrib/src/vpx/libvpx-android.patch
index ed2a8ad..8f71683 100644
--- a/contrib/src/vpx/libvpx-android.patch
+++ b/contrib/src/vpx/libvpx-android.patch
@@ -22,7 +22,29 @@ cpu-features.c. Additionally, we don't need to link with pthread.
  PORTS_SRCS-$(ARCH_ARM) += arm.h
 --- libvpx/build/make/configure.sh.orig	2016-05-20 12:48:54.468179035 +0200
 +++ libvpx/build/make/configure.sh	2016-05-20 12:49:30.379601840 +0200
-@@ -907,7 +907,8 @@
+@@ -628,8 +628,8 @@
+ }
+ 
+ setup_gnu_toolchain() {
+-  CC=${CC:-${CROSS}gcc}
+-  CXX=${CXX:-${CROSS}g++}
++  CC=clang
++  CXX=clang++
+   AR=${AR:-${CROSS}ar}
+   LD=${LD:-${CROSS}${link_with_cc:-ld}}
+   AS=${AS:-${CROSS}as}
+@@ -951,8 +951,8 @@
+           COMPILER_LOCATION=`find "${SDK_PATH}" \
+                              -name "arm-linux-androideabi-gcc*" -print -quit`
+           TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi-
+-          CC=${TOOLCHAIN_PATH}gcc
+-          CXX=${TOOLCHAIN_PATH}g++
++          CC=clang
++          CXX=clang++
+           AR=${TOOLCHAIN_PATH}ar
+           LD=${TOOLCHAIN_PATH}gcc
+           AS=${TOOLCHAIN_PATH}as
+@@ -983,7 +983,8 @@
              soft_enable runtime_cpu_detect
            fi
            if enabled runtime_cpu_detect; then
@@ -32,3 +54,13 @@ cpu-features.c. Additionally, we don't need to link with pthread.
            fi
            ;;
  
+@@ -1363,9 +1364,6 @@
+         ;;
+       *-android-gcc)
+         ;;
+-      *)
+-        check_header pthread.h && add_extralibs -lpthread
+-        ;;
+     esac
+   fi
+ 
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index b74461d..0710470 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -113,9 +113,7 @@ endif
 ifdef HAVE_ANDROID
 # vpx configure.sh overrides our sysroot and it looks for it itself, and
 # uses that path to look for the compiler (which we already know)
-VPX_CONF += --sdk-path=$(shell dirname $(shell which $(HOST)-gcc))
-# put sysroot
-VPX_CONF += --libc=$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)
+VPX_CONF += --sdk-path=$(shell dirname $(shell which $(HOST)-clang))
 endif
 
 ifndef WITH_OPTIMIZATION



More information about the vlc-commits mailing list