|
@@ -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)
|