xiaoxiang781216 commented on code in PR #20813:
URL: https://github.com/apache/nuttx/pull/20813#discussion_r4332605173


##########
libs/libc/libc.csv:
##########
@@ -1,6 +1,12 @@
 "__assert","assert.h","","void","FAR const char *","int","FAR const char *"
 "__cxa_atexit","stdlib.h","","int","FAR CODE void (*)(FAR void *)|FAR void 
*","FAR void *","FAR void *"
 "__errno","errno.h","defined(CONFIG_BUILD_FLAT)","FAR int *"
+"__gcov_dump","gcov.h","defined(CONFIG_COVERAGE_MINI) && 
defined(CONFIG_ARCH_TOOLCHAIN_GCC)","void"

Review Comment:
   let's support these functions for other setting later



##########
tools/Config.mk:
##########
@@ -70,6 +70,23 @@ MODULECC ?= $(CC)
 MODULELD ?= $(LD)
 MODULESTRIP ?= $(STRIP)
 
+# A loadable module of a flat or protected build can use the coverage
+# functions of the image only with CONFIG_COVERAGE_MINI and GCC.  Otherwise
+# the arch Toolchain.defs adds these options to the module options, so that
+# a module and its crt0 are built without the coverage of CONFIG_COVERAGE_ALL.
+
+ifeq ($(CONFIG_COVERAGE_ALL),y)

Review Comment:
   why not skip adding the coverage related option in the initial phase which 
is simpler than patching here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to