esp-idf/components/esp_system/CMakeLists.txt
Renz Bagaporo 837052c86f esp_system: restore deleted no stack check flag
Restores the change of startup refactor changes removed the no stack
check protection flag when compiling the source file that contains
execution of constructors - which contains function to setup stack
guard. Restore that and update the source file, since this is in the 2nd
stage of the startup now.

Closes https://github.com/espressif/esp-idf/issues/5617
2020-07-22 11:57:18 +08:00

25 lines
1.1 KiB
CMake

idf_component_register(SRCS "panic.c" "system_api.c" "startup.c"
INCLUDE_DIRS include
PRIV_INCLUDE_DIRS private_include
PRIV_REQUIRES spi_flash app_update
# requirements due to startup code
nvs_flash pthread app_trace
LDFRAGMENTS "linker.lf")
add_subdirectory(port)
# After system initialization, `start_app` (and its other cores variant) is called.
# This is provided by the user or from another component. Since we can't establish
# dependency on what we don't know, force linker to not drop the symbol regardless
# of link line order.
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u start_app")
if (NOT CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u start_app_other_cores")
endif()
# Disable stack protection in files which are involved in initialization of that feature
set_source_files_properties(
startup.c
PROPERTIES COMPILE_FLAGS
-fno-stack-protector)