From 8fffb9d17294f8b13d3bba3aee9efd78f4323069 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 29 Jan 2019 17:41:00 +0800 Subject: [PATCH] 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. --- components/esp32/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/esp32/CMakeLists.txt b/components/esp32/CMakeLists.txt index eb2012964d..5416ad2256 100644 --- a/components/esp32/CMakeLists.txt +++ b/components/esp32/CMakeLists.txt @@ -142,4 +142,9 @@ else() 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() -- 2.40.0