Skip to content

Commit

Permalink
Makefile: remove context dependency to avoid apps context build twice
Browse files Browse the repository at this point in the history
In nuttx pass1dep and pass2dep builds, context firstly would be built once.
It then call 'make -C apps depend' which would trigger the context built twice.
There is race condition between symtab.c generated by mksymtab.sh in second time
and compiling symtab.c in parallel build. So remove context dependency for apps
depend to make sure context build only one time for apps.

Parallel build break logs as below:
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/apps/examples/elf/elf_main.c:357: undefined reference to `g_elf_nexports'
riscv64-unknown-elf-ld: /home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/apps/examples/elf/elf_main.c:357: undefined reference to `g_elf_exports'
make[1]: *** [nuttx] Error 1
make: *** [pass2] Error 2

Change-Id: I2872f7036e7ec86615efc5ebd7c46cee51dc1094
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
  • Loading branch information
liuguo09 authored and masayuki2009 committed Mar 19, 2020
1 parent 0e13730 commit 06c9f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ endif

.depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend)

.depend: context Makefile .depdirs
.depend: Makefile .depdirs
$(Q) touch $@

depend: .depend
Expand Down

0 comments on commit 06c9f93

Please sign in to comment.