aboutsummaryrefslogtreecommitdiff
path: root/cmake/toolchains/aarch64-linux-gnu.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/toolchains/aarch64-linux-gnu.cmake')
-rw-r--r--cmake/toolchains/aarch64-linux-gnu.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/toolchains/aarch64-linux-gnu.cmake b/cmake/toolchains/aarch64-linux-gnu.cmake
index 7ffe397..fdcb012 100644
--- a/cmake/toolchains/aarch64-linux-gnu.cmake
+++ b/cmake/toolchains/aarch64-linux-gnu.cmake
@@ -23,6 +23,13 @@ if("${CROSS}" STREQUAL "")
set(CROSS aarch64-linux-gnu-)
endif()
-set(CMAKE_CXX_COMPILER ${CROSS}g++)
+# For c_decoder_test.c and c_version_test.c.
+if(NOT CMAKE_C_COMPILER)
+ set(CMAKE_C_COMPILER ${CROSS}gcc)
+endif()
+set(CMAKE_C_FLAGS_INIT "-march=armv8-a")
+if(NOT CMAKE_CXX_COMPILER)
+ set(CMAKE_CXX_COMPILER ${CROSS}g++)
+endif()
set(CMAKE_CXX_FLAGS_INIT "-march=armv8-a")
set(CMAKE_SYSTEM_PROCESSOR "aarch64")