From 9a11b8857279d7b668e49836e5ef93c1c0dde3bf Mon Sep 17 00:00:00 2001 From: Tae Hanazono Date: Fri, 14 Dec 2018 23:25:32 +0800 Subject: [PATCH] Modify LOVE Android.mk There are two changes in here. First change is to tell Android build system to use NEON instruction support. Slime already wrote a NEON-optimized matrix multiplication function which is already in love main source code (see link below for related commit) https://bitbucket.org/rude/love/commits/e61734b33581a485743ea79b87d02f8aeb77693e The problem is that not all ARMv7 devices do support NEON instruction, but I don't even think if such device exist in 2018 (or even in 2019). ARM64 guarantee NEON instruction support, so it's all good for ARM64. The second change is to define "HAVE_SOCKLEN_T=1" only when building ARM64. This is needed because LuaSocket (or enet, I don't remember exactly) redefines socklen_t and this cause compiler error. --- love/src/jni/love/Android.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/love/src/jni/love/Android.mk b/love/src/jni/love/Android.mk index 6338dae8..9424e86f 100644 --- a/love/src/jni/love/Android.mk +++ b/love/src/jni/love/Android.mk @@ -11,6 +11,14 @@ LOCAL_CFLAGS := -fexceptions -g -Dlinux -Dunix \ LOCAL_CPPFLAGS := ${LOCAL_CFLAGS} +# I don't think there's armeabi-v7a device without NEON instructions in 2018 +LOCAL_ARM_NEON := true + +ifeq ($(TARGET_ARCH_ABI),arm64-v8a) + # ARM64 does have socklen_t + LOCAL_CFLAGS += -DHAS_SOCKLEN_T=1 +endif + LOCAL_C_INCLUDES := \ ${LOCAL_PATH}/src \ ${LOCAL_PATH}/src/modules \