Module: sip-router
Branch: 3.1
Commit: 2192a1d7a35364fff6241f640bdf7dd282e06447
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2192a1d…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Sat Apr 30 00:48:12 2011 +0200
Makefile: fix gcc 4.5 support for all archs
Commit c925278 split gcc 4.5 support from the generic 4.2+ support,
but it handled gcc 4.5 only for x86_64 (trying to compile on other
architectures with gcc 4.5 resulted in warnings and common gcc
optimization options).
(cherry picked from commit fd6704daccd4359f59183367f2059576e184635e)
---
Makefile.defs | 68 ++++++++++++++++++++++++++++----------------------------
1 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index d6d8c6d..91d1435 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -295,7 +295,7 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
-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))))
+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
@@ -863,8 +863,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-g -O9 -funroll-loops -Wcast-align $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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 \
@@ -913,7 +913,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
ifeq ($(CC_NAME), icc)
@@ -1026,8 +1026,8 @@ ifeq ($(CC_NAME), gcc)
CFLAGS=-g -O9 -funroll-loops $(PROFILE) \
#-Wcast-align \
#-Wmissing-prototypes
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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 \
@@ -1093,7 +1093,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.2+
+endif #CC_SHORTVER, 4.5 or 4.2+
else #CC_NAME, gcc
ifeq ($(CC_NAME), suncc)
@@ -1117,8 +1117,8 @@ ifeq ($(CC_NAME), gcc)
CFLAGS=-g -O9 -funroll-loops $(PROFILE) \
#-Wcast-align \
#-Wmissing-prototypes
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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) \
@@ -1159,7 +1159,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.2+
+endif #CC_SHORTVER, 4.5 or 4.2+
else #CC_NAME, gcc
ifeq ($(CC_NAME), suncc)
@@ -1180,8 +1180,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-O9 -funroll-loops -fsigned-char $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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
@@ -1213,7 +1213,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1229,8 +1229,8 @@ ifeq ($(CC_NAME), gcc)
#common stuff
CFLAGS=-march=armv6 -O9 -funroll-loops -fsigned-char \
$(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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+
@@ -1260,7 +1260,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1275,8 +1275,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS=-O9 -funroll-loops $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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
@@ -1307,7 +1307,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1322,8 +1322,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -mips2 -O9 -funroll-loops $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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
@@ -1352,7 +1352,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1367,8 +1367,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -mips64 -O9 -funroll-loops $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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
@@ -1397,7 +1397,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1412,8 +1412,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -O9 -funroll-loops $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #if gcc 4.5 or 4.2+
+ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
CFLAGS+= -fno-strict-overflow
# not supported: -minline-all-stringops
else
@@ -1443,7 +1443,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1458,8 +1458,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -O9 -funroll-loops -fsigned-char $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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 \
@@ -1492,7 +1492,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers
@@ -1507,8 +1507,8 @@ ifeq ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
CFLAGS= -O9 -funroll-loops -fsigned-char $(PROFILE)
- #if gcc 4.2+
-ifeq ($(CC_SHORTVER), 4.2+)
+ #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 \
@@ -1541,7 +1541,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.2+
+endif # CC_SHORTVER, 4.5 or 4.2+
else # CC_NAME, gcc
#other compilers