Module: sip-router
Branch: master
Commit: 184187a6afe701b793529580fc0f01183eab21f2
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=184187a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Jan 28 11:30:22 2012 +0100
Makefile: merged options for gcc 4.5 and 4.6 in 4.5+
- they were the same (skip mtune parameter for x86_64)
---
Makefile.defs | 91 +++++++++++++++++++++++++--------------------------------
1 files changed, 40 insertions(+), 51 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index b737bd6..fcdc51a 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -293,11 +293,11 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
-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+ 4.5,$(CC_SHORTVER))))
+ -e 's/4\.[2-4]\..*/4.2+/' \
+ -e 's/4\.[2-4]$$/4.2+/' \
+ -e 's/4\.[5-9]\..*/4.5+/' \
+ -e 's/4\.[5-9]$$/4.5+/')
+ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+,$(CC_SHORTVER))))
# dependencies can be generated on-the-fly while compiling *.c
CC_MKDEP_OPTS=-MMD -MP
endif # 3.0 <= $(CC_SHORTVER) <= 4.x
@@ -866,8 +866,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-g -O9 -funroll-loops -Wcast-align $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
$(call set_if_empty,CPU,athlon64)
CFLAGS+=-m32 -minline-all-stringops \
-falign-loops \
@@ -916,7 +916,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
ifeq ($(CC_NAME), icc)
@@ -941,19 +941,9 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-g -O9 -funroll-loops -Wcast-align $(PROFILE)
- #if gcc 4.6
- # don't add '-mtune=$(CPU)' - gcc failure
-ifeq ($(CC_SHORTVER), 4.6)
-$(call set_if_empty,CPU,opteron)
- CFLAGS+=-m64 -minline-all-stringops \
- -falign-loops \
- -ftree-vectorize \
- -fno-strict-overflow
- LDFLAGS+=-m64
-else
- #if gcc 4.5
+ #if gcc 4.5+
# don't add '-mtune=$(CPU)' - gcc failure
-ifeq ($(CC_SHORTVER), 4.5)
+ifeq ($(CC_SHORTVER), 4.5+)
$(call set_if_empty,CPU,opteron)
CFLAGS+=-m64 -minline-all-stringops \
-falign-loops \
@@ -1012,8 +1002,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
-endif # CC_SHORTVER, 4.6
+endif # CC_SHORTVER, 4.5+
else # CC_NAME, gcc
ifeq ($(CC_NAME), icc)
@@ -1040,8 +1029,8 @@ ifeq ($(CC_NAME), gcc)
CFLAGS=-g -O9 -funroll-loops $(PROFILE) \
#-Wcast-align \
#-Wmissing-prototypes
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
$(call set_if_empty,CPU,ultrasparc)
#use 32bit for now
CFLAGS+=-m64 -mcpu=ultrasparc \
@@ -1107,7 +1096,7 @@ endif #CC_SHORTVER, 2.9x
endif #CC_SHORTVER, 3.0
endif #CC_SHORTVER, 3.4
endif #CC_SHORTVER, 4.x
-endif #CC_SHORTVER, 4.5 or 4.2+
+endif #CC_SHORTVER, 4.5+ or 4.2+
else #CC_NAME, gcc
ifeq ($(CC_NAME), suncc)
@@ -1131,8 +1120,8 @@ ifeq ($(CC_NAME), gcc)
CFLAGS=-g -O9 -funroll-loops $(PROFILE) \
#-Wcast-align \
#-Wmissing-prototypes
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
$(call set_if_empty,CPU,v8)
#use 32bit for now
CFLAGS+= -mtune=$(CPU) \
@@ -1173,7 +1162,7 @@ endif #CC_SHORTVER, 2.9x
endif #CC_SHORTVER, 3.0
endif #CC_SHORTVER, 3.4
endif #CC_SHORTVER, 4.x
-endif #CC_SHORTVER, 4.5 or 4.2+
+endif #CC_SHORTVER, 4.5+ or 4.2+
else #CC_NAME, gcc
ifeq ($(CC_NAME), suncc)
@@ -1194,8 +1183,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-O9 -funroll-loops -fsigned-char $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
CFLAGS+= -ftree-vectorize -fno-strict-overflow
# not supported on arm: -minline-all-stringops
else
@@ -1227,7 +1216,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1243,8 +1232,8 @@ ifeq ($(CC_NAME), gcc)
#common stuff
CFLAGS=-march=armv6 -O9 -funroll-loops -fsigned-char \
$(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
CFLAGS+= -ftree-vectorize -fno-strict-overflow
else
#if gcc 4.x+
@@ -1274,7 +1263,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1289,8 +1278,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-O9 -funroll-loops $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
CFLAGS+=-march=r3000 -minline-all-stringops \
-ftree-vectorize -fno-strict-overflow
else
@@ -1321,7 +1310,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1336,8 +1325,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -mips2 -O9 -funroll-loops $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
CFLAGS+=-minline-all-stringops -ftree-vectorize \
-fno-strict-overflow
else
@@ -1366,7 +1355,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1381,8 +1370,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -mips64 -O9 -funroll-loops $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
CFLAGS+=-minline-all-stringops -ftree-vectorize \
-fno-strict-overflow
else
@@ -1411,7 +1400,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1427,7 +1416,7 @@ ifeq ($(CC_NAME), gcc)
#common stuff
CFLAGS= -O9 -funroll-loops $(PROFILE)
#if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
CFLAGS+= -fno-strict-overflow
# not supported: -minline-all-stringops
else
@@ -1457,7 +1446,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1472,8 +1461,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -O9 -funroll-loops -fsigned-char $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
$(call set_if_empty,CPU,powerpc)
CFLAGS+=-ftree-vectorize \
-fno-strict-overflow \
@@ -1506,7 +1495,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1521,8 +1510,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -O9 -funroll-loops -fsigned-char $(PROFILE)
- #if gcc 4.5 or 4.2+
-ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
+ #if gcc 4.5+ or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5+,$(CC_SHORTVER))))
$(call set_if_empty,CPU,powerpc64)
CFLAGS+=-ftree-vectorize \
-fno-strict-overflow \
@@ -1555,7 +1544,7 @@ endif # CC_SHORTVER, 2.9x
endif # CC_SHORTVER, 3.0
endif # CC_SHORTVER, 3.4
endif # CC_SHORTVER, 4.x
-endif # CC_SHORTVER, 4.5 or 4.2+
+endif # CC_SHORTVER, 4.5+ or 4.2+
else # CC_NAME, gcc
#other compilers