aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-09 20:30:03 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-09 20:30:03 +0000
commit7f3494f4bf7ad8fe4d6a3decba70ab99916bc8e4 (patch)
tree05264789be315d7ff67664d51bee9e6f0e103ec4
parent0c82ea1d0ab6dab587b4906d8757bf7b63fcc1ab (diff)
Build system modifications to ensure that Asterisk properly builds on Mac OS X 10.6.
(closes issue #16997) Reported by: jquinn Patches: 20100309__issue16997__2.diff.txt uploaded by tilghman (license 14) Tested by: tilghman, russell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251475 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile.rules6
-rw-r--r--codecs/gsm/Makefile5
2 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 10970cfbc..d917d8708 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -36,6 +36,12 @@ else
endif
OPTIMIZE?=-O6
+ifneq ($(findstring darwin,$(OSARCH)),)
+ ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
+ # Snow Leopard has an issue with this optimization flag on large files (like chan_sip)
+ OPTIMIZE+=-fno-inline-functions
+ endif
+endif
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),)
_ASTCFLAGS+=$(OPTIMIZE)
diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile
index 831feaa5f..aae356de6 100644
--- a/codecs/gsm/Makefile
+++ b/codecs/gsm/Makefile
@@ -40,10 +40,15 @@ WAV49 = -DWAV49
ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
+ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
+# Wow... Snow Leopard is BROKEN!
+OPTIMIZE+=-mtune=native
+else
OPTIMIZE+=-march=$(PROC)
endif
endif
endif
+endif
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
#This works for even old (2.96) versions of gcc and provides a small boost either way.