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
The following commit(s) were added to refs/heads/master by this push:
new 93b2798e303 arch/sim: Track sim_head dependencies
93b2798e303 is described below
commit 93b2798e30355672c8b68cdbb2ce382a5a4fd8ab
Author: hanzhijian <[email protected]>
AuthorDate: Mon Jul 27 10:08:29 2026 +0800
arch/sim: Track sim_head dependencies
sim_head.c is linked separately from libarch, so it was omitted from the
source and dependency lists. Track its source independently so
configuration and header changes rebuild sim_head.o while preserving its
link behavior.
Assisted-by: Codex:gpt-5.6 Sol
Signed-off-by: hanzhijian <[email protected]>
---
arch/sim/src/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index d238853df6f..ffff6f58854 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -57,7 +57,8 @@ NUTTX = $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx$(EXEEXT))
# there are a fews that must be included because they
# are called only from the host OS-specific logic(HOSTOBJS)
-LINKOBJS = sim_head$(OBJEXT)
+LINKSRCS = sim_head.c
+LINKOBJS = $(LINKSRCS:.c=$(OBJEXT))
REQUIREDOBJS = $(LINKOBJS) sim_doirq$(OBJEXT)
ifeq ($(CONFIG_SIM_NETUSRSOCK),y)
REQUIREDOBJS += sim_usrsock$(OBJEXT)
@@ -346,7 +347,7 @@ NUTTXOBJS = $(AOBJS) $(COBJS)
HOSTOBJS = $(HOSTCOBJS) $(HOSTMOBJS)
HEADOBJ = $(HEADSRC:.c=$(OBJEXT))
-SRCS = $(ASRCS) $(CSRCS) $(HOSTSRCS) $(HOSTMSRCS)
+SRCS = $(ASRCS) $(CSRCS) $(HOSTSRCS) $(HOSTMSRCS) $(LINKSRCS)
OBJS = $(AOBJS) $(COBJS) $(HOSTOBJS)
$(foreach lib,$(notdir $(wildcard
$(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))), \
@@ -529,7 +530,8 @@ export_startup: sim_head.o $(HOSTOBJS) nuttx-names.dat
# Dependencies
-makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(HOSTSRCS:.c=.ddh)
+makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) \
+ $(HOSTSRCS:.c=.ddh) $(LINKSRCS:.c=.ddc)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
@@ -565,7 +567,8 @@ distclean:: clean
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board distclean ; \
fi
- $(call DELFILE, $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(HOSTSRCS:.c=.ddh))
+ $(call DELFILE, $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) \
+ $(HOSTSRCS:.c=.ddh) $(LINKSRCS:.c=.ddc))
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
$(call DELFILE, config.h)