mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
more magic incantations to make crypto extensions work on Android/ARM64
This commit is contained in:
parent
8131680735
commit
7d8cfb1fee
4 changed files with 9 additions and 3 deletions
|
@ -11,13 +11,15 @@ LOCAL_C_INCLUDES := \
|
||||||
LOCAL_LDLIBS := -llog
|
LOCAL_LDLIBS := -llog
|
||||||
# LOCAL_CFLAGS := -g
|
# LOCAL_CFLAGS := -g
|
||||||
|
|
||||||
|
APP_UNIFIED_HEADERS := true
|
||||||
|
|
||||||
LOCAL_CFLAGS := -DZT_USE_MINIUPNPC
|
LOCAL_CFLAGS := -DZT_USE_MINIUPNPC
|
||||||
ifeq ($(TARGET_ARCH_ABI),x86_64)
|
ifeq ($(TARGET_ARCH_ABI),x86_64)
|
||||||
LOCAL_CXXFLAGS := -maes -mpclmul -msse4.1
|
LOCAL_CXXFLAGS := -maes -mpclmul -msse4.1
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
||||||
LOCAL_ARM_NEON := true
|
LOCAL_ARM_NEON := true
|
||||||
LOCAL_CXXFLAGS := -mfloat-abi=softfp -mfpu=neon
|
LOCAL_CXXFLAGS := -march=armv8-a+crypto -mfloat-abi=softfp -mfpu=neon -maes -isystem $NDK/sysroot/usr/include/$TRIPLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ZeroTierOne SDK source files
|
# ZeroTierOne SDK source files
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# NDK_TOOLCHAIN_VERSION := clang3.5
|
# NDK_TOOLCHAIN_VERSION := clang3.5
|
||||||
APP_STL := c++_static
|
APP_STL := c++_static
|
||||||
APP_CPPFLAGS := -Wall -fstack-protector -fexceptions -fno-strict-aliasing -frtti -Wno-deprecated-register -DZT_NO_TYPE_PUNNING=1
|
APP_CPPFLAGS := -Wall -fstack-protector -fexceptions -fno-strict-aliasing -frtti -Wno-deprecated-register -DZT_NO_TYPE_PUNNING=1
|
||||||
APP_PLATFORM := android-14
|
APP_PLATFORM := android-21
|
||||||
APP_ABI := all
|
APP_ABI := all
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
|
|
||||||
#if (defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON))
|
#if (defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON))
|
||||||
#if (defined(__APPLE__) && !defined(__LP64__)) || defined(__ANDROID__)
|
#if (defined(__APPLE__) && !defined(__LP64__)) || (defined(__ANDROID__) && defined(__arm__))
|
||||||
#ifdef ZT_ARCH_ARM_HAS_NEON
|
#ifdef ZT_ARCH_ARM_HAS_NEON
|
||||||
#undef ZT_ARCH_ARM_HAS_NEON
|
#undef ZT_ARCH_ARM_HAS_NEON
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,6 +46,10 @@
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__ANDROID__) && defined(__aarch64__)
|
||||||
|
#include <asm/hwcap.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
||||||
const uint64_t Utils::ZERO256[4] = {0ULL,0ULL,0ULL,0ULL};
|
const uint64_t Utils::ZERO256[4] = {0ULL,0ULL,0ULL,0ULL};
|
||||||
|
|
Loading…
Add table
Reference in a new issue