[asterisk-commits] pjproject bundled: Fix compilation with MALLOC DEBUG (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jan 8 14:18:06 CST 2017
George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/4705 )
Change subject: pjproject_bundled: Fix compilation with MALLOC_DEBUG
......................................................................
pjproject_bundled: Fix compilation with MALLOC_DEBUG
When MALLOC_DEBUG was specified, make was failing. Immediately
remaking would work. The issues was in the ordering of the make
dependencies.
Change-Id: If6030b54fc693f3179f32bfd20c6b5d5f1b3f7cd
---
M third-party/pjproject/Makefile
1 file changed, 5 insertions(+), 6 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Anonymous Coward #1000019: Verified
diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index f4cce73..2398ec4 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -63,11 +63,8 @@
endif
ifeq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),MALLOC_DEBUG)
CF += -DMALLOC_DEBUG
- MALLOC_DEBUG = yes
- $(apps): export LDFLAGS += -L$(PJDIR)/pjsip-apps/lib -Wl,-whole-archive -lasterisk_malloc_debug -Wl,-no-whole-archive
- $(apps): source/pjsip-apps/lib/libasterisk_malloc_debug.a
- source/pjsip-apps/src/python/_pjsua.so: LDFLAGS += -L$(PJDIR)/pjsip-apps/lib -Wl,-whole-archive -lasterisk_malloc_debug -Wl,-no-whole-archive
- source/pjsip-apps/src/python/_pjsua.so: source/pjsip-apps/lib/libasterisk_malloc_debug.a
+ 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
endif
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
CF += -O3
@@ -191,7 +188,8 @@
$(apps): APP = $(filter pj%,$(subst -, ,$(notdir $@)))
$(apps): CFLAGS += -DPJ_LOG_MAX_LEVEL=2
-$(apps): pjproject.symbols $(APP_THIRD_PARTY_LIB_FILES)
+$(apps): LDFLAGS += $(MALLOC_DEBUG_LDFLAGS)
+$(apps): $(MALLOC_DEBUG_LIBS) pjproject.symbols $(APP_THIRD_PARTY_LIB_FILES)
$(ECHO_PREFIX) Compiling $(APP)
$(CMD_PREFIX) +$(MAKE) -C source/pjsip-apps/build $(filter pj%,$(subst -, ,$(notdir $@))) $(REALLY_QUIET)
@@ -200,6 +198,7 @@
$(ECHO_PREFIX) Compiling python bindings
$(CMD_PREFIX) $(CC) -o $@ -c $< $(PYTHONDEV_INCLUDE) $(CFLAGS) $(PJ_CFLAGS)
+source/pjsip-apps/src/python/_pjsua.so: LDFLAGS += $(MALLOC_DEBUG_LDFLAGS)
source/pjsip-apps/src/python/_pjsua.so: source/pjsip-apps/src/python/_pjsua.o
$(ECHO_PREFIX) Linking python bindings $(@F)
$(CMD_PREFIX) gcc -shared -pthread -o $@ $< $(LDFLAGS) $(PJ_LDFLAGS) $(APP_LDLIBS) $(PYTHONDEV_LIB) $(REALLY_QUIET)
--
To view, visit https://gerrit.asterisk.org/4705
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If6030b54fc693f3179f32bfd20c6b5d5f1b3f7cd
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
More information about the asterisk-commits
mailing list