* [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* [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: Avi Kivity, kvm-ia64; +Cc: kvm
[-- Attachment #1: Type: text/plain, Size: 1930 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* Re: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building
2008-10-17 2:23 ` Zhang, Xiantao
@ 2008-10-19 15:41 ` Avi Kivity
-1 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2008-10-19 15:41 UTC (permalink / raw)
To: kvm-ia64
Zhang, Xiantao wrote:
> 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).
>
Developers can install unifdef (and gcc, etc.) I see that recent
unifdefs can handle ||, but will require all symbols to be defined or
undefined (with -D or -U).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
@ 2008-10-19 15:41 ` Avi Kivity
0 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2008-10-19 15:41 UTC (permalink / raw)
To: Zhang, Xiantao; +Cc: kvm-ia64, kvm
Zhang, Xiantao wrote:
> 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).
>
Developers can install unifdef (and gcc, etc.) I see that recent
unifdefs can handle ||, but will require all symbols to be defined or
undefined (with -D or -U).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
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
-1 siblings, 0 replies; 10+ messages in thread
From: Zhang, Xiantao @ 2008-10-20 2:26 UTC (permalink / raw)
To: kvm-ia64
Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> 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).
>>
>
> Developers can install unifdef (and gcc, etc.) I see that recent
> unifdefs can handle ||, but will require all symbols to be defined or
> undefined (with -D or -U).
Hi, Avi
I can't find a version of unifdef which can handle || operation,
which version are you using?
Thanks
Xiantao
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
@ 2008-10-20 2:26 ` Zhang, Xiantao
0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Xiantao @ 2008-10-20 2:26 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-ia64, kvm
Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> 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).
>>
>
> Developers can install unifdef (and gcc, etc.) I see that recent
> unifdefs can handle ||, but will require all symbols to be defined or
> undefined (with -D or -U).
Hi, Avi
I can't find a version of unifdef which can handle || operation,
which version are you using?
Thanks
Xiantao
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building
2008-10-20 2:26 ` Zhang, Xiantao
@ 2008-10-20 7:15 ` Avi Kivity
-1 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2008-10-20 7:15 UTC (permalink / raw)
To: kvm-ia64
Zhang, Xiantao wrote:
> I can't find a version of unifdef which can handle || operation,
> which version are you using?
>
1.117
Given the input
#if defined(X) || defined(Y)
aaa
#else
bbb
#endif
Running 'unifdef -DX -UY' seems to make sense out of it.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
@ 2008-10-20 7:15 ` Avi Kivity
0 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2008-10-20 7:15 UTC (permalink / raw)
To: Zhang, Xiantao; +Cc: kvm-ia64, kvm
Zhang, Xiantao wrote:
> I can't find a version of unifdef which can handle || operation,
> which version are you using?
>
1.117
Given the input
#if defined(X) || defined(Y)
aaa
#else
bbb
#endif
Running 'unifdef -DX -UY' seems to make sense out of it.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
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
-1 siblings, 0 replies; 10+ messages in thread
From: Zhang, Xiantao @ 2008-10-21 2:07 UTC (permalink / raw)
To: kvm-ia64
Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> I can't find a version of unifdef which can handle || operation,
>> which version are you using?
>>
>
> 1.117
>
> Given the input
>
> #if defined(X) || defined(Y)
> aaa
> #else
> bbb
> #endif
>
> Running 'unifdef -DX -UY' seems to make sense out of it.
Okay, but we have to do it with -DCONFIG_X86 and -DCONFIG_IA64 to do
unifdef. It maybe confusing. But anyway, if it can solve the issue and
has no other side-effect. I am Okay for that :)
Xiantao
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] KVM: Qemu: Define the macro CONFIG_$ARCH for building userspace.
@ 2008-10-21 2:07 ` Zhang, Xiantao
0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Xiantao @ 2008-10-21 2:07 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-ia64, kvm
Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> I can't find a version of unifdef which can handle || operation,
>> which version are you using?
>>
>
> 1.117
>
> Given the input
>
> #if defined(X) || defined(Y)
> aaa
> #else
> bbb
> #endif
>
> Running 'unifdef -DX -UY' seems to make sense out of it.
Okay, but we have to do it with -DCONFIG_X86 and -DCONFIG_IA64 to do
unifdef. It maybe confusing. But anyway, if it can solve the issue and
has no other side-effect. I am Okay for that :)
Xiantao
^ permalink raw reply [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.