xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a 
bit differently
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382382748
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-       $(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   But we can't bypass ARCHIVE and invoke AR directly, you can see there are 
mutiple ARCHIVE defintion in nuttx to fight or workaround the toolchain 
difference. 
   Actually, nuttx give the user freedom to provide own ARCHIVE defintion, so 
the ARCHIVE overload may exist more than we imagine.

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


With regards,
Apache Git Services

Reply via email to