gcov: Prevent pile insertion recursion

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-12-13 11:29:21 +08:00 committed by Xiang Xiao
parent ba50378f01
commit 3d99bae59a
2 changed files with 9 additions and 0 deletions

View file

@ -25,5 +25,7 @@ endif()
if(CONFIG_COVERAGE_MINI AND CONFIG_ARCH_TOOLCHAIN_GCC)
nuttx_add_system_library(libcoverage)
target_compile_options(libcoverage PRIVATE -fno-profile-arcs
-fno-test-coverage)
target_sources(libcoverage PRIVATE gcov.c)
endif()

View file

@ -24,6 +24,13 @@ endif
ifeq ($(CONFIG_COVERAGE_MINI)$(CONFIG_ARCH_TOOLCHAIN_GCC),yy)
CSRCS += gcov.c
GCOV_CFLAGS += -fno-profile-arcs -fno-test-coverage
GCOV_CFLAGS += -fno-stack-protector
bin/gcov.o: CFLAGS += $(GCOV_CFLAGS)
kbin/gcov.o: CFLAGS += $(GCOV_CFLAGS)
endif
DEPPATH += --dep-path libgcc