diff -uNr asterisk-1.6.2.9.ORIG/codecs/gsm/Makefile asterisk-1.6.2.9/codecs/gsm/Makefile --- asterisk-1.6.2.9.ORIG/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100 +++ asterisk-1.6.2.9/codecs/gsm/Makefile 2010-03-09 21:39:20.000000000 +0100 @@ -37,30 +37,6 @@ ######### ppro's, etc, as well as the AMD K6 and K7. The compile will ######### probably require gcc. -ifeq (,$(findstring $(OSARCH),Darwin SunOS)) - ifeq (,$(strip $(findstring $(PROC) ,"x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips "))) - ifeq (,$(strip $(findstring $(shell uname -m) ,"ppc ppc64 alpha armv4l s390 "))) - OPTIMIZE+=-march=$(PROC) - endif - endif -else - ifneq (,$(findstring $(OSARCH),Darwin)) - ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6) - # Snow Leopard reports i386, even though it's really x86_64 - OPTIMIZE+=-mtune=native - 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. -#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it. -#So we go lowest common available by gcc and go a step down, still a step up from -#the default as we now have a better instruction set to work with. - Belgarath -ifeq ($(PROC),ultrasparc) -OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3 -endif - PG = #PG = -g -pg ######### Profiling flags. If you don't know what that means, leave it blank. @@ -215,11 +191,9 @@ # XXX Keep a space after each findstring argument # XXX should merge with GSM_OBJECTS ifeq ($(OSARCH),linux-gnu) -ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 )) -ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips )) -GSM_SOURCES+= $(SRC)/k6opt.s -endif -endif + ifneq ($(K6OPT),) + GSM_SOURCES+= $(SRC)/k6opt.s + endif endif TOAST_SOURCES = $(SRC)/toast.c \ @@ -267,11 +241,9 @@ $(SRC)/table.o ifeq ($(OSARCH),linux-gnu) -ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc )) -ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips )) -GSM_OBJECTS+= $(SRC)/k6opt.o -endif -endif + ifneq ($(K6OPT),) + GSM_OBJECTS+= $(SRC)/k6opt.o + endif endif TOAST_OBJECTS = $(SRC)/toast.o \