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

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 54b375d  examples: Fix elf/module/posix_spawn sometimes parallel build 
errors at link time
54b375d is described below

commit 54b375dc43680341cc3bb166a893bdc50b705546
Author: liuhaitao <[email protected]>
AuthorDate: Sat Mar 21 17:50:43 2020 +0800

    examples: Fix elf/module/posix_spawn sometimes parallel build errors at 
link time
    
    It seems in the time window mksymtab.sh redirect to symtab.c, there is 
chance symtab.c
    would also be built meantime. Then if built before symtab.c write done, 
link errors may
    occur. So use rename and mv operation to reduce the possibility.
    
    Signed-off-by: liuhaitao <[email protected]>
---
 examples/elf/tests/Makefile              | 3 ++-
 examples/module/drivers/Makefile         | 6 ++++--
 examples/posix_spawn/filesystem/Makefile | 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/examples/elf/tests/Makefile b/examples/elf/tests/Makefile
index fd97821..984bc2d 100644
--- a/examples/elf/tests/Makefile
+++ b/examples/elf/tests/Makefile
@@ -141,7 +141,8 @@ $(DIRLIST_HDR) : populate
 # Create the exported symbol table
 
 $(SYMTAB_SRC): populate
-       $(Q) $(TESTS_DIR)/mksymtab.sh $(FSIMG_DIR) >$@
+       $(Q) $(TESTS_DIR)/mksymtab.sh $(FSIMG_DIR) >[email protected]
+       $(Q) mv [email protected] $@
 
 # Clean each subdirectory
 
diff --git a/examples/module/drivers/Makefile b/examples/module/drivers/Makefile
index 2166051..a336ceb 100644
--- a/examples/module/drivers/Makefile
+++ b/examples/module/drivers/Makefile
@@ -123,14 +123,16 @@ endif
 # Create the exported symbol table
 
 $(SYMTAB_SRC): populate
-       $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >$@
+       $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >[email protected]
+       $(Q) mv [email protected] $@
 
 else
 
 # Create the exported symbol table
 
 $(SYMTAB_SRC): populate
-       $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >$@
+       $(Q) $(DRIVER_DIR)/mksymtab.sh $(FSROOT_DIR) >[email protected]
+       $(Q) mv [email protected] $@
 
 endif
 
diff --git a/examples/posix_spawn/filesystem/Makefile 
b/examples/posix_spawn/filesystem/Makefile
index c9541ef..34c3e21 100644
--- a/examples/posix_spawn/filesystem/Makefile
+++ b/examples/posix_spawn/filesystem/Makefile
@@ -78,7 +78,8 @@ $(ROMFS_HDR) : $(ROMFS_IMG)
 # Create the exported symbol table
 
 $(SYMTAB_SRC): $(ROMFS_IMG)
-       $(Q) $(FILESYSTEM_DIR)$(DELIM)mksymtab.sh $(ROMFS_DIR) >$@
+       $(Q) $(FILESYSTEM_DIR)$(DELIM)mksymtab.sh $(ROMFS_DIR) >[email protected]
+       $(Q) mv [email protected] $@
 
 # Clean each subdirectory
 

Reply via email to