All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
@ 2008-10-17  2:23 ` Zhang, Xiantao
  0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Xiantao @ 2008-10-17  2:23 UTC (permalink / raw)
  To: kvm-ia64

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

From 7bba897e8f00c0d2e850e7b8f47cc491cb1f5dee Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
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@intel.com>
---
 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 #2: 0001-KVM-Qemu-Define-the-macro-CONFIG_-ARCH-for-buildin.patch --]
[-- Type: application/octet-stream, Size: 1864 bytes --]

From 7bba897e8f00c0d2e850e7b8f47cc491cb1f5dee Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
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@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-10-21  2:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17  2:23 [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace Zhang, Xiantao
2008-10-17  2:23 ` Zhang, Xiantao
2008-10-19 15:41 ` [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building Avi Kivity
2008-10-19 15:41   ` [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace Avi Kivity
2008-10-20  2:26 ` Zhang, Xiantao
2008-10-20  2:26   ` Zhang, Xiantao
2008-10-20  7:15 ` [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building Avi Kivity
2008-10-20  7:15   ` [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace Avi Kivity
2008-10-21  2:07 ` Zhang, Xiantao
2008-10-21  2:07   ` Zhang, Xiantao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.