From b5e57a8523ad995aabf6043e14f56c14c66c7410 Mon Sep 17 00:00:00 2001 From: Konrad Dybcio Date: Wed, 20 Oct 2021 12:19:27 +0200 Subject: [PATCH] [SDK][CMAKE] config.cmake: Add ARM64 compiler options (#4050) Add generic compiler options for ARM64. Signed-off-by: Konrad Dybcio --- sdk/cmake/config.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sdk/cmake/config.cmake b/sdk/cmake/config.cmake index f0c2850c86c..020f0c7eda4 100644 --- a/sdk/cmake/config.cmake +++ b/sdk/cmake/config.cmake @@ -10,6 +10,12 @@ elseif(ARCH STREQUAL "arm") set(SARCH "omap3-zoom2" CACHE STRING "Sub-architecture (board) to build for. Specify one of: kurobox versatile omap3-zoom2 omap3-beagle") +elseif(ARCH STREQUAL "arm64") + # By design, arm64 kernels and OSes should be intercompatible, but + # due to SoC vendors seemingly not being able to follow ARM design guidelines + # properly, there might be a need for board-specific builds later on... + set(SARCH "" CACHE STRING + "Sub-architecture (board) to build for.") endif() if(ARCH STREQUAL "i386") @@ -24,6 +30,12 @@ elseif(ARCH STREQUAL "arm") set(OARCH "armv7-a" CACHE STRING "Generate instructions for this CPU type. Specify one of: armv5te armv7-a") +elseif(ARCH STREQUAL "arm64") + # This should not be bumped unless REALLY needed, because (as of 2021) + # there are still new designs using the original A53 cores w/ armv8.0. + set(OARCH "armv8-a" CACHE STRING + "Generate instructions for this CPU type. Specify one of: + armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a") endif() if(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64") @@ -32,6 +44,9 @@ if(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64") elseif(ARCH STREQUAL "arm") set(TUNE "generic-armv7-a" CACHE STRING "Which CPU ReactOS should be optimized for.") +elseif(ARCH STREQUAL "arm64") + set(TUNE "generic" CACHE STRING + "Which CPU ReactOS should be optimized for.") endif() set(OPTIMIZE "4" CACHE STRING