Remove conflicting optimization flags (-mcpu includes -march) (#10165)

This commit is contained in:
Trevor Joynson 2018-08-05 07:09:38 -07:00 committed by Daniel Agar
parent 722e891730
commit ec2c230633
1 changed files with 3 additions and 3 deletions

View File

@ -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()