From 825d0fa170f821f7553ae258cc2bb2a19152906a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Wed, 19 Sep 2018 13:27:01 +0200 Subject: [PATCH] kconfig: Make CONIG_FP_SOFTABI generate floating point instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This re-applies a patch that was merged in pr #6989, but then accidentally reverted in a bad merge conflict resolution in pr #6842. The actual behaviour of CONIG_FP_SOFTABI has not been matching the documenation. The Kconfig documentation states that floating point instructions should be generated, but this Kconfig option has been turning off floating point instructions instead. This commit causes floating point instructions to be generated when CONFIG_FP_SOFTABI is enabled, as was originally intended and documented. This commit can cause regressions if users have been relying on the actual behaviour instead of the documented behaviour. Kconfig documentation: config FP_SOFTABI help This option selects the Floating point ABI in which hardware floating point instructions are generated but soft-float calling conventions. GCC documentation: Specifying ‘soft’ causes GCC to generate output containing library calls for floating-point operations. ‘softfp’ allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. ‘hard’ allows generation of floating-point instructions and uses FPU-specific calling conventions. Signed-off-by: Sebastian Bøe --- cmake/compiler/gcc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/compiler/gcc.cmake b/cmake/compiler/gcc.cmake index ca9031c24b5a5..a8b580888736b 100644 --- a/cmake/compiler/gcc.cmake +++ b/cmake/compiler/gcc.cmake @@ -93,7 +93,7 @@ else() if(CONFIG_FLOAT) list(APPEND TOOLCHAIN_C_FLAGS -mfpu=${FPU_FOR_${GCC_M_CPU}}) if (CONFIG_FP_SOFTABI) - list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=soft) + list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=softfp) elseif(CONFIG_FP_HARDABI) list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=hard) endif()