aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLior Dekel <Lior.dekel@arm.com>2021-12-02 10:58:12 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-12-16 11:44:27 +0000
commitc3f4a8323984c279e143e634e7645eac86558b12 (patch)
treec757d0463840854e2e30287176ddc6c796e51502 /CMakeLists.txt
parentafb399f7b39029280a36d4f727320e8842344dac (diff)
downloadethos-u-linux-driver-stack-c3f4a8323984c279e143e634e7645eac86558b12.tar.gz
Corstone700 Kernel modules build fix.
JIRA: MLBEDSW-5531 Change-Id: Ib4b6b6b0ee3995bb01029d561c4cf7eed981a303
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
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