700e4bd2e8
Removing ${} variable evaluation fixes the issue. For sam4s_xplained: Before: /repos/zephyr/samples/hello_world/build$ make VERBOSE=1 | grep march /repos/zephyr/samples/hello_world/build$ After: /repos/zephyr/samples/hello_world/build$ make VERBOSE=1 | grep march ... -mthumb -mcpu=cortex-m4 -march=armv7e-m ... Signed-off-by: Paolo Teti <paolo.teti@gmail.com>
24 lines
573 B
CMake
24 lines
573 B
CMake
zephyr_cc_option_ifdef(CONFIG_LTO -flto)
|
|
|
|
set(ARCH_FOR_cortex-m0 armv6-m )
|
|
set(ARCH_FOR_cortex-m0plus armv6-m )
|
|
set(ARCH_FOR_cortex-m3 armv7-m )
|
|
set(ARCH_FOR_cortex-m4 armv7e-m )
|
|
set(ARCH_FOR_cortex-m23 armv8-m.base)
|
|
set(ARCH_FOR_cortex-m33 armv8-m.main)
|
|
|
|
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
|
|
|
|
if(ARCH_FOR_${GCC_M_CPU})
|
|
set(ARCH_FLAG -march=${ARCH_FOR_${GCC_M_CPU}})
|
|
endif()
|
|
|
|
zephyr_compile_options(
|
|
-mabi=aapcs
|
|
${TOOLCHAIN_C_FLAGS}
|
|
${ARCH_FLAG}
|
|
)
|
|
|
|
add_subdirectory(soc)
|
|
add_subdirectory(core)
|