Browse code

- better gcc version detection (slightly different than 0.9.0) - added gcc version log file (output of "gcc --version|head -n 1" for various gcc versions, useful for testing the gcc detection)

Andrei Pelinescu-Onciul authored on 05/09/2005 10:49:36
Showing 2 changed files
... ...
@@ -205,8 +205,9 @@ MKTAGS=ctags -R .
205 205
 
206 206
 ifneq (,$(findstring gcc, $(CC_LONGVER)))
207 207
 	CC_NAME=gcc
208
-	CC_VER=$(CC) $(shell $(CC) --version|head -n 1| \
209
-				 sed -e 's/^[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/' -e 's/^[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
208
+	CC_VER=$(CC) $(shell $(CC) --version|head -n 1|cut -d" " -f 3| \
209
+				 sed -e 's/^.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/' \
210
+				 	 -e 's/^[^0-9].*\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/')
210 211
 	# sun sed is a little brain damaged => this complicated expression
211 212
 	MKDEP=$(CC) -MM 
212 213
 	#transform gcc version into 2.9x or 3.0
213 214
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+2.7.1
1
+2.8.1
2
+egcs-2.91.66
3
+2.95.3
4
+2.95.4
5
+3.0.4
6
+gcc (GCC) 3.2
7
+gcc-3.2 (GCC) 3.2.3 (Debian)
8
+gcc (GCC) 3.3.3 (NetBSD nb3 20040520)
9
+gcc (GCC) 3.3.5 (propolice)
10
+gcc-3.3 (GCC) 3.3.5 (Debian 1:3.3.5-6)
11
+gcc-3.3 (GCC) 3.3.5 (Debian 1:3.3.5-13)
12
+gcc (GCC) 3.4.2 [FreeBSD] 20040728
13
+gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
14
+gcc-3.4 (GCC) 3.4.4 20041218 (prerelease) (Debian 3.4.3-7)
15
+powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer, Inc. build 4061)
16
+gcc-4.0 (GCC) 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)
17
+