Skip to content

Commit

Permalink
cmake: armclang: Handle -mfpu=auto used by cortex-m55
Browse files Browse the repository at this point in the history
arm-clang utilizes the gcc fpu flags, however -mfpu=auto is not a
supported option in arm-clang.  For arm-clang we can mimic the auto
behavior by just not setting the -mfpu option.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak authored and carlescufi committed Apr 27, 2023
1 parent bfeb504 commit f30235f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/compiler/armclang/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ else()
list(APPEND TOOLCHAIN_C_FLAGS -mabi=aapcs)

if(CONFIG_FPU)
list(APPEND TOOLCHAIN_C_FLAGS -mfpu=${GCC_M_FPU})
if(NOT "${GCC_M_FPU}" STREQUAL "auto")
list(APPEND TOOLCHAIN_C_FLAGS -mfpu=${GCC_M_FPU})
endif()
if (CONFIG_FP_SOFTABI)
list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=softfp)
elseif(CONFIG_FP_HARDABI)
Expand Down

0 comments on commit f30235f

Please sign in to comment.