summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2012-04-12 15:25:47 +0000
committerKinsey Moore <kmoore@digium.com>2012-04-12 15:25:47 +0000
commit8696daadf8c129d92c52b85d471fcacca9e50a85 (patch)
treeee347b0c1323438d9fcc9e7662d1ced2eb87a401 /Makefile
parent683eacb59a2d322d57c4c9bd9f6e22501c2c244b (diff)
Simplify build system architecture optimization
This change to the build system rips out any usage of PROC along with architecture-specific optimizations in favor of using -march=native where it is supported. This fixes broken builds on 64bit Intel systems and results in better optimized code on systems running GCC 4.2+. Review: https://reviewboard.asterisk.org/r/1852/ (closes issue ASTERISK-19462) ........ Merged revisions 361955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 361956 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile50
1 files changed, 0 insertions, 50 deletions
diff --git a/Makefile b/Makefile
index 0a9c9bb39..254c4db97 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,6 @@ export ASTCONFPATH
export ASTKEYDIR
export OSARCH # Operating system
-export PROC # Processor type
export NOISY_BUILD # Used in Makefile.rules
export MENUSELECT_CFLAGS # Options selected in menuselect.
@@ -170,36 +169,6 @@ OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include"
OPTIONS=
ifeq ($(OSARCH),linux-gnu)
- ifeq ($(PROC),x86_64)
- # You must have GCC 3.4 to use k8, otherwise use athlon
- PROC=k8
- #PROC=athlon
- endif
-
- ifeq ($(PROC),sparc64)
- #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
- PROC=ultrasparc
- OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi)
- OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi)
- OPTIONS+=-fomit-frame-pointer
- endif
-
- ifeq ($(PROC),arm)
- # The Cirrus logic is the only heavily shipping arm processor with a real floating point unit
- ifeq ($(SUB_PROC),maverick)
- OPTIONS+=-fsigned-char -mcpu=ep9312
- else
- ifeq ($(SUB_PROC),xscale)
- OPTIONS+=-fsigned-char -mcpu=xscale
- else
- OPTIONS+=-fsigned-char
- endif
- endif
- endif
# flag to tell 'ldconfig' to only process specified directories
LDCONFIG_FLAGS=-n
endif
@@ -235,26 +204,7 @@ ifneq ($(findstring BSD,$(OSARCH)),)
_ASTCFLAGS+=-isystem /usr/local/include
endif
-ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
- ifneq ($(AST_MARCH_NATIVE),)
- _ASTCFLAGS+=$(AST_MARCH_NATIVE)
- else
- ifneq ($(PROC),ultrasparc)
- _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
- endif
- endif
-endif
-
-ifeq ($(PROC),ppc)
- _ASTCFLAGS+=-fsigned-char
-endif
-
ifeq ($(OSARCH),FreeBSD)
- ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),)
- ifeq ($(PROC),i386)
- _ASTCFLAGS+=-march=i686
- endif
- endif
# -V is understood by BSD Make, not by GNU make.
BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
_ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)