forked from Archive/PX4-Autopilot
Remove conflicting optimization flags (-mcpu includes -march) (#10165)
This commit is contained in:
parent
722e891730
commit
ec2c230633
|
@ -55,11 +55,11 @@ endforeach()
|
|||
|
||||
set(cpu_flags)
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m7")
|
||||
set(cpu_flags "-mcpu=cortex-m7 -mthumb -march=armv7e-m -mfpu=fpv5-d16 -mfloat-abi=hard")
|
||||
set(cpu_flags "-mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard")
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m4")
|
||||
set(cpu_flags "-mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard")
|
||||
set(cpu_flags "-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard")
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m3")
|
||||
set(cpu_flags "-mcpu=cortex-m3 -mthumb -march=armv7-m")
|
||||
set(cpu_flags "-mcpu=cortex-m3 -mthumb")
|
||||
else ()
|
||||
message(FATAL_ERROR "Processor not recognised in toolchain file")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue