Browse code

- updated the Makefile for gcc-3.1

Andrei Pelinescu-Onciul authored on 12/07/2002 15:01:09
Showing 1 changed files
... ...
@@ -123,10 +123,11 @@ MKTAGS=ctags -R .
123 123
 
124 124
 ifneq (,$(findstring gcc, $(CC_LONGVER)))
125 125
 	CC_NAME=gcc
126
-	CC_VER=$(CC) $(shell $(CC) --version)
126
+	CC_VER=$(CC) $(shell $(CC) --version|head -1| \
127
+				 sed -e 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
127 128
 	MKDEP=$(CC) -MM $(DEFS)
128 129
 	#transform gcc version into 2.9x or 3.0
129
-	CC_SHORTVER=$(shell $(CC) --version | \
130
+	CC_SHORTVER=$(shell echo $(CC_VER) | cut -d" " -f 2| \
130 131
 				 sed -e 's/[^0-9]*-\(.*\)/\1/'| \
131 132
 				 sed -e 's/2\.9.*/2.9x/' -e 's/3\..\..*/3.0/')
132 133
 endif
... ...
@@ -190,7 +191,7 @@ ifeq		($(CC_NAME), gcc)
190 190
 			#if gcc 3.0
191 191
 ifeq			($(CC_SHORTVER), 3.0)
192 192
 					CFLAGS+=-minline-all-stringops -malign-double \
193
-							-malign-loops=4 \
193
+							-falign-loops \
194 194
 							-march=athlon \
195 195
 							#-mcpu=athlon
196 196
 else
... ...
@@ -203,7 +204,7 @@ $(warning 			Old gcc detected ($(CC_SHORTVER)), use  gcc 3.0.x \
203 203
 else
204 204
 				#really old version
205 205
 $(warning			You are using an old and unsupported gcc \
206
-					 version ($(CC_SHORTVER)), compile at your own risk!)
206
+					 version  ($(CC_SHORTVER)), compile at your own risk!)
207 207
 
208 208
 endif			# CC_SHORTVER, 2.9x
209 209
 endif			# CC_SHORTVER, 3.0