Skip to content

Commit b193d97

Browse files
committed
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
1 parent 8a19e3e commit b193d97

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/cmake/cores/Cortex-A9.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
55
list(APPEND common_options
66
"-mthumb-interwork"
77
"-marm"
8-
"-march=armv7-a"
98
"-mfpu=vfpv3"
10-
"-mfloat-abi=hard"
9+
"-mfloat-abi=softfp"
1110
"-mno-unaligned-access"
1211
"-mcpu=cortex-a9"
1312
)

0 commit comments

Comments
 (0)