[PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 7bba897e8f00c0d2e850e7b8f47cc491cb1f5dee Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
Date: Fri, 17 Oct 2008 09:07:01 +0800
Subject: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building
userspace.

Currently, make sync will use unifdef to hack some header files, but
it maybe not work on some systems, caused by lack of unifdef or unifdef
can't handle some macro combinations(Such as ||, && operations).
Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
---
 configure                |    1 +
 libkvm/config-i386.mak   |    2 +-
 libkvm/config-ia64.mak   |    2 +-
 libkvm/config-x86_64.mak |    2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 3b5d14f..5337df9 100755
--- a/configure
+++ b/configure
@@ -100,6 +100,7 @@ fi
 
 if [ "$arch" = "ia64" ]; then
     target_exec="ia64-softmmu"
+    qemu_cflags="$qemu_cflags -DCONFIG_IA64"
 fi
 
 if [ "$arch" = "powerpc" ]; then
diff --git a/libkvm/config-i386.mak b/libkvm/config-i386.mak
index 2706b70..3579985 100644
--- a/libkvm/config-i386.mak
+++ b/libkvm/config-i386.mak
@@ -1,6 +1,6 @@
 
 LIBDIR := /lib
 CFLAGS += -m32
-CFLAGS += -D__i386__
+CFLAGS += -D__i386__ -DCONFIG_X86
 
 libkvm-$(ARCH)-objs := libkvm-x86.o
diff --git a/libkvm/config-ia64.mak b/libkvm/config-ia64.mak
index 568c397..87d273b 100644
--- a/libkvm/config-ia64.mak
+++ b/libkvm/config-ia64.mak
@@ -1,5 +1,5 @@
 
 LIBDIR := /lib
-CFLAGS += -D__ia64__
+CFLAGS += -D__ia64__ -DCONFIG_IA64
 
 libkvm-$(ARCH)-objs := libkvm-ia64.o
diff --git a/libkvm/config-x86_64.mak b/libkvm/config-x86_64.mak
index e638977..9d02eb0 100644
--- a/libkvm/config-x86_64.mak
+++ b/libkvm/config-x86_64.mak
@@ -1,6 +1,6 @@
 
 LIBDIR := /lib64
 CFLAGS += -m64
-CFLAGS += -D__x86_64__
+CFLAGS += -D__x86_64__ -DCONFIG_X86
 
 libkvm-$(ARCH)-objs := libkvm-x86.o
-- 
1.5.1

Attachment: 0001-KVM-Qemu-Define-the-macro-CONFIG_-ARCH-for-buildin.patch
Description: 0001-KVM-Qemu-Define-the-macro-CONFIG_-ARCH-for-buildin.patch


[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux