From: Richard Mudgett Date: Fri, 13 Jul 2018 23:26:46 +0000 (-0500) Subject: Build: Fix modules getting their optimization setting overridden. X-Git-Tag: 16.0.0-rc1~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5febc995dfa0384c75ef0bc16cb43c60f71813c0;p=thirdparty%2Fasterisk.git 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 --- diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile index b95b33221b..4669f39cc5 100644 --- a/third-party/pjproject/Makefile +++ b/third-party/pjproject/Makefile @@ -158,8 +158,11 @@ build.mak: source/build.mak 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)