mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
Merge branch 'bugfix/stack_check_error' into 'master'
esp_system: restore deleted no stack check flag See merge request espressif/esp-idf!9721
This commit is contained in:
commit
9222f5473f
@ -75,12 +75,6 @@ else()
|
||||
add_custom_target(esp32_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld)
|
||||
add_dependencies(${COMPONENT_LIB} esp32_linker_script)
|
||||
|
||||
# disable stack protection in files which are involved in initialization of that feature
|
||||
set_source_files_properties(
|
||||
cpu_start.c
|
||||
PROPERTIES COMPILE_FLAGS
|
||||
-fno-stack-protector)
|
||||
|
||||
if(CONFIG_SPIRAM_CACHE_WORKAROUND)
|
||||
# Note: Adding as a PUBLIC compile option here causes this option to propagate to all components that depend on esp32.
|
||||
#
|
||||
|
@ -40,5 +40,3 @@ esp32_out.ld: $(COMPONENT_PATH)/ld/esp32.ld ../include/sdkconfig.h
|
||||
|
||||
COMPONENT_EXTRA_CLEAN := esp32_out.ld $(COMPONENT_BUILD_DIR)/esp32.project.ld
|
||||
|
||||
# disable stack protection in files which are involved in initialization of that feature
|
||||
cpu_start.o: CFLAGS := $(filter-out -fstack-protector%, $(CFLAGS))
|
||||
|
@ -70,10 +70,4 @@ else()
|
||||
|
||||
add_custom_target(esp32s2_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/esp32s2_out.ld)
|
||||
add_dependencies(${COMPONENT_LIB} esp32s2_linker_script)
|
||||
|
||||
# disable stack protection in files which are involved in initialization of that feature
|
||||
set_source_files_properties(
|
||||
cpu_start.c
|
||||
PROPERTIES COMPILE_FLAGS
|
||||
-fno-stack-protector)
|
||||
endif()
|
||||
|
@ -28,6 +28,7 @@ else()
|
||||
"src/stack_check.c"
|
||||
PROPERTIES COMPILE_FLAGS
|
||||
-fno-stack-protector)
|
||||
|
||||
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_LIBRARIES "-Wl,--gc-sections")
|
||||
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
|
||||
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 4)
|
||||
|
@ -16,4 +16,10 @@ 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()
|
||||
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)
|
@ -5,4 +5,7 @@ COMPONENT_ADD_INCLUDEDIRS := include
|
||||
COMPONENT_PRIV_INCLUDEDIRS := private_include port/include
|
||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||
|
||||
-include $(COMPONENT_PATH)/port/$(SOC_NAME)/component.mk
|
||||
-include $(COMPONENT_PATH)/port/$(SOC_NAME)/component.mk
|
||||
|
||||
# disable stack protection in files which are involved in initialization of that feature
|
||||
startup.o: CFLAGS := $(filter-out -fstack-protector%, $(CFLAGS))
|
2
tools/test_apps/system/startup/sdkconfig.ci.stack_check
Normal file
2
tools/test_apps/system/startup/sdkconfig.ci.stack_check
Normal file
@ -0,0 +1,2 @@
|
||||
CONFIG_COMPILER_STACK_CHECK_MODE_ALL=y
|
||||
CONFIG_COMPILER_STACK_CHECK=y
|
Loading…
x
Reference in New Issue
Block a user