diff options
-rw-r--r-- | kvm/kernel/Makefile | 5 | ||||
-rw-r--r-- | kvm/kernel/unifdef.h | 28 |
2 files changed, 29 insertions, 4 deletions
diff --git a/kvm/kernel/Makefile b/kvm/kernel/Makefile index c905bdaca..aca365e12 100644 --- a/kvm/kernel/Makefile +++ b/kvm/kernel/Makefile @@ -25,10 +25,7 @@ _hack = mv $1 $1.orig && \ gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \ | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig -unifdef_uflags = $(foreach arch, $(NONARCH_CONFIG), -UCONFIG_$(arch)) -unifdef = mv $1 $1.orig && \ - unifdef -DCONFIG_$(ARCH_CONFIG) $(unifdef_uflags) $1.orig > $1; \ - [ $$? -le 2 ] && rm $1.orig +unifdef = mv $1 $1.orig && cat unifdef.h $1.orig > $1 && rm $1.orig hack = $(call _hack,$T/$(strip $1)) diff --git a/kvm/kernel/unifdef.h b/kvm/kernel/unifdef.h new file mode 100644 index 000000000..ec7744156 --- /dev/null +++ b/kvm/kernel/unifdef.h @@ -0,0 +1,28 @@ +#ifndef KVM_UNIFDEF_H +#define KVM_UNIFDEF_H + +#ifdef __i386__ +#ifndef CONFIG_X86_32 +#define CONFIG_X86_32 1 +#endif +#endif + +#ifdef __x86_64__ +#ifndef CONFIG_X86_64 +#define CONFIG_X86_64 1 +#endif +#endif + +#if defined(__i386__) || defined (__x86_64__) +#ifndef CONFIG_X86 +#define CONFIG_X86 1 +#endif +#endif + +#ifdef __ia64__ +#ifndef CONFIG_IA64 +#define CONFIG_IA64 1 +#endif +#endif + +#endif |