# HG changeset patch # User kaf24@scramble.cl.cam.ac.uk # Date 1103728156 0 # Node ID fbfa79f89dfac58805190c24cf8fcf6327e597c7 # Parent 391b2a76a7498d3f84b491fb56b04ad74ff12ea7 bitkeeper revision 1.1159.187.75 (41c98e1cJF7FTRAcKrESOThaChSpOQ) Check for a recent GCC version before building Xen. diff -r 391b2a76a749 -r fbfa79f89dfa xen/arch/x86/Rules.mk --- a/xen/arch/x86/Rules.mk Wed Dec 22 11:00:58 2004 +0000 +++ b/xen/arch/x86/Rules.mk Wed Dec 22 15:09:16 2004 +0000 @@ -32,3 +32,20 @@ CFLAGS += -m64 -mno-red-zone -fpic -fno 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