<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11338">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Matt Jordan: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjproject/Makefile: Updates for Darwin compatible builds<br><br>This patch fixes three compatibility issues for Darwin compatible builds:<br><br>(1) Use BSD compatible command line option for sed<br><br>For some versions of BSD sed, the -r command line option is unknown.<br>Both GNU and BSD sed support the -E command line option for enabling<br>extended regular expressions; as such, this patch replaces the -r<br>option with -E.<br><br>(2) Look for '_' in pjproject generated symbols<br><br>In Darwin comaptible systems, the symbols generated for pjproject may be<br>prefixed with an '_'. When exporting these to a symbol file, the invocation<br>to sed has to optionally look for a prefix of said '_' character.<br><br>(3) Use -all_load/-noall_load when linking<br><br>The flags -whole-archive/-no-whole-archive are not supported by the<br>linker, and must instead be replaced with -all_load/-noall_load.<br><br>Change-Id: I58121756de6a0560a6e49ca9d6bf9566a333cde3<br>---<br>M third-party/pjproject/Makefile<br>1 file changed, 12 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile</span><br><span>index af0e9f8..86eb968 100644</span><br><span>--- a/third-party/pjproject/Makefile</span><br><span>+++ b/third-party/pjproject/Makefile</span><br><span>@@ -66,7 +66,17 @@</span><br><span> CF += -DPJPROJECT_BUNDLED_ASSERTIONS=yes</span><br><span> endif</span><br><span> MALLOC_DEBUG_LIBS = source/pjsip-apps/lib/libasterisk_malloc_debug.a</span><br><span style="color: hsl(0, 100%, 40%);">- MALLOC_DEBUG_LDFLAGS = -L$(PJDIR)/pjsip-apps/lib -Wl,-whole-archive -lasterisk_malloc_debug -Wl,-no-whole-archive</span><br><span style="color: hsl(120, 100%, 40%);">+ ifneq ($(findstring darwin,$(OSARCH)),)</span><br><span style="color: hsl(120, 100%, 40%);">+ MALLOC_DEBUG_LDFLAGS = -L$(PJDIR)/pjsip-apps/lib -Wl,-all_load -lasterisk_malloc_debug -Wl,-noall_load</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ # These are used for all but Darwin</span><br><span style="color: hsl(120, 100%, 40%);">+ MALLOC_DEBUG_LDFLAGS = -L$(PJDIR)/pjsip-apps/lib -Wl,-whole-archive -lasterisk_malloc_debug -Wl,-no-whole-archive</span><br><span style="color: hsl(120, 100%, 40%);">+ endif</span><br><span style="color: hsl(120, 100%, 40%);">+ ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)</span><br><span style="color: hsl(120, 100%, 40%);">+ CF += -O3</span><br><span style="color: hsl(120, 100%, 40%);">+ endif</span><br><span style="color: hsl(120, 100%, 40%);">+ export CFLAGS += $(CF) -g3</span><br><span style="color: hsl(120, 100%, 40%);">+ export LDFLAGS += $(CC_LDFLAGS)</span><br><span> TARGETS += pjproject.symbols</span><br><span> else</span><br><span> all install:</span><br><span>@@ -155,7 +165,7 @@</span><br><span> </span><br><span> pjproject.symbols: $(ALL_LIB_FILES)</span><br><span> $(ECHO_PREFIX) Generating symbols</span><br><span style="color: hsl(0, 100%, 40%);">- $(CMD_PREFIX) $(NM) -Pog $(ALL_LIB_FILES) | $(SED) -n -r -e "s/.+: ([pP][jJ][^ ]+) .+/\1/gp" | sort -u > pjproject.symbols</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) $(NM) -Pog $(ALL_LIB_FILES) | $(SED) -n -E -e "s/.+: ([_]?[pP][jJ][^ ]+) .+/\1/gp" | sort -u > pjproject.symbols</span><br><span> </span><br><span> source/pjsip-apps/src/asterisk_malloc_debug.c: patches/asterisk_malloc_debug.c</span><br><span> $(ECHO_PREFIX) Copying $< to $@</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11338">change 11338</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/+/11338"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I58121756de6a0560a6e49ca9d6bf9566a333cde3 </div>
<div style="display:none"> Gerrit-Change-Number: 11338 </div>
<div style="display:none"> Gerrit-PatchSet: 8 </div>
<div style="display:none"> Gerrit-Owner: Matt Jordan <mjordan@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matt Jordan <mjordan@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>