summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2005-12-27 06:24:28 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2005-12-27 06:24:28 +0000
commitcdab512c9fceb7cc25c030dd96bbe111bcfe6449 (patch)
tree78f6f99e827cb89cd38d83adcdb5e85138669707 /Makefile
parentb7272182d160bdae148c933f359522700d17dfe4 (diff)
Bug 5183 - Inline stack backtraces
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 \