ref: 811e20f0d94e72fd1b9b8b6f163a9e99af6f7a01
parent: 7e3812c970770e81e1d6a0989bc2796df8448a30
parent: 22f04159bbb530133201c8a3c4c11d68bc21b164
author: zhilwang <[email protected]>
date: Fri Jul 18 12:56:22 EDT 2014
Merge pull request #1185 from mstorsjo/android-l-preview Fix building for the Android L preview release, add support for new 64 bit Android ABIs
--- a/README.md
+++ b/README.md
@@ -67,11 +67,10 @@
You can also set ARCH, NDKLEVEL, GCCVERSION according to your device and NDK version.
ARCH specifies the architecture of android device. Currently only arm and x86 are supported, the default is arm.
NDKLEVEL specifies android api level, the api level can be 12-19, the default is 12.
-GCCVERSION specifies which gcc in NDK is used, the default is 4.8.
By default these commands build for the armeabi-v7a ABI. To build for the other android
-ABIs, add "ARCH=mips" or "ARCH=x86". To build for the older armeabi ABI (which has
-armv5te as baseline), add "APP_ABI=armeabi" (ARCH=arm is implicit).
+ABIs, add "ARCH=arm64", "ARCH=x86", "ARCH=x86_64", "ARCH=mips" or "ARCH=mips64".
+To build for the older armeabi ABI (which has armv5te as baseline), add "APP_ABI=armeabi" (ARCH=arm is implicit).
For iOS Builds
--------------
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -12,13 +12,20 @@
ifeq (Yes, $(USE_ASM))
ASMFLAGS += -march=armv7-a -mfpu=neon
endif
+else ifeq ($(ARCH), arm64)
+ APP_ABI = arm64-v8a
else ifeq ($(ARCH), x86)
- APP_ABI = x86
+ APP_ABI = x86
ifeq (Yes, $(USE_ASM))
ASMFLAGS += -f elf32
endif
+else ifeq ($(ARCH), x86_64)
+ APP_ABI = x86_64
+ ifeq (Yes, $(USE_ASM))
+ ASMFLAGS += -f elf64
+ endif
else
- APP_ABI = $(ARCH)
+ APP_ABI = $(ARCH)
endif
ifndef NDKROOT
--- a/codec/common/inc/crt_util_safe_x.h
+++ b/codec/common/inc/crt_util_safe_x.h
@@ -52,7 +52,6 @@
#include <sys/types.h>
#include <sys/timeb.h>
#else
-#include <sys/timeb.h>
#include <sys/time.h>
#include "typedefs.h"
#endif//_WIN32
@@ -72,7 +71,10 @@
#ifdef _WIN32
typedef struct _timeb SWelsTime;
#else
-typedef struct timeb SWelsTime;
+typedef struct TagWelsTime {
+ time_t time;
+ unsigned short millitm;
+} SWelsTime;
#endif
int32_t WelsSnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, ...);
--- a/codec/common/inc/measure_time.h
+++ b/codec/common/inc/measure_time.h
@@ -47,7 +47,6 @@
#include <sys/time.h>
#else
#include <windows.h>
-#include <sys/timeb.h>
#endif
#include <time.h>
--- a/codec/common/src/crt_util_safe_x.cpp
+++ b/codec/common/src/crt_util_safe_x.cpp
@@ -51,7 +51,6 @@
#endif //!_MSC_VER
#else
#include <sys/time.h>
-#include <sys/timeb.h>
#endif //_WIN32
#include "macros.h"
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -65,7 +65,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <sys/types.h>
-#include <sys/timeb.h>
#else
#include <sys/time.h>
#endif
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -48,7 +48,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <sys/types.h>
-#include <sys/timeb.h>
#else
#include <sys/time.h>
#endif