Index: Makefile.rules =================================================================== --- Makefile.rules (revision 251408) +++ Makefile.rules (working copy) @@ -36,6 +36,12 @@ 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: codecs/gsm/Makefile =================================================================== --- codecs/gsm/Makefile (revision 251408) +++ codecs/gsm/Makefile (working copy) @@ -40,10 +40,15 @@ 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.