From 11620233e1a303dcc60f48fc7103cb55d84270cc Mon Sep 17 00:00:00 2001 From: Hyeongseok Oh Date: Thu, 14 Dec 2023 10:00:41 +0900 Subject: [PATCH] [infra] Fix compile CPU type option (#12287) This commit fixes armv7 CPU type option to set `march` and `mtune` and remove `mcpu`. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh --- infra/nnfw/cmake/buildtool/config/config_armv7hl-tizen.cmake | 3 ++- infra/nnfw/cmake/buildtool/config/config_armv7l-linux.cmake | 3 ++- infra/nnfw/cmake/buildtool/config/config_armv7l-tizen.cmake | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/infra/nnfw/cmake/buildtool/config/config_armv7hl-tizen.cmake b/infra/nnfw/cmake/buildtool/config/config_armv7hl-tizen.cmake index dec1b4afbb7..363a3e80f7c 100644 --- a/infra/nnfw/cmake/buildtool/config/config_armv7hl-tizen.cmake +++ b/infra/nnfw/cmake/buildtool/config/config_armv7hl-tizen.cmake @@ -14,7 +14,8 @@ include("cmake/buildtool/config/config_linux.cmake") # addition for arm-linux set(FLAGS_COMMON ${FLAGS_COMMON} - "-mtune=cortex-a8" + "-march=armv7-a" + "-mtune=cortex-a15.cortex-a7" "-mfloat-abi=hard" "-mfpu=neon-vfpv4" "-funsafe-math-optimizations" diff --git a/infra/nnfw/cmake/buildtool/config/config_armv7l-linux.cmake b/infra/nnfw/cmake/buildtool/config/config_armv7l-linux.cmake index 8963f300865..f3c52d7cc52 100644 --- a/infra/nnfw/cmake/buildtool/config/config_armv7l-linux.cmake +++ b/infra/nnfw/cmake/buildtool/config/config_armv7l-linux.cmake @@ -9,7 +9,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/config_linux.cmake") # addition for arm-linux set(FLAGS_COMMON ${FLAGS_COMMON} - "-mcpu=cortex-a7" + "-march=armv7-a" + "-mtune=cortex-a15.cortex-a7" "-mfloat-abi=hard" "-mfpu=neon-vfpv4" "-ftree-vectorize" diff --git a/infra/nnfw/cmake/buildtool/config/config_armv7l-tizen.cmake b/infra/nnfw/cmake/buildtool/config/config_armv7l-tizen.cmake index fa12ecb5539..a43f9e0497a 100644 --- a/infra/nnfw/cmake/buildtool/config/config_armv7l-tizen.cmake +++ b/infra/nnfw/cmake/buildtool/config/config_armv7l-tizen.cmake @@ -14,7 +14,8 @@ include("cmake/buildtool/config/config_linux.cmake") # addition for arm-linux set(FLAGS_COMMON ${FLAGS_COMMON} - "-mtune=cortex-a8" + "-march=armv7-a" + "-mtune=cortex-a15.cortex-a7" "-mfloat-abi=softfp" "-mfpu=neon-vfpv4" "-funsafe-math-optimizations"