From ee0c593258a8822c7cd0b9cbb73a447f239d0405 Mon Sep 17 00:00:00 2001 From: Sacha Date: Wed, 12 Nov 2014 02:52:31 +1000 Subject: [PATCH] Fix Android. --- Common/Common.h | 1 - android/android.toolchain.cmake | 2 ++ android/jni/Locals.mk | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Common/Common.h b/Common/Common.h index 827074b388..91cf7ecd37 100644 --- a/Common/Common.h +++ b/Common/Common.h @@ -32,7 +32,6 @@ #if !defined(ARM) #define ARM #endif -#define _M_ARM32 #endif // Force enable logging in the right modes. For some reason, something had changed diff --git a/android/android.toolchain.cmake b/android/android.toolchain.cmake index 987a25af5e..f90d4a609c 100644 --- a/android/android.toolchain.cmake +++ b/android/android.toolchain.cmake @@ -1203,6 +1203,8 @@ set( CMAKE_ASM_COMPILER_FORCED TRUE ) set( CMAKE_COMPILER_IS_GNUASM 1) set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s S asm ) +set( CMAKE_SIZEOF_VOID_P 4 ) + # flags and definitions remove_definitions( -DANDROID ) add_definitions( -DANDROID ) diff --git a/android/jni/Locals.mk b/android/jni/Locals.mk index d2844bafba..28eec73e87 100644 --- a/android/jni/Locals.mk +++ b/android/jni/Locals.mk @@ -26,7 +26,7 @@ ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a) LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/armv7/lib/libavutil.a LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/armv7/include - LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI_V7A + LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_32 -DARM -DARMEABI_V7A endif ifeq ($(TARGET_ARCH_ABI),armeabi) LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/armv6/lib/libavformat.a @@ -36,7 +36,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi) LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/armv6/lib/libavutil.a LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/armv6/include - LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DARM -DARMEABI -march=armv6 + LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_32 -DARM -DARMEABI -march=armv6 endif ifeq ($(TARGET_ARCH_ABI),x86) LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86/lib/libavformat.a @@ -46,7 +46,7 @@ ifeq ($(TARGET_ARCH_ABI),x86) LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86/lib/libavutil.a LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/x86/include - LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86 -fomit-frame-pointer -mtune=atom -mfpmath=sse -mssse3 + LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_32 -D_M_IX86 -fomit-frame-pointer -mtune=atom -mfpmath=sse -mssse3 endif # Compile with profiling.