From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShMFW-0000fc-QG for qemu-devel@nongnu.org; Wed, 20 Jun 2012 10:51:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShMFO-0007Yv-65 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 10:51:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55898 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShMFN-0007YP-Sc for qemu-devel@nongnu.org; Wed, 20 Jun 2012 10:51:06 -0400 Message-ID: <4FE1E355.3010102@suse.de> Date: Wed, 20 Jun 2012 16:51:01 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1340203444-20394-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1340203444-20394-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] build: introduce target CONFIG_ variables and use them for kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , qemu-devel@nongnu.org, Peter Maydell Am 20.06.2012 16:44, schrieb Anthony Liguori: > This avoids the problem associated with having multiple target specific= files > in a single directory with the current build system. >=20 > We can eventually get rid of the hw/$BASE_ARCH/Makefiles.obj files too >=20 > Signed-off-by: Anthony Liguori > --- > I tried to add a nice comment to the config-target.mak that described h= ow to > use these macros but that upset the header generation script. >=20 > So I left this out of this patch. > --- > configure | 30 ++++++++++++++++++++---------- > hw/Makefile.objs | 2 ++ > hw/i386/Makefile.objs | 1 - > hw/kvm/Makefile.objs | 2 +- > 4 files changed, 23 insertions(+), 12 deletions(-) >=20 > diff --git a/configure b/configure > index b68c0ca..f07c464 100755 > --- a/configure > +++ b/configure > @@ -3684,19 +3684,29 @@ case "$target_arch2" in > ;; > esac > =20 > -echo "TARGET_SHORT_ALIGNMENT=3D$target_short_alignment" >> $config_tar= get_mak > -echo "TARGET_INT_ALIGNMENT=3D$target_int_alignment" >> $config_target_= mak > -echo "TARGET_LONG_ALIGNMENT=3D$target_long_alignment" >> $config_targe= t_mak > -echo "TARGET_LLONG_ALIGNMENT=3D$target_llong_alignment" >> $config_tar= get_mak > -echo "TARGET_ARCH=3D$TARGET_ARCH" >> $config_target_mak > -target_arch_name=3D"`echo $TARGET_ARCH | LC_ALL=3DC tr '[a-z]' '[A-Z]'= `" > -echo "TARGET_$target_arch_name=3Dy" >> $config_target_mak > -echo "TARGET_ARCH2=3D$target_arch2" >> $config_target_mak > -echo "TARGET_BASE_ARCH=3D$TARGET_BASE_ARCH" >> $config_target_mak > +upper() { > + echo "$@" | LC_ALL=3DC tr '[a-z]' '[A-Z]' > +} > + > +target_arch_name=3D"`upper $TARGET_ARCH`" > if [ "$TARGET_ABI_DIR" =3D "" ]; then > TARGET_ABI_DIR=3D$TARGET_ARCH > fi > -echo "TARGET_ABI_DIR=3D$TARGET_ABI_DIR" >> $config_target_mak > + > +cat <> $config_target_mak > +TARGET_SHORT_ALIGNMENT=3D$target_short_alignment > +TARGET_INT_ALIGNMENT=3D$target_int_alignment > +TARGET_LONG_ALIGNMENT=3D$target_long_alignment > +TARGET_LLONG_ALIGNMENT=3D$target_llong_alignment > +TARGET_ARCH=3D$TARGET_ARCH > +TARGET_$target_arch_name=3Dy > +TARGET_ARCH2=3D$target_arch2 > +TARGET_BASE_ARCH=3D$TARGET_BASE_ARCH > +TARGET_ABI_DIR=3D$TARGET_ABI_DIR > +CONFIG_`upper $TARGET_BASE_ARCH`=3Dy > +CONFIG_`upper $TARGET_ARCH`=3Dy > +EOF > + > case "$target_arch2" in > i386|x86_64) > if test "$xen" =3D "yes" -a "$target_softmmu" =3D "yes" ; then > diff --git a/hw/Makefile.objs b/hw/Makefile.objs > index 3d77259..cee0e06 100644 > --- a/hw/Makefile.objs > +++ b/hw/Makefile.objs > @@ -166,6 +166,8 @@ obj-$(CONFIG_VGA) +=3D vga.o > obj-$(CONFIG_SOFTMMU) +=3D device-hotplug.o > obj-$(CONFIG_XEN) +=3D xen_domainbuild.o xen_machine_pv.o > =20 > +obj-$(CONFIG_KVM) +=3D kvm/ > + > # Inter-VM PCI shared memory > ifeq ($(CONFIG_PCI), y) > obj-$(CONFIG_KVM) +=3D ivshmem.o > diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs > index eb171b7..14738e5 100644 > --- a/hw/i386/Makefile.objs > +++ b/hw/i386/Makefile.objs > @@ -7,7 +7,6 @@ obj-y +=3D debugcon.o multiboot.o > obj-y +=3D pc_piix.o > obj-y +=3D pc_sysfw.o > obj-$(CONFIG_XEN) +=3D xen_platform.o xen_apic.o > -obj-y +=3D kvm/ > obj-$(CONFIG_SPICE) +=3D qxl.o qxl-logger.o qxl-render.o > =20 > obj-y :=3D $(addprefix ../,$(obj-y)) > diff --git a/hw/kvm/Makefile.objs b/hw/kvm/Makefile.objs > index 226497a..cf734ba 100644 > --- a/hw/kvm/Makefile.objs > +++ b/hw/kvm/Makefile.objs > @@ -1 +1 @@ > -obj-$(CONFIG_KVM) +=3D clock.o apic.o i8259.o ioapic.o i8254.o > +obj-$(CONFIG_I386) +=3D clock.o apic.o i8259.o ioapic.o i8254.o NACK. As long as the CPUState conversion is not completed (which after part 4 will take some time still) any user of CPUArchState must be compiled per target, not per base target. It may or may not work depending on fields accessed, but it is architecturally wrong. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg