aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project/cmake/modules/FindLibDvd.cmake2
-rw-r--r--project/cmake/scripts/android/ArchSetup.cmake2
-rw-r--r--tools/depends/Makefile.include.in2
-rw-r--r--tools/depends/configure.ac17
-rw-r--r--tools/depends/target/config.site.in6
-rw-r--r--tools/depends/target/ffmpeg/Makefile10
-rw-r--r--tools/depends/target/libnfs/Makefile1
-rw-r--r--tools/depends/target/libnfs/vfstat_redefine.patch63
-rw-r--r--tools/depends/target/pcre/Makefile1
-rw-r--r--tools/depends/target/pcre/jit_aarch64.patch11
10 files changed, 108 insertions, 7 deletions
diff --git a/project/cmake/modules/FindLibDvd.cmake b/project/cmake/modules/FindLibDvd.cmake
index 9a1f596417..dd26c96530 100644
--- a/project/cmake/modules/FindLibDvd.cmake
+++ b/project/cmake/modules/FindLibDvd.cmake
@@ -88,6 +88,8 @@ if(NOT WIN32)
if(CORE_SYSTEM_NAME STREQUAL android)
if(ARCH STREQUAL arm)
set(HOST_ARCH arm-linux-androideabi)
+ elseif(ARCH STREQUAL aarch64)
+ set(HOST_ARCH aarch64-linux-android)
elseif(ARCH STREQUAL i486-linux)
set(HOST_ARCH i686-linux-android)
endif()
diff --git a/project/cmake/scripts/android/ArchSetup.cmake b/project/cmake/scripts/android/ArchSetup.cmake
index 3ae9505309..281f94f869 100644
--- a/project/cmake/scripts/android/ArchSetup.cmake
+++ b/project/cmake/scripts/android/ArchSetup.cmake
@@ -14,6 +14,8 @@ else()
if(CPU STREQUAL armeabi-v7a)
set(ARCH arm)
set(NEON True)
+ elseif(CPU STREQUAL arm64-v8a)
+ set(ARCH aarch64)
elseif(CPU STREQUAL i686)
set(ARCH i486-linux)
set(NEON False)
diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in
index 61e2b23471..a6e419fe8a 100644
--- a/tools/depends/Makefile.include.in
+++ b/tools/depends/Makefile.include.in
@@ -57,7 +57,7 @@ OBJDUMP=@OBJDUMP@
CMAKE=@prefix@/@tool_dir@/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX)
CFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include
-LDFLAGS=-L@prefix@/@deps_dir@/lib @platform_ldflags@
+LDFLAGS=-L@prefix@/@deps_dir@/lib -L@prefix@/@deps_dir@/lib64 @platform_ldflags@
CXXFLAGS=@platform_cxxflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include
CPPFLAGS=@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac
index 298abd9d9c..6345adbfdb 100644
--- a/tools/depends/configure.ac
+++ b/tools/depends/configure.ac
@@ -143,6 +143,23 @@ case $host in
#android builds are always cross
cross_compiling="yes"
;;
+ aarch64*-*linux-android*)
+ if test "x$use_cpu" = "xauto"; then
+ use_cpu="arm64-v8a"
+ fi
+ use_sdk="${use_sdk:-android-21}"
+ deps_dir="$use_host-$use_sdk"
+ platform_cflags="-DANDROID -Os -fexceptions"
+ if test "x$use_cpu" = "xarm64-v8a"; then
+ platform_cflags+=" -march=armv8-a -mtune=cortex-a53"
+ fi
+ platform_ldflags="-L$prefix/$deps_dir/lib/$use_sdk"
+ platform_cxxflags="$platform_cflags -frtti"
+ platform_includes="-I$prefix/$deps_dir/include/$use_sdk"
+ platform_os="android"
+ #android builds are always cross
+ cross_compiling="yes"
+ ;;
i*86*-linux-android*)
if test "x$use_cpu" = "xauto"; then
use_cpu=$host_cpu
diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in
index 1a9961c2ae..8c7e68d47b 100644
--- a/tools/depends/target/config.site.in
+++ b/tools/depends/target/config.site.in
@@ -21,7 +21,7 @@ if test "@platform_os@" = "ios" ; then
fi
CFLAGS="@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include $CFLAGS"
-LDFLAGS="-L@prefix@/@deps_dir@/lib @platform_ldflags@ $LDFLAGS"
+LDFLAGS="-L@prefix@/@deps_dir@/lib -L@prefix@/@deps_dir@/lib64 @platform_ldflags@ $LDFLAGS"
CXXFLAGS="@platform_cxxflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include $CXXFLAGS"
CPPFLAGS="@platform_cflags@ @platform_includes@ -isystem @prefix@/@deps_dir@/include $CPPFLAGS"
@@ -36,7 +36,7 @@ PATH=@prefix@/@tool_dir@/bin:@use_toolchain@/usr/bin:@use_toolchain@/bin:$PATH
LD_LIBRARY_PATH=@prefix@/@tool_dir@/lib:$LD_LIBRARY_PATH
PYTHON_VERSION=2.7
-PYTHON_LDFLAGS="-L@prefix@/@deps_dir@/lib -lpython${PYTHON_VERSION} -lc -ldl -lm -lexpat -lffi -lintl -lutil -lssl -lcrypto"
+PYTHON_LDFLAGS="-L@prefix@/@deps_dir@/lib -L@prefix@/@deps_dir@/lib64 -lpython${PYTHON_VERSION} -lc -ldl -lm -lexpat -lffi -lintl -lutil -lssl -lcrypto"
PYTHON_CPPFLAGS=-I@prefix@/@deps_dir@/include/python${PYTHON_VERSION}
PYTHON_SITE_PKG=@prefix@/@deps_dir@/lib/python${PYTHON_VERSION}/site-packages
PYTHON_NOVERSIONCHECK=no-check
@@ -136,7 +136,7 @@ if test "@platform_os@" = "android"; then
ac_cv_func_rand=yes
#python: android doesn't have libutil
- PYTHON_LDFLAGS="-L@prefix@/@deps_dir@/lib -lpython${PYTHON_VERSION} -lc -ldl -lm -lexpat -lffi -lintl -lssl -lcrypto"
+ PYTHON_LDFLAGS="-L@prefix@/@deps_dir@/lib -L@prefix@/@deps_dir@/lib64 -lpython${PYTHON_VERSION} -lc -ldl -lm -lexpat -lffi -lintl -lssl -lcrypto"
fi
diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile
index 984521b553..eaf9fc4931 100644
--- a/tools/depends/target/ffmpeg/Makefile
+++ b/tools/depends/target/ffmpeg/Makefile
@@ -29,10 +29,14 @@ ifeq ($(OS), linux)
ffmpg_config += --enable-vdpau --enable-vaapi --enable-pic
endif
ifeq ($(OS), android)
- ifeq ($(findstring arm, $(CPU)), arm)
- ffmpg_config += --cpu=cortex-a9
+ ifeq ($(findstring arm64, $(CPU)), arm64)
+ ffmpg_config += --arch=aarch64 --cpu=cortex-a53
else
- ffmpg_config += --cpu=i686 --disable-mmx
+ ifeq ($(findstring arm, $(CPU)), arm)
+ ffmpg_config += --cpu=cortex-a9
+ else
+ ffmpg_config += --cpu=i686 --disable-mmx
+ endif
endif
ffmpg_config += --target-os=linux --extra-libs=-liconv
endif
diff --git a/tools/depends/target/libnfs/Makefile b/tools/depends/target/libnfs/Makefile
index ce92998a6e..48b91a88bd 100644
--- a/tools/depends/target/libnfs/Makefile
+++ b/tools/depends/target/libnfs/Makefile
@@ -23,6 +23,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
-rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); ./bootstrap
+ cd $(PLATFORM); patch -p1 < ../vfstat_redefine.patch
cd $(PLATFORM); $(CONFIGURE)
$(LIBDYLIB): $(PLATFORM)
diff --git a/tools/depends/target/libnfs/vfstat_redefine.patch b/tools/depends/target/libnfs/vfstat_redefine.patch
new file mode 100644
index 0000000000..33ae6fa923
--- /dev/null
+++ b/tools/depends/target/libnfs/vfstat_redefine.patch
@@ -0,0 +1,63 @@
+From 41c41aec0bfd2288afde4068e433e58513268668 Mon Sep 17 00:00:00 2001
+From: Jean-Baptiste Kempf <jb@videolan.org>
+Date: Fri, 11 Mar 2016 00:09:16 +0100
+Subject: [PATCH] Android: only redefine statvfs if it is not already defined
+
+It is defined with recent platforms version 21 and more recent
+---
+ lib/libnfs-sync.c | 8 ++++----
+ lib/libnfs.c | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c
+index 664ccfc..69caee3 100644
+--- a/lib/libnfs-sync.c
++++ b/lib/libnfs-sync.c
+@@ -37,10 +37,6 @@
+ #include <net/if.h>
+ #endif
+
+-#ifdef __ANDROID__
+-#define statvfs statfs
+-#endif
+-
+ #ifdef HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif
+@@ -49,6 +45,10 @@
+ #include <sys/statvfs.h>
+ #endif
+
++#if defined(__ANDROID__) && !defined(HAVE_SYS_STATVFS_H)
++#define statvfs statfs
++#endif
++
+ #ifdef HAVE_SYS_IOCTL_H
+ #include <sys/ioctl.h>
+ #endif
+diff --git a/lib/libnfs.c b/lib/libnfs.c
+index 1f16e5f..36c1430 100644
+--- a/lib/libnfs.c
++++ b/lib/libnfs.c
+@@ -33,10 +33,6 @@
+ #include <utime.h>
+ #endif
+
+-#ifdef __ANDROID__
+-#define statvfs statfs
+-#endif
+-
+ #define _GNU_SOURCE
+
+ #ifdef HAVE_UNISTD_H
+@@ -51,6 +47,10 @@
+ #include <sys/statvfs.h>
+ #endif
+
++#if defined(__ANDROID__) && !defined(HAVE_SYS_STATVFS_H)
++#define statvfs statfs
++#endif
++
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
diff --git a/tools/depends/target/pcre/Makefile b/tools/depends/target/pcre/Makefile
index 75848bb283..ff5aa49a82 100644
--- a/tools/depends/target/pcre/Makefile
+++ b/tools/depends/target/pcre/Makefile
@@ -27,6 +27,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p1 < ../tvos-bitcode-fix.patch
+ cd $(PLATFORM); patch -p0 < ../jit_aarch64.patch
cd $(PLATFORM); $(CONFIGURE)
$(LIBDYLIB): $(PLATFORM)
diff --git a/tools/depends/target/pcre/jit_aarch64.patch b/tools/depends/target/pcre/jit_aarch64.patch
new file mode 100644
index 0000000000..5f99207c69
--- /dev/null
+++ b/tools/depends/target/pcre/jit_aarch64.patch
@@ -0,0 +1,11 @@
+--- sljit/sljitConfigInternal.h.orig 2016-09-25 12:41:56.067863204 +0200
++++ sljit/sljitConfigInternal.h 2016-09-25 12:42:22.155862977 +0200
+@@ -310,7 +310,7 @@
+ #define SLJIT_CACHE_FLUSH(from, to) \
+ sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
+
+-#elif defined __ANDROID__
++#elif (defined __ANDROID__ && !defined SLJIT_CONFIG_ARM_64)
+
+ /* Android lacks __clear_cache; instead, cacheflush should be used. */
+