Skip to content
Snippets Groups Projects
Commit ec2c2306 authored by Trevor Joynson's avatar Trevor Joynson Committed by Daniel Agar
Browse files

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

parent 722e8917
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment