toolchain: clang: arm: do not use fp instruction when CONFIG_FPU=n
Clang uses floating-point instructions by default, even if -mfpu is not defined. Disable using FPU when CONFIG_FPU=n. Using floating-point instructions when FPU is not enabled generates Usage Fault. Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
This commit is contained in:
parent
123f99c87b
commit
b584e2c6d0
|
@ -25,6 +25,10 @@ if(CONFIG_FPU)
|
|||
elseif(CONFIG_FP_SOFTABI)
|
||||
list(APPEND ARM_C_FLAGS -mfloat-abi=softfp)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND ARM_C_FLAGS -mfpu=none)
|
||||
# Disable usage of FPU registers
|
||||
list(APPEND ARM_C_FLAGS -mfloat-abi=soft)
|
||||
endif()
|
||||
|
||||
if(CONFIG_FP16)
|
||||
|
|
Loading…
Reference in New Issue