From: Ivan Grokhotkov Date: Tue, 29 Jan 2019 09:41:00 +0000 (+0800) Subject: esp32: disable stack protector for startup code (CMake) X-Git-Tag: v3.2-beta3~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e674fb4ed5d89916c8662f6720811c684448018;p=esp-idf esp32: disable stack protector for startup code (CMake) 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. --- diff --git a/components/esp32/CMakeLists.txt b/components/esp32/CMakeLists.txt index 92b75a4cee..735084f556 100644 --- a/components/esp32/CMakeLists.txt +++ b/components/esp32/CMakeLists.txt @@ -148,4 +148,10 @@ else() if(NOT "${BUILD_TEST_COMPONENTS}" EQUAL "") 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()