]> xenbits.xensource.com Git - xen.git/commitdiff
bitkeeper revision 1.1159.187.75 (41c98e1cJF7FTRAcKrESOThaChSpOQ)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 22 Dec 2004 15:09:16 +0000 (15:09 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 22 Dec 2004 15:09:16 +0000 (15:09 +0000)
Check for a recent GCC version before building Xen.

xen/arch/x86/Rules.mk

index bceb1982f4377758c7a0a53f0f7e313fc67e3435..d569a435c5c6f37e98a416ce1103a275475280af 100644 (file)
@@ -32,3 +32,20 @@ CFLAGS  += -m64 -mno-red-zone -fpic -fno-reorder-blocks
 CFLAGS  += -fno-asynchronous-unwind-tables
 LDFLAGS := --oformat elf64-x86-64
 endif
+
+# Test for at least GCC v3.2.x.
+gcc-ver = $(shell $(CC) -dumpversion | sed -e 's/^\(.\)\.\(.\)\.\(.\)/\$(1)/')
+ifeq ($(call gcc-ver,1),1)
+$(error gcc-1.x.x unsupported - upgrade to at least gcc-3.2.x)
+endif
+ifeq ($(call gcc-ver,1),2)
+$(error gcc-2.x.x unsupported - upgrade to at least gcc-3.2.x)
+endif
+ifeq ($(call gcc-ver,1),3)
+ifeq ($(call gcc-ver,2),0)
+$(error gcc-3.0.x unsupported - upgrade to at least gcc-3.2.x)
+endif
+ifeq ($(call gcc-ver,2),1)
+$(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x)
+endif
+endif