mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'bugfix/link_gcov_rtio_backport_v4.1' into 'release/v4.1'
Bugfix/link gcov rtio backport v4.1 See merge request espressif/esp-idf!13834
This commit is contained in:
@ -33,10 +33,14 @@ idf_component_register(SRCS "${srcs}"
|
|||||||
PRIV_REQUIRES soc
|
PRIV_REQUIRES soc
|
||||||
LDFRAGMENTS linker.lf)
|
LDFRAGMENTS linker.lf)
|
||||||
|
|
||||||
# disable --coverage for this component, as it is used as transport
|
|
||||||
# for gcov
|
|
||||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-coverage")
|
|
||||||
|
|
||||||
# Force app_trace to also appear later than gcov in link line
|
if(CONFIG_APPTRACE_GCOV_ENABLE)
|
||||||
idf_component_get_property(app_trace app_trace COMPONENT_LIB)
|
# disable --coverage for this component, as it is used as transport
|
||||||
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${app_trace}> gcov $<TARGET_FILE:${app_trace}> c)
|
# for gcov
|
||||||
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-coverage")
|
||||||
|
|
||||||
|
# Force app_trace to also appear later than gcov in link line
|
||||||
|
idf_component_get_property(app_trace app_trace COMPONENT_LIB)
|
||||||
|
target_link_libraries(${COMPONENT_LIB} INTERFACE
|
||||||
|
"-Wl,--undefined=gcov_rtio_atexit" $<TARGET_FILE:${app_trace}> gcov $<TARGET_FILE:${app_trace}> c)
|
||||||
|
endif()
|
||||||
|
@ -8,11 +8,7 @@ COMPONENT_ADD_INCLUDEDIRS = include
|
|||||||
|
|
||||||
COMPONENT_ADD_LDFLAGS = -lapp_trace
|
COMPONENT_ADD_LDFLAGS = -lapp_trace
|
||||||
|
|
||||||
# do not produce gcov info for this module, it is used as transport for gcov
|
|
||||||
CFLAGS := $(subst --coverage,,$(CFLAGS))
|
|
||||||
|
|
||||||
ifdef CONFIG_SYSVIEW_ENABLE
|
ifdef CONFIG_SYSVIEW_ENABLE
|
||||||
|
|
||||||
COMPONENT_ADD_INCLUDEDIRS += \
|
COMPONENT_ADD_INCLUDEDIRS += \
|
||||||
sys_view/Config \
|
sys_view/Config \
|
||||||
sys_view/SEGGER \
|
sys_view/SEGGER \
|
||||||
@ -26,7 +22,12 @@ COMPONENT_SRCDIRS += \
|
|||||||
sys_view/esp32 \
|
sys_view/esp32 \
|
||||||
sys_view/ext
|
sys_view/ext
|
||||||
else
|
else
|
||||||
|
ifdef CONFIG_APPTRACE_GCOV_ENABLE
|
||||||
|
# do not produce gcov info for this module, it is used as transport for gcov
|
||||||
|
CFLAGS := $(subst --coverage,,$(CFLAGS))
|
||||||
|
COMPONENT_ADD_LDFLAGS += -Wl,--undefined=gcov_rtio_atexit
|
||||||
COMPONENT_SRCDIRS += gcov
|
COMPONENT_SRCDIRS += gcov
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||||
|
Reference in New Issue
Block a user