Module: sip-router
Branch: 3.1
Commit: a0b0c849119c13c2ce0572670cfa4ec282015e6e
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a0b0c849119c13c2ce0572670cfa4ec282015e6e

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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
(cherry picked from commit c925278b8ee3492f71a04c52784f593712522df8)

---

 Makefile.defs |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/Makefile.defs b/Makefile.defs
index 49822ab..7d6d267 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
@@ -932,6 +938,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)
@@ -983,6 +999,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)


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to