This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8f87734a8e589243166271f04b2d9fac6e4d2e90
Author: huojianchao <[email protected]>
AuthorDate: Fri Nov 20 09:38:55 2026 +0800

    libs/libc/gdbstub: fix the key of the per-file CFLAGS in Make.defs
    
    The make build looks the flags of a file up by its path relative to
    libs/libc, as in assert/lib_assert.c_CFLAGS, so lib_gdbstub.c_CFLAGS
    was never used and lib_gdbstub.c was still built with
    -fsanitize=kernel-address under CONFIG_MM_KASAN.  Use
    gdbstub/lib_gdbstub.c_CFLAGS.
    
    [skip-cmake-parity]: libs/libc/gdbstub/CMakeLists.txt already sets
    the flag on lib_gdbstub.c, only the make build needs the fix.
    
    Signed-off-by: huojianchao <[email protected]>
---
 libs/libc/gdbstub/Make.defs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libc/gdbstub/Make.defs b/libs/libc/gdbstub/Make.defs
index 637781a4b85..f7f82deb575 100644
--- a/libs/libc/gdbstub/Make.defs
+++ b/libs/libc/gdbstub/Make.defs
@@ -27,7 +27,7 @@ ifeq ($(CONFIG_LIB_GDBSTUB),y)
 CSRCS += lib_gdbstub.c
 
 ifneq ($(CONFIG_MM_KASAN),)
-lib_gdbstub.c_CFLAGS += -fno-sanitize=kernel-address
+gdbstub/lib_gdbstub.c_CFLAGS += -fno-sanitize=kernel-address
 endif
 
 # Add the userfs directory to the build

Reply via email to