Module: sip-router
Branch: master
Commit: fd6704daccd4359f59183367f2059576e184635e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fd6704d…
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).
---
Makefile.defs | 68 ++++++++++++++++++++++++++++----------------------------
1 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 226347b..0bdb654 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
@@ -864,8 +864,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 \
@@ -914,7 +914,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)
@@ -1027,8 +1027,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 \
@@ -1094,7 +1094,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)
@@ -1118,8 +1118,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) \
@@ -1160,7 +1160,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)
@@ -1181,8 +1181,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
@@ -1214,7 +1214,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
@@ -1230,8 +1230,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+
@@ -1261,7 +1261,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
@@ -1276,8 +1276,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
@@ -1308,7 +1308,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
@@ -1323,8 +1323,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
@@ -1353,7 +1353,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
@@ -1368,8 +1368,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
@@ -1398,7 +1398,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
@@ -1413,8 +1413,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
@@ -1444,7 +1444,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
@@ -1459,8 +1459,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 \
@@ -1493,7 +1493,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
@@ -1508,8 +1508,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 \
@@ -1542,7 +1542,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