[Asterisk-code-review] Build: Fix modules getting their optimization setting overri... (asterisk[certified/13.21])

George Joseph asteriskteam at digium.com
Wed Jul 18 09:12:17 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9462 )

Change subject: Build: Fix modules getting their optimization setting overridden.
......................................................................

Build: Fix modules getting their optimization setting overridden.

Asterisk modules that use PJPROJECT services have their compiler
optimization and possibly their symbolic debug options overridden by the
PJPROJECT configure script selected settings.

* We need to filter-out any -O and -g options in PJ_CFLAGS before echoing
out the result so the PJPROJECT_INCLUDE variable does not override the
Asterisk module settings when using bundled PJPROJECT.

NOTE: This patch only has an effect when using bundled PJPROJECT.

ASTERISK-27563

Change-Id: If124169735ecf572ad1535cd43bff94cb44d5b30
---
M third-party/pjproject/Makefile
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index 6ebd685..dbd2a88 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -155,8 +155,11 @@
 
 configure: source/build.mak
 
+# We need to filter-out any -O and -g options in PJ_CFLAGS before echoing out
+# the result so Asterisk modules don't have the optimization and symbolic debug
+# options overridden by the PJPROJECT configure script selected settings.
 echo_cflags: source/build.mak
-	@echo $(PJ_CFLAGS)
+	@echo $(filter-out -O% -g%,$(PJ_CFLAGS))
 
 libpj%.a: source/build.mak
 	$(ECHO_PREFIX) Compiling lib $(@F)

-- 
To view, visit https://gerrit.asterisk.org/9462
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: certified/13.21
Gerrit-MessageType: merged
Gerrit-Change-Id: If124169735ecf572ad1535cd43bff94cb44d5b30
Gerrit-Change-Number: 9462
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180718/cf15abb0/attachment-0001.html>


More information about the asterisk-code-review mailing list