From b193d975329232d1b1a0202019028a274d66bea7 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Thu, 11 Mar 2021 11:54:04 +0000 Subject: [PATCH] CMake: Fix Cortex-A9 flags for GCC_ARM toolchain The -mcpu=cortex-a9 flag conflicts with the march=armv7-a flag. Opted to keep mcpu=cortex-a9 as it is more specific and allows GCC to perform better optimization. The compiler is also changed to use soft-float ABI as it was necessary to successfully build. Without it the application appears to be built with soft-float ABI and it conflicts with the previous setting which was built with hard-float ABI. This may be related to: https://gitlab.kitware.com/cmake/cmake/-/issues/21173 --- tools/cmake/cores/Cortex-A9.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/cmake/cores/Cortex-A9.cmake b/tools/cmake/cores/Cortex-A9.cmake index 85be417a95..228588ea4a 100644 --- a/tools/cmake/cores/Cortex-A9.cmake +++ b/tools/cmake/cores/Cortex-A9.cmake @@ -5,9 +5,8 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") list(APPEND common_options "-mthumb-interwork" "-marm" - "-march=armv7-a" "-mfpu=vfpv3" - "-mfloat-abi=hard" + "-mfloat-abi=softfp" "-mno-unaligned-access" "-mcpu=cortex-a9" )