#  -DCMAKE_TOOLCHAIN_FILE=../CMakeARM64Cross.txt
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_ASM_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_LINK_COMPILER aarch64-linux-gnu-ld.gold)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(CMAKE_EXE_LINKER_FLAGS "-static")

# for Sony Xperia L4 with an Octa-core 2.0 GHz Cortex-A53 aarch64 rev4 phone (-march=armv8.4)
# with 26.0 BogoMIPS and the features: fp asimd evtstrm aes pmull sha1 sha2 crc32.
set(SSE2_TRUE true)
set(SSE42_TRUE true)
set(AES_TRUE true)
#set(CLMUL_TRUE true)
set(SHA_TRUE true)
add_definitions(-march=armv8.4-a+crypto -DHAVE_NEON)
