From c3f4a8323984c279e143e634e7645eac86558b12 Mon Sep 17 00:00:00 2001 From: Lior Dekel Date: Thu, 2 Dec 2021 10:58:12 +0200 Subject: Corstone700 Kernel modules build fix. JIRA: MLBEDSW-5531 Change-Id: Ib4b6b6b0ee3995bb01029d561c4cf7eed981a303 --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4711a19..e447afb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,15 @@ option(BUILD_KERNEL "Build the kernel driver" ON) option(BUILD_MAILBOX "Build the MHU mailbox kernel module" ON) option(BUILD_REMOTEPROC "Build the remoteproc kernel module" ON) +# Set variables +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(ARCH "arm64") +else() + set(ARCH "arm") +endif() + +string(REGEX REPLACE "(.*)gcc$" "\\1" CROSS_COMPILE "${CMAKE_C_COMPILER}") + # Add rpath to library directory set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") @@ -42,7 +51,7 @@ if (BUILD_MAILBOX) endif() if (BUILD_REMOTEPROC) -add_subdirectory(remoteproc) + add_subdirectory(remoteproc) endif() # Build flatbuffers -- cgit v1.2.1