Make the Makefile logic more explicit and move the Snow Leopard logic down to where it's not executed on non-Darwin systems.

(closes issue #17028)
 Reported by: pabelanger
 Patches: 
       issue17028_20100315.patch uploaded by seanbright (license 71)
       20100315__issue17028.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman, pabelanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-03-15 16:27:08 +00:00
parent 7d963333e2
commit f053b65f17

View File

@@ -37,17 +37,19 @@ WAV49 = -DWAV49
######### ppro's, etc, as well as the AMD K6 and K7. The compile will ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
######### probably require gcc. ######### probably require gcc.
ifeq (, $(findstring $(OSARCH) , Darwin SunOS )) 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 (,$(strip $(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 (,$(strip $(findstring $(shell uname -m) ,"ppc ppc64 alpha armv4l s390 ")))
ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6) OPTIMIZE+=-march=$(PROC)
# Wow... Snow Leopard is BROKEN! endif
OPTIMIZE+=-mtune=native endif
else else
OPTIMIZE+=-march=$(PROC) ifneq (,$(findstring $(OSARCH),Darwin))
endif ifeq ($(shell /usr/bin/sw_vers -productVersion | cut -c1-4),10.6)
endif # Snow Leopard reports i386, even though it's really x86_64
endif OPTIMIZE+=-mtune=native
endif
endif
endif endif
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.