[Asterisk-code-review] build: Pass --fno-partial-inlining to third-party when appropriate (...asterisk[16])
George Joseph
asteriskteam at digium.com
Fri May 3 13:42:15 CDT 2019
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11354
Change subject: build: Pass --fno-partial-inlining to third-party when appropriate
......................................................................
build: Pass --fno-partial-inlining to third-party when appropriate
When the gcc version is >= 8.2.1, we were already setting the
--fno-partial-inlining flag for Asterisk source files to get around
a gcc bug but we weren't passing the flag down to the bundled
builds of pjproject and jansson.
ASTERISK-28392
Change-Id: I99ede9bc35408ecd096f7d5369e8192d3dc75704
---
M third-party/jansson/Makefile
M third-party/pjproject/Makefile
2 files changed, 16 insertions(+), 9 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/54/11354/1
diff --git a/third-party/jansson/Makefile b/third-party/jansson/Makefile
index a81502c..8c9da1a 100644
--- a/third-party/jansson/Makefile
+++ b/third-party/jansson/Makefile
@@ -49,6 +49,11 @@
include ../Makefile.rules
include Makefile.rules
+OPTIMIZE_CFLAGS = -g3
+ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
+ OPTIMIZE_CFLAGS += $(OPTIMIZE)
+endif
+
ECHO_PREFIX := $(ECHO_PREFIX) echo '[jansson] '
SHELL_ECHO_PREFIX := echo '[jansson] '
@@ -82,7 +87,7 @@
source/config.status: source/.unpacked Makefile.rules .rebuild_needed
$(ECHO_PREFIX) Configuring
$(CMD_PREFIX) (cd source ; ./configure $(QUIET_CONFIGURE) $(JANSSON_CONFIG_OPTS) --disable-shared \
- --enable-static --prefix=$(JANSSON_DIR)/dest --libdir=$(JANSSON_DIR)/dest/lib)
+ --enable-static --prefix=$(JANSSON_DIR)/dest --libdir=$(JANSSON_DIR)/dest/lib CFLAGS="$(OPTIMIZE_CFLAGS)")
configure: source/config.status
diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index 97835e4..af0e9f8 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -45,6 +45,9 @@
else
$(warning ASTTOPDIR/menuselect hasn't been run yet. Can't find debug options.)
endif
+ include ../../Makefile.rules
+ include ../Makefile.rules
+ include Makefile.rules
all: _all
install: _install
@@ -64,20 +67,19 @@
endif
MALLOC_DEBUG_LIBS = source/pjsip-apps/lib/libasterisk_malloc_debug.a
MALLOC_DEBUG_LDFLAGS = -L$(PJDIR)/pjsip-apps/lib -Wl,-whole-archive -lasterisk_malloc_debug -Wl,-no-whole-archive
- ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
- CF += -O3
- endif
- export CFLAGS += $(CF) -g3
- export LDFLAGS += $(CC_LDFLAGS)
TARGETS += pjproject.symbols
else
all install:
endif
+else
+ include ../../Makefile.rules
+ include ../Makefile.rules
+ include Makefile.rules
endif
-include ../../Makefile.rules
-include ../Makefile.rules
-include Makefile.rules
+export PJ_CFLAGS := $(filter-out -O% -g%,$(PJ_CFLAGS))
+export CFLAGS += $(CF)
+export LDFLAGS += $(CC_LDFLAGS)
ECHO_PREFIX := $(ECHO_PREFIX) echo '[pjproject] '
SHELL_ECHO_PREFIX := echo '[pjproject] '
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11354
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I99ede9bc35408ecd096f7d5369e8192d3dc75704
Gerrit-Change-Number: 11354
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190503/6bc9bc58/attachment.html>
More information about the asterisk-code-review
mailing list