anchao commented on a change in pull request #1293:
URL: https://github.com/apache/incubator-nuttx/pull/1293#discussion_r444884467



##########
File path: arch/sim/src/Makefile
##########
@@ -316,7 +316,8 @@ export_startup: board/libboard$(LIBEXT) up_head.o 
$(HOSTOBJS)
 depend: .depend
 
 cleanrel:
-       $(Q) rm -f nuttx.rel nuttx-names.dat
+       $(call DELFILE, nuttx-names.dat)
+       $(call DELFILE, nuttx.rel)

Review comment:
       Race condition just in the order of deleting files, delete the nuttx.rel 
first will cause the target regeneration again, if the nuttx-names.dat deleted 
at this time, the compile will fail.
   
   ```
   nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) nuttx-names.dat 
$(LINKOBJS)
     $(Q) echo "LD:  nuttx.rel"
    /*     nuttx-names.dat will be deleted at this phase    */
     $(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o $@ 
$(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP) 
$(LDUNEXPORTSYMBOLS)
   ifneq ($(HOSTOS),Darwin)
     $(Q) $(OBJCOPY) --redefine-syms=nuttx-names.dat $@  /* nuttx-names.dat has 
been deleted */
   endif
   ```
   
   
    nuttx-names.dat to be delete later 




----------------------------------------------------------------
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.

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


Reply via email to