[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 8/8] hw/misc/edu: Compile the edu device as c
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v3 8/8] hw/misc/edu: Compile the edu device as common object |
Date: |
Thu, 22 Jun 2017 03:59:38 -0400 (EDT) |
----- Original Message -----
> From: "Thomas Huth" <address@hidden>
> To: "Richard Henderson" <address@hidden>, address@hidden, "Paolo Bonzini"
> <address@hidden>
> Sent: Wednesday, June 21, 2017 3:40:31 AM
> Subject: Re: [PATCH v3 8/8] hw/misc/edu: Compile the edu device as common
> object
>
> On 20.06.2017 20:14, Richard Henderson wrote:
> > On 06/19/2017 10:52 PM, Thomas Huth wrote:
> >> edu.c does not contain any target-specific code, so we can put
> >> it into common-obj-y to compile it only once for all targets.
> >>
> >> Signed-off-by: Thomas Huth <address@hidden>
> >
> > Isn't CONFIG_EDU defined by the target, via pci.conf?
> > Would it ever be set generically?
>
> This is about Makefiles, not #defines in C sources ... so if I
> understand our build-system correctly, the variable is set for the
> Makefiles of the targets that use pci.mak. As far as I see, it gets
> compiled correctly here.
> And we've got plenty of those common-obj-$(CONFIG_xxx) statements
> elsewhere in this file (e.g. for CONFIG_PCI_TESTDEV which is also
> declared in default-configs/pci.mak), so this is just normal, no problem
> here, as far as I can tell.
Yes, the variable is evaluated once during the main directory build,
where it comes from config-all-devices.mak. Then it is evaluated again
during the per-target build, where it comes from target-specific
configuration.
config-all-devices.mak should be documented in docs/devel/build-system.txt.
Paolo
Paolo
- Re: [Qemu-devel] [PATCH v3 1/8] include/exec/poison: Add missing TARGET defines, (continued)
- [Qemu-devel] [PATCH v3 3/8] Move CONFIG_KVM related definitions to kvm_i386.h, Thomas Huth, 2017/06/20
- [Qemu-devel] [PATCH v3 5/8] cpu: Introduce a wrapper for tlb_flush() that can be used in common code, Thomas Huth, 2017/06/20
- [Qemu-devel] [PATCH v3 7/8] Makefile: Move bootdevice.o to common-obj-y, Thomas Huth, 2017/06/20
- [Qemu-devel] [PATCH v3 6/8] include/exec/poison: Mark CONFIG_SOFTMMU as poisoned, Thomas Huth, 2017/06/20
- [Qemu-devel] [PATCH v3 8/8] hw/misc/edu: Compile the edu device as common object, Thomas Huth, 2017/06/20