aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-12-22 15:09:16 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-12-22 15:09:16 +0000
commit7b8a76ee7880b715d20befa89c7e316a32398ff6 (patch)
tree1e9e2dce62db91c0efe8b4fc22a5e4257ad902e5
parente0858ee6f46bcba472950f3b492463748218ec4f (diff)
downloadxen-7b8a76ee7880b715d20befa89c7e316a32398ff6.tar.gz
xen-7b8a76ee7880b715d20befa89c7e316a32398ff6.tar.bz2
xen-7b8a76ee7880b715d20befa89c7e316a32398ff6.zip
bitkeeper revision 1.1159.187.75 (41c98e1cJF7FTRAcKrESOThaChSpOQ)
Check for a recent GCC version before building Xen.
-rw-r--r--xen/arch/x86/Rules.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index bceb1982f4..d569a435c5 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -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