aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-27 06:24:28 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-27 06:24:28 +0000
commit8d6c048c863c339896931fe09d3c41c745971738 (patch)
tree78f6f99e827cb89cd38d83adcdb5e85138669707 /Makefile
parentc1c4a6835a005bcd381052e755cc26a46f66db89 (diff)
Bug 5183 - Inline stack backtraces
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7646 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ff3d2abcc..16766d075 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,11 @@ ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
#Tell gcc to optimize the code
OPTIMIZE+=-O6
+else
+ # Stack backtraces, while useful for debugging, are incompatible with optimizations
+ ifeq (${OSARCH},Linux)
+ CFLAGS+=-DSTACK_BACKTRACES
+ endif
endif
#Overwite config files on "make samples"
@@ -332,7 +337,10 @@ ASTCFLAGS+= $(TRACE_FRAMES)
ASTCFLAGS+= $(MALLOC_DEBUG)
ASTCFLAGS+= $(BUSYDETECT)
ASTCFLAGS+= $(OPTIONS)
+ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
ASTCFLAGS+= -fomit-frame-pointer
+endif
+
SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \