Skip to contentSkip to conversation

defer error generation for too old gcc

PATCH New Jan Beulich 1 participant 1 message Mar 22, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 defer error generation for too old gcc

In order to allow building as non-root with a non-default CC (which root may not have access to through its $PATH), defer the generation of an error until CC is actually needed.

tools/Rules.mk +2 -1
Index: 2007-03-19/tools/Rules.mk
===================================================================
@@ -25,7 +25,8 @@ CFLAGS += $(CFLAGS-y)
 
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 ifeq ($(CONFIG_X86)$(call cc-ver,$(CC),0x030400),yn)
-$(error Xen tools require at least gcc-3.4)
+override CC=echo "Xen requires at least gcc-3.4" >&2; exit 1;
+cc-option := n
 endif
 
 %.opic: %.c
xen/arch/x86/Rules.mk +2 -1
Index: 2007-03-19/xen/arch/x86/Rules.mk
===================================================================
@@ -60,5 +60,6 @@ HDRS += $(wildcard $(BASEDIR)/include/as
 
 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
 ifneq ($(call cc-ver,$(CC),0x030400),y)
-$(error Xen requires at least gcc-3.4)
+override CC=echo "Xen requires at least gcc-3.4" >&2; exit 1;
+cc-option := n
 endif