Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
Add toolchain for aarch64 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
primenumber authored Jul 1, 2019
1 parent cb6c06f commit c3689d4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions dlk/python/dlk/templates/cmake/toolchain/linux_aarch64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Please, if you want to use a specific toolchain and sysroot
# define TOOLCHAIN_PATH and CMAKE_SYSROOT variables:
#
set(TOOLCHAIN_PATH "")
set(CMAKE_SYSROOT "")


#
# Cross-compiling for ARM
#
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

if(NOT TOOLCHAIN_PATH)
set(TOOLCHAIN_BIN_PATH "")
else()
set(TOOLCHAIN_BIN_PATH ${TOOLCHAIN_PATH}/bin/)
endif()

set(CMAKE_CXX_COMPILER ${TOOLCHAIN_BIN_PATH}aarch64-linux-gnu-g++)
set(CMAKE_ASM_COMPILER ${TOOLCHAIN_BIN_PATH}aarch64-linux-gnu-g++)
set(CMAKE_CXX_COMPILER_AR ${TOOLCHAIN_BIN_PATH}aarch64-linux-gnu-ar)

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)

0 comments on commit c3689d4

Please sign in to comment.