Module: sip-router
Branch: master
Commit: c925278b8ee3492f71a04c52784f593712522df8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c925278…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 18 11:40:20 2011 +0200
Makefile: disable '-mtune' parameter for gcc 4.5 x86_64
- gcc 4.5 gives error when it has parameter -mtune=x86_64 (this should
be the default value anyhow) - tested on opensuse 11.4
---
Makefile.defs | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 04559b0..b22abe3 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -385,11 +385,17 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
#transform gcc version into 2.9x or 3.0
CC_SHORTVER:=$(shell echo "$(CC_VER)" | cut -d" " -f 2| \
sed -e 's/[^0-9]*-\(.*\)/\1/'| \
- sed -e 's/2\.9.*/2.9x/' -e 's/3\.[0-3]\..*/3.0/' -e \
- 's/3\.[0-3]/3.0/' -e 's/3\.[4-9]\..*/3.4/' -e \
- 's/3\.[4-9]/3.4/' -e 's/4\.[0-1]\..*/4.x/' -e \
- 's/4\.[0-1]/4.x/' -e 's/4\.[2-9]\..*/4.2+/' -e \
- 's/4\.[2-9]$$/4.2+/')
+ sed -e 's/2\.9.*/2.9x/' \
+ -e 's/3\.[0-3]\..*/3.0/' \
+ -e 's/3\.[0-3]/3.0/' \
+ -e 's/3\.[4-9]\..*/3.4/' \
+ -e 's/3\.[4-9]/3.4/' \
+ -e 's/4\.[0-1]\..*/4.x/' \
+ -e 's/4\.[0-1]/4.x/' \
+ -e 's/4\.[2-46-9]\..*/4.2+/' \
+ -e 's/4\.[2-46-9]$$/4.2+/' \
+ -e 's/4\.5\..*/4.5/' \
+ -e 's/4\.5$$/4.5/')
ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+,$(CC_SHORTVER))))
# dependencies can be generated on-the-fly while compiling *.c
CC_MKDEP_OPTS=-MMD -MP
@@ -933,6 +939,16 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-g -O9 -funroll-loops -Wcast-align $(PROFILE)
+ #if gcc 4.5
+ # don't add '-mtune=$(CPU)' - gcc failure
+ifeq ($(CC_SHORTVER), 4.5)
+$(call set_if_empty,CPU,opteron)
+ CFLAGS+=-m64 -minline-all-stringops \
+ -falign-loops \
+ -ftree-vectorize \
+ -fno-strict-overflow
+ LDFLAGS+=-m64
+else
#if gcc 4.2+
ifeq ($(CC_SHORTVER), 4.2+)
$(call set_if_empty,CPU,opteron)
@@ -984,6 +1000,7 @@ endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
endif # CC_SHORTVER, 4.2+
+endif # CC_SHORTVER, 4.5
else # CC_NAME, gcc
ifeq ($(CC_NAME), icc)