You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/07/11 18:06:19 UTC
[incubator-nuttx] 02/04: arch/sim: Avoid build nuttx.rel and
cleanrel concurrently
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit f36bf5e07973e57cb3fb4015c63ce06c31fd9485
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Jul 9 13:57:30 2020 +0800
arch/sim: Avoid build nuttx.rel and cleanrel concurrently
make can't guarantee the build order of prerequest with -jn where n > 1
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: I772fcc0775d15b385f28fc0abeeff383b3a52622
---
arch/sim/src/Makefile | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index d6fdf23..4042337 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -280,18 +280,15 @@ board/libboard$(LIBEXT):
nuttx-names.dat: nuttx-names.in
$(call PREPROCESS, $<, $@)
-nuttx.rel: libarch$(LIBEXT) board/libboard$(LIBEXT) nuttx-names.dat $(LINKOBJS)
- $(Q) echo "LD: nuttx.rel"
- $(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 $@
-endif
-
# Generate the final NuttX binary by linking the host-specific objects with the NuttX
# specific objects (with munged names)
-nuttx$(EXEEXT): cleanrel nuttx.rel $(HOSTOBJS)
+nuttx$(EXEEXT): libarch$(LIBEXT) board/libboard$(LIBEXT) nuttx-names.dat $(LINKOBJS) $(HOSTOBJS)
$(Q) echo "LD: nuttx$(EXEEXT)"
+ $(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o nuttx.rel $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP) $(LDUNEXPORTSYMBOLS)
+ifneq ($(HOSTOS),Darwin)
+ $(Q) $(OBJCOPY) --redefine-syms=nuttx-names.dat nuttx.rel
+endif
$(if $(CONFIG_HAVE_CXX),\
$(Q) "$(CXX)" $(CCLINKFLAGS) $(LIBPATHS) -o $(TOPDIR)/$@ nuttx.rel $(HOSTOBJS) $(DRVLIB) $(STDLIBS),\
$(Q) "$(CC)" $(CCLINKFLAGS) $(LIBPATHS) -o $(TOPDIR)/$@ nuttx.rel $(HOSTOBJS) $(DRVLIB) $(STDLIBS))
@@ -317,15 +314,12 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)
depend: .depend
-cleanrel:
- $(call DELFILE, nuttx-names.dat)
- $(call DELFILE, nuttx.rel)
-
-clean: cleanrel
+clean:
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
$(call DELFILE, nuttx.rel)
+ $(call DELFILE, nuttx-names.dat)
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)