[Qemu-devel] [PATCH 1/5] configs: Add a CONFIG_OR_IRQ switch for the or-irq device

Thomas Huth posted 5 patches 7 years, 3 months ago
[Qemu-devel] [PATCH 1/5] configs: Add a CONFIG_OR_IRQ switch for the or-irq device
Posted by Thomas Huth 7 years, 3 months ago
If the user only wants to compile targets that do not require the
"or-irq" device, we should also not compile or-irq.c. Add a proper
CONFIG_OR_IRQ switch to be able to choose this more flexibly.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/arm-softmmu.mak | 1 +
 default-configs/ppc-softmmu.mak | 1 +
 hw/core/Makefile.objs           | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 2420491..dc6a581 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -4,6 +4,7 @@ include pci.mak
 include usb.mak
 CONFIG_VGA=y
 CONFIG_NAND=y
+CONFIG_OR_IRQ=y
 CONFIG_ECC=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 3181bbf..83235af 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -68,3 +68,4 @@ CONFIG_PC87312=y
 CONFIG_PCSPK=y
 CONFIG_IDE_ISA=y
 CONFIG_CS4231A=y
+CONFIG_OR_IRQ=y
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index b736ce2..29b5cfd 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -17,7 +17,7 @@ common-obj-$(CONFIG_SOFTMMU) += loader.o
 common-obj-$(CONFIG_FITLOADER) += loader-fit.o
 common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
 common-obj-$(CONFIG_SOFTMMU) += register.o
-common-obj-$(CONFIG_SOFTMMU) += or-irq.o
+common-obj-$(CONFIG_OR_IRQ) += or-irq.o
 common-obj-$(CONFIG_SOFTMMU) += split-irq.o
 common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
 common-obj-$(CONFIG_SOFTMMU) += generic-loader.o
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH 1/5] configs: Add a CONFIG_OR_IRQ switch for the or-irq device
Posted by Peter Maydell 7 years, 3 months ago
On 19 October 2018 at 14:14, Thomas Huth <thuth@redhat.com> wrote:
> If the user only wants to compile targets that do not require the
> "or-irq" device, we should also not compile or-irq.c. Add a proper
> CONFIG_OR_IRQ switch to be able to choose this more flexibly.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  default-configs/arm-softmmu.mak | 1 +
>  default-configs/ppc-softmmu.mak | 1 +
>  hw/core/Makefile.objs           | 2 +-
>  3 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 2420491..dc6a581 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -4,6 +4,7 @@ include pci.mak
>  include usb.mak
>  CONFIG_VGA=y
>  CONFIG_NAND=y
> +CONFIG_OR_IRQ=y
>  CONFIG_ECC=y
>  CONFIG_SERIAL=y
>  CONFIG_SERIAL_ISA=y
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 3181bbf..83235af 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -68,3 +68,4 @@ CONFIG_PC87312=y
>  CONFIG_PCSPK=y
>  CONFIG_IDE_ISA=y
>  CONFIG_CS4231A=y
> +CONFIG_OR_IRQ=y

Again, this is generic. We shouldn't need to mess with default-configs
files if we use it in some other architecture.

thanks
-- PMM