<p>Guido Falsi has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14401">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjproject: Fix race condition when building with parallel make<br><br>Pjproject makefiles miss some dependencies which can cause race<br>conditions when building with parallel make processes. This patch<br>adds such dependencies correctly.<br><br>ASTERISK-28879 #close<br>Reported-by: Dmitry Wagin <dmitry.wagin@ya.ru><br><br>Change-Id: Ie1b0dc365dafe4a84c5248097fe8d73804043c22<br>---<br>A third-party/pjproject/patches/0050-fix-race-parallel-build.patch<br>1 file changed, 59 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/01/14401/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/third-party/pjproject/patches/0050-fix-race-parallel-build.patch b/third-party/pjproject/patches/0050-fix-race-parallel-build.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..da8ff86</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/patches/0050-fix-race-parallel-build.patch</span><br><span>@@ -0,0 +1,59 @@</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/build/rules.mak b/build/rules.mak</span><br><span style="color: hsl(120, 100%, 40%);">+index 8fa98655e..912199c41 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/build/rules.mak</span><br><span>++++ b/build/rules.mak</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -129,7 +129,7 @@ endif</span><br><span style="color: hsl(120, 100%, 40%);">+ $(OBJDIR)/$(app).o: $(OBJDIRS) $(OBJS)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CROSS_COMPILE)ld -r -o $@ $(OBJS)</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+-$(OBJDIR)/$(app).ko: $(OBJDIR)/$(app).o</span><br><span style="color: hsl(120, 100%, 40%);">++$(OBJDIR)/$(app).ko: $(OBJDIR)/$(app).o | $(OBJDIRS)</span><br><span style="color: hsl(120, 100%, 40%);">+ @echo Creating kbuild Makefile...</span><br><span style="color: hsl(120, 100%, 40%);">+ @echo "# Our module name:" > $(OBJDIR)/Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+ @echo 'obj-m += $(app).o' >> $(OBJDIR)/Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -154,27 +154,27 @@ $(OBJDIR)/$(app).ko: $(OBJDIR)/$(app).o</span><br><span style="color: hsl(120, 100%, 40%);">+ ../lib/$(app).ko: $(LIB) $(OBJDIR)/$(app).ko</span><br><span style="color: hsl(120, 100%, 40%);">+ cp $(OBJDIR)/$(app).ko ../lib</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+-$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.m</span><br><span style="color: hsl(120, 100%, 40%);">++$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.m | $(OBJDIRS)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC) $($(APP)_CFLAGS) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(subst /,$(HOST_PSEP),$<) </span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+-$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c</span><br><span style="color: hsl(120, 100%, 40%);">++$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c | $(OBJDIRS)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC) $($(APP)_CFLAGS) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(subst /,$(HOST_PSEP),$<) </span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+-$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.S</span><br><span style="color: hsl(120, 100%, 40%);">++$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.S | $(OBJDIRS)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC) $($(APP)_CFLAGS) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(subst /,$(HOST_PSEP),$<) </span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+-$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp</span><br><span style="color: hsl(120, 100%, 40%);">++$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp | $(OBJDIRS)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CXX) $($(APP)_CXXFLAGS) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(subst /,$(HOST_PSEP),$<)</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+-$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cc</span><br><span style="color: hsl(120, 100%, 40%);">++$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cc | $(OBJDIRS)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CXX) $($(APP)_CXXFLAGS) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \</span><br><span style="color: hsl(120, 100%, 40%);">+ $(subst /,$(HOST_PSEP),$<)</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+index b85c7817a..20777909f 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/pjsip/build/Makefile</span><br><span>++++ b/pjsip/build/Makefile</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -262,7 +262,7 @@ $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME): $(PJSIP_LIB) $(PJSIP_SONAME) $(PJSIP_SIMPL</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ pjsua2-lib: $(PJSUA2_LIB_LIB)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(PJSUA2_LIB_SONAME): $(PJSUA2_LIB_LIB)</span><br><span style="color: hsl(120, 100%, 40%);">+-$(PJSUA2_LIB_LIB) $(PJSUA2_LIB_SONAME): $(PJSUA_LIB) $(PSJUA_LIB_SONAME) $(PJSIP_LIB) $(PJSIP_SONAME) $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME)</span><br><span style="color: hsl(120, 100%, 40%);">++$(PJSUA2_LIB_LIB) $(PJSUA2_LIB_SONAME): $(PJSUA_LIB_LIB) $(PJSUA_LIB_SONAME) $(PJSIP_LIB) $(PJSIP_SONAME) $(PJSIP_SIMPLE_LIB) $(PJSIP_SIMPLE_SONAME) $(PJSIP_UA_LIB) $(PJSIP_UA_SONAME)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(MAKE) -f $(RULES_MAK) APP=PJSUA2_LIB app=pjsua2-lib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ pjsip-test: $(TEST_EXE)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14401">change 14401</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14401"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: Ie1b0dc365dafe4a84c5248097fe8d73804043c22 </div>
<div style="display:none"> Gerrit-Change-Number: 14401 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Guido Falsi <madpilot@freebsd.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>