]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 251475 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 9 Mar 2010 20:39:10 +0000 (20:39 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 9 Mar 2010 20:39:10 +0000 (20:39 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r251475 | tilghman | 2010-03-09 14:30:03 -0600 (Tue, 09 Mar 2010) | 8 lines

  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@251495 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile.rules
codecs/gsm/Makefile

index 55cf0bc7187e639b1bca38808b5160ea3e9a8c37..89c5fc113782b8fd1eabbd038bbd9f55905070db 100644 (file)
@@ -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)
index 831feaa5f37122bd2edd80a7eed018dd7700428f..aae356de671b3360df3b6c45e09b72bd329c2e1a 100644 (file)
@@ -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.