Fix compilation using latest ndk (10c), now using gcc 4.8 instead of 4.6 (deprecated)
This commit is contained in:
parent
b8b45c024b
commit
6b046aa61b
4 changed files with 25 additions and 4 deletions
6
Makefile
6
Makefile
|
@ -2,7 +2,7 @@
|
|||
NDK_PATH=$(shell dirname `which ndk-build`)
|
||||
SDK_PATH=$(shell dirname `which android`)
|
||||
SDK_PLATFORM_TOOLS_PATH=$(shell dirname `which adb`)
|
||||
ARM_COMPILER_PATH=`find "$(NDK_PATH)" -name "arm-linux-androideabi-gcc*" -print -quit`
|
||||
ARM_COMPILER_PATH=`find "$(NDK_PATH)" -name "arm-linux-androideabi-gcc-4*" -print | tail -1`
|
||||
ARM_TOOLCHAIN_PATH=$(shell dirname $(ARM_COMPILER_PATH))/arm-linux-androideabi-
|
||||
ARM_SYSROOT=$(shell find "${NDK_PATH}" -name arch-arm -print | \
|
||||
awk '{n = split($$0,a,"/"); \
|
||||
|
@ -10,7 +10,7 @@ ARM_SYSROOT=$(shell find "${NDK_PATH}" -name arch-arm -print | \
|
|||
print $$0 " " b[2]}' | \
|
||||
sort -g -k 2 | \
|
||||
awk '{ print $$1 }' | tail -1)
|
||||
X86_COMPILER_PATH=`find "$(NDK_PATH)" -name "i686-linux-android-gcc*" -print -quit`
|
||||
X86_COMPILER_PATH=`find "$(NDK_PATH)" -name "i686-linux-android-gcc-4*" -print | tail -1`
|
||||
X86_TOOLCHAIN_PATH=$(shell dirname $(X86_COMPILER_PATH))/i686-linux-android-
|
||||
X86_SYSROOT=$(shell find "${NDK_PATH}" -name arch-x86 -print | \
|
||||
awk '{n = split($$0,a,"/"); \
|
||||
|
@ -144,6 +144,7 @@ $(FFMPEG_BUILD_DIR)/arm/libavcodec/libavcodec-linphone-arm.so:
|
|||
mkdir -p $(FFMPEG_BUILD_DIR)/arm && \
|
||||
cd $(FFMPEG_BUILD_DIR)/arm && \
|
||||
$(FFMPEG_SRC_DIR)/configure $(FFMPEG_CONFIGURE_OPTIONS) $(FFMPEG_ARM_CONFIGURE_OPTIONS) && \
|
||||
patch -p0 < $(TOPDIR)/patches/ffmpeg_configh.patch && \
|
||||
make -j ${NUMCPUS} \
|
||||
|| ( echo "Build of ffmpeg for arm failed." ; exit 1 )
|
||||
|
||||
|
@ -151,6 +152,7 @@ $(FFMPEG_BUILD_DIR)/x86/libavcodec/libavcodec-linphone-x86.so:
|
|||
mkdir -p $(FFMPEG_BUILD_DIR)/x86 && \
|
||||
cd $(FFMPEG_BUILD_DIR)/x86 && \
|
||||
$(FFMPEG_SRC_DIR)/configure $(FFMPEG_CONFIGURE_OPTIONS) $(FFMPEG_X86_CONFIGURE_OPTIONS) && \
|
||||
patch -p0 < $(TOPDIR)/patches/ffmpeg_configh.patch && \
|
||||
make -j ${NUMCPUS} \
|
||||
|| ( echo "Build of ffmpeg for x86 failed." ; exit 1 )
|
||||
|
||||
|
|
2
README
2
README
|
@ -3,7 +3,7 @@
|
|||
|
||||
To build liblinphone for Android, you must:
|
||||
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
|
||||
1) download the Android ndk (>=r9d, < r10) from google and add it to your path (no symlink !!!).
|
||||
1) download the Android ndk (>=10c) from google and add it to your path (no symlink !!!).
|
||||
2) install yasm, nasm, curl, ant, rsync and the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
|
||||
On 64 bits linux systems you'll need the ia32-libs package
|
||||
With the latest Debian (multiarch), you need this:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
APP_PROJECT_PATH := $(call my-dir)/../
|
||||
NDK_TOOLCHAIN_VERSION := 4.8
|
||||
|
||||
ifeq ($(BUILD_MEDIASTREAMER2_SDK),)
|
||||
BUILD_MEDIASTREAMER2_SDK=0
|
||||
|
|
20
patches/ffmpeg_configh.patch
Normal file
20
patches/ffmpeg_configh.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- config.h2 2014-11-05 11:24:36.723553170 +0100
|
||||
+++ config.h 2014-11-05 11:36:45.418743875 +0100
|
||||
@@ -182,7 +182,7 @@
|
||||
#define HAVE_FCNTL 1
|
||||
#define HAVE_FORK 1
|
||||
#define HAVE_GETADDRINFO 0
|
||||
-#define HAVE_GETHRTIME 1
|
||||
+#define HAVE_GETHRTIME 0
|
||||
#define HAVE_GETOPT 1
|
||||
#define HAVE_GETPROCESSAFFINITYMASK 0
|
||||
#define HAVE_GETPROCESSMEMORYINFO 0
|
||||
@@ -254,7 +254,7 @@
|
||||
#define HAVE_SYMVER_ASM_LABEL 0
|
||||
#define HAVE_SYMVER_GNU_ASM 1
|
||||
#define HAVE_SYSCONF 1
|
||||
-#define HAVE_SYSCTL 1
|
||||
+#define HAVE_SYSCTL 0
|
||||
#define HAVE_SYS_MMAN_H 1
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#define HAVE_SYS_RESOURCE_H 1
|
Loading…
Reference in a new issue