From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Damm Subject: [PATCH] Fix __XEN_INTERFACE_VERSION__ old config breakage Date: Wed, 5 Apr 2006 07:45:34 +0900 (JST) Message-ID: <20060404224615.7472.23940.sendpatchset@cherry.local> Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: christian.limpach@gmail.com, Magnus Damm List-Id: xen-devel@lists.xenproject.org Fix __XEN_INTERFACE_VERSION__ old config breakage For old kernel configurations that lack CONFIG_XEN_INTERFACE_VERSION, __XEN_INTERFACE_VERSION__ will currently be defined but set to nothing. If a xen-enabled kernel is built separately from the xen-unstable dist, the following error occurs with xen-unstable-9415: # # using defaults found in .config # SPLIT include/linux/autoconf.h -> include/config/* CC arch/i386/kernel/asm-offsets.s In file included from include/xen/interface/xen.h:439, from include/asm/mach-xen/asm/page.h:20, from include/asm/thread_info.h:14, from include/linux/thread_info.h:21, from include/linux/preempt.h:10, from include/linux/spinlock.h:50, from include/linux/capability.h:45, from include/linux/sched.h:7, from arch/i386/kernel/asm-offsets.c:7: include/xen/interface/xen-compat.h:22:31: #if with no expression include/xen/interface/xen-compat.h:26:31: #if with no expression make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1 make: *** [prepare0] Error 2 $ The patch below fixes the problem and makes the logic in xen-compat.h work correctly - __XEN_INTERFACE_VERSION__ now becomes unset if the config option is missing. Signed-Off-By: Magnus Damm --- linux-2.6-xen-sparse/arch/i386/Makefile +++ linux-2.6-xen-sparse/arch/i386/Makefile 2006-03-31 16:36:09.000000000 +0900 @@ -45,8 +45,10 @@ CFLAGS += $(shell if [ $(call cc-vers CFLAGS += $(cflags-y) +ifneq "$(CONFIG_XEN_INTERFACE_VERSION)" "" cppflags-$(CONFIG_XEN) += \ -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) +endif CPPFLAGS += $(cppflags-y)