build: Use flock to serialize ar steps as workaround
Use flock to serialize ar steps to avoid parallel build break sometimes.
This commit is contained in:
parent
f28eca9dbc
commit
6707bfae86
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
.arlock
|
||||||
.depend
|
.depend
|
||||||
Make.dep
|
Make.dep
|
||||||
*.o
|
*.o
|
||||||
|
@ -130,9 +130,9 @@ $(CXXOBJS): %$(SUFFIX)$(OBJEXT): %$(CXXEXT)
|
|||||||
|
|
||||||
.built: $(OBJS)
|
.built: $(OBJS)
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
$(call ARCHIVE, "${shell cygpath -w $(BIN)}", $(OBJS))
|
$(call ARLOCK, "${shell cygpath -w $(BIN)}", $(OBJS))
|
||||||
else
|
else
|
||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARLOCK, $(BIN), $(OBJS))
|
||||||
endif
|
endif
|
||||||
$(Q) touch $@
|
$(Q) touch $@
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ CLEANDIRS := $(dir $(wildcard $(APPDIR)$(DELIM)*$(DELIM)Makefile))
|
|||||||
CONFIGURED_APPS :=
|
CONFIGURED_APPS :=
|
||||||
|
|
||||||
define Add_Application
|
define Add_Application
|
||||||
include $(1)Make.defs
|
include $(1)Make.defs
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach BDIR, $(BUILDIRS), $(eval $(call Add_Application,$(BDIR))))
|
$(foreach BDIR, $(BUILDIRS), $(eval $(call Add_Application,$(BDIR))))
|
||||||
@ -99,6 +99,10 @@ define REGISTER
|
|||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
define ARLOCK
|
||||||
|
$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
|
||||||
|
endef
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
|
|
||||||
ifeq ($(DIRLINK),)
|
ifeq ($(DIRLINK),)
|
||||||
|
5
Makefile
5
Makefile
@ -117,9 +117,9 @@ $(SYMTABOBJ): %$(OBJEXT): %.c
|
|||||||
|
|
||||||
$(BIN): $(SYMTABOBJ)
|
$(BIN): $(SYMTABOBJ)
|
||||||
ifeq ($(WINTOOL),y)
|
ifeq ($(WINTOOL),y)
|
||||||
$(call ARCHIVE, "${shell cygpath -w $(BIN)}", $^)
|
$(call ARLOCK, "${shell cygpath -w $(BIN)}", $^)
|
||||||
else
|
else
|
||||||
$(call ARCHIVE, $(BIN), $^)
|
$(call ARLOCK, $(BIN), $^)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif # !CONFIG_BUILD_LOADABLE
|
endif # !CONFIG_BUILD_LOADABLE
|
||||||
@ -198,6 +198,7 @@ else
|
|||||||
fi; \
|
fi; \
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
$(call DELFILE, .arlock)
|
||||||
$(call DELFILE, .depend)
|
$(call DELFILE, .depend)
|
||||||
$(call DELFILE, $(SYMTABSRC))
|
$(call DELFILE, $(SYMTABSRC))
|
||||||
$(call DELFILE, $(SYMTABOBJ))
|
$(call DELFILE, $(SYMTABOBJ))
|
||||||
|
Loading…
Reference in New Issue
Block a user