Files where stack protector is initialized should not be compiled with
stack protector enabled. This was done for Make but missing for CMake.
Fixes https://github.com/espressif/esp-idf/issues/2990.
if(esp32_test IN_LIST BUILD_TEST_COMPONENTS)
add_definitions(-DESP_TIMER_DYNAMIC_OVERFLOW_VAL)
endif()
+
+ # disable stack protection in files which are involved in initialization of that feature
+ set_source_files_properties(
+ stack_check.c cpu_start.c
+ PROPERTIES COMPILE_FLAGS
+ -fno-stack-protector)
endif()