|
@@ -41,6 +41,7 @@
|
|
|
# 2005-06-01 use $(LOCALBASE) instead of /usr/{local,pkg} (andrei)
|
|
|
# 2005-06-26 numeric OSREL & HAVE_KQUEUE added to the *BSD (andrei)
|
|
|
# 2005-07-04 HAVE_DEVPOLL added to solaris (andrei)
|
|
|
+# 2005-07-06 gcc 4.0 optimizations support (andrei)
|
|
|
|
|
|
|
|
|
# check if already included/exported
|
|
@@ -197,7 +198,8 @@ ifneq (,$(findstring gcc, $(CC_LONGVER)))
|
|
|
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/' )
|
|
|
+ 's/3\.[4-9]/3.4/' -e 's/4\.[0-9]\..*/4.x/' -e \
|
|
|
+ 's/4\.[0-9]/4.x/' )
|
|
|
endif
|
|
|
|
|
|
ifneq (, $(findstring Sun, $(CC_LONGVER)))
|
|
@@ -463,6 +465,14 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS=-g -O9 -funroll-loops -Wcast-align $(PROFILE) \
|
|
|
-Wall
|
|
|
+ #if gcc 4.0+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CPU ?= athlon64
|
|
|
+ CFLAGS+=-minline-all-stringops -malign-double \
|
|
|
+ -falign-loops \
|
|
|
+ -ftree-vectorize \
|
|
|
+ -mtune=$(CPU)
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CPU ?= athlon
|
|
@@ -491,6 +501,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
ifeq ($(CC_NAME), icc)
|
|
@@ -514,6 +525,14 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS=-g -O9 -funroll-loops -Wcast-align $(PROFILE) \
|
|
|
-Wall
|
|
|
+ #if gcc 4.0+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CPU ?= opteron
|
|
|
+ CFLAGS+=-minline-all-stringops \
|
|
|
+ -falign-loops \
|
|
|
+ -ftree-vectorize \
|
|
|
+ -mtune=$(CPU)
|
|
|
+else
|
|
|
#if gcc 3.4
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CPU ?= athlon64
|
|
@@ -542,6 +561,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
ifeq ($(CC_NAME), icc)
|
|
@@ -567,6 +587,14 @@ ifeq ($(CC_NAME), gcc)
|
|
|
-Wall\
|
|
|
#-Wcast-align \
|
|
|
#-Wmissing-prototypes
|
|
|
+ #if gcc 4.x
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CPU ?= ultrasparc
|
|
|
+ #use 32bit for now
|
|
|
+ CFLAGS+=-mcpu=ultrasparc -minline-all-stringops \
|
|
|
+ -mtune=$(CPU) \
|
|
|
+ -ftree-vectorize
|
|
|
+else
|
|
|
#if gcc 3.4
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CPU ?= ultrasparc
|
|
@@ -610,6 +638,7 @@ endif
|
|
|
endif #CC_SHORTVER, 2.9x
|
|
|
endif #CC_SHORTVER, 3.0
|
|
|
endif #CC_SHORTVER, 3.4
|
|
|
+endif #CC_SHORTVER, 4.x
|
|
|
|
|
|
else #CC_NAME, gcc
|
|
|
ifeq ($(CC_NAME), suncc)
|
|
@@ -630,6 +659,11 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS=-O9 -funroll-loops -Wcast-align $(PROFILE) \
|
|
|
-Wall
|
|
|
+ #if gcc 4.x+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CFLAGS+=-mcpu=strongarm1100 -minline-all-stringops \
|
|
|
+ -ftree-vectorize
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CFLAGS+= -mcpu=strongarm1100
|
|
@@ -652,6 +686,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.0
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
@@ -666,6 +701,11 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS=-O9 -funroll-loops -Wcast-align $(PROFILE) \
|
|
|
-Wall
|
|
|
+ #if gcc 4.0+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CFLAGS+=-mcpu=r3000 -minline-all-stringops \
|
|
|
+ -ftree-vectorize
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CFLAGS+= -mcpu=r3000
|
|
@@ -688,6 +728,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
@@ -702,6 +743,10 @@ ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS= -mips2 -O9 -funroll-loops $(PROFILE) \
|
|
|
-Wall
|
|
|
+ #if gcc 4.0+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CFLAGS+=-minline-all-stringops -ftree-vectorize
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CFLAGS+=
|
|
@@ -722,6 +767,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
@@ -736,6 +782,10 @@ ifeq ($(ARCH), alpha)
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS= -O9 -funroll-loops $(PROFILE) -Wall
|
|
|
+ #if gcc 4.0+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CFLAGS+=-minline-all-stringops
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CFLAGS+=
|
|
@@ -756,6 +806,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
@@ -769,6 +820,12 @@ ifeq ($(ARCH), ppc)
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS= -O9 -funroll-loops $(PROFILE) -Wall
|
|
|
+ #if gcc 4.0+
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CPU ?= powerpc
|
|
|
+ CFLAGS+=-minline-all-stringops -ftree-vectorize \
|
|
|
+ -mtune=$(CPU) -maltivec
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CFLAGS+=
|
|
@@ -789,6 +846,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|
|
@@ -802,6 +860,11 @@ ifeq ($(ARCH), ppc64)
|
|
|
ifeq ($(CC_NAME), gcc)
|
|
|
#common stuff
|
|
|
CFLAGS= -O9 -funroll-loops $(PROFILE) -Wall
|
|
|
+ifeq ($(CC_SHORTVER), 4.x)
|
|
|
+ CPU ?= powerpc64
|
|
|
+ CFLAGS+=-minline-all-stringops -ftree-vectorize \
|
|
|
+ -mtune=$(CPU) -maltivec
|
|
|
+else
|
|
|
#if gcc 3.4+
|
|
|
ifeq ($(CC_SHORTVER), 3.4)
|
|
|
CFLAGS+=
|
|
@@ -822,6 +885,7 @@ $(warning You are using an old and unsupported gcc \
|
|
|
endif # CC_SHORTVER, 2.9x
|
|
|
endif # CC_SHORTVER, 3.0
|
|
|
endif # CC_SHORTVER, 3.4
|
|
|
+endif # CC_SHORTVER, 4.x
|
|
|
|
|
|
else # CC_NAME, gcc
|
|
|
#other compilers
|