mreza...@redhat.com writes: > From: Miroslav Rezanina <mreza...@redhat.com> > > Disabling CONFIG_PARALLEL cause build failure as commit 07dc788 factored > out initialization to parallel_hds_isa_init function in hw/char/parallel.c > that is not build. > > Stub file is added to be able to disable CONFIG_PARALLEL. This file is used > in targets using parallel_hds_isa_init and provide empty definition of this > function. > > Signed-off-by: Miroslav Rezanina <mreza...@redhat.com> > > --- > hw/i386/Makefile.objs | 1 + > hw/mips/Makefile.objs | 2 ++ > hw/sparc64/Makefile.objs | 2 ++ > stubs/parallel-stub.c | 7 +++++++ > 4 files changed, 12 insertions(+) > create mode 100644 stubs/parallel-stub.c > > diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs > index e058a39..2b7131a 100644 > --- a/hw/i386/Makefile.objs > +++ b/hw/i386/Makefile.objs > @@ -4,6 +4,7 @@ obj-y += pc.o pc_piix.o pc_q35.o > obj-y += pc_sysfw.o > obj-y += intel_iommu.o > obj-$(CONFIG_XEN) += ../xenpv/ xen/ > +obj-$(call lnot,$(CONFIG_PARALLEL)) += ../../stubs/parallel-stub.o > > obj-y += kvmvapic.o > obj-y += acpi-build.o > diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs > index 0a652f8..2e65305 100644 > --- a/hw/mips/Makefile.objs > +++ b/hw/mips/Makefile.objs > @@ -2,3 +2,5 @@ obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o > obj-y += addr.o cputimer.o mips_int.o > obj-$(CONFIG_FULONG) += mips_fulong2e.o > obj-y += gt64xxx_pci.o > +obj-$(call lnot,$(CONFIG_PARALLEL)) += ../../stubs/parallel-stub.o > +
git-am complains "new blank line at EOF." > diff --git a/hw/sparc64/Makefile.objs b/hw/sparc64/Makefile.objs > index a84cfe3..7696611 100644 > --- a/hw/sparc64/Makefile.objs > +++ b/hw/sparc64/Makefile.objs > @@ -1 +1,3 @@ > obj-y += sun4u.o > +obj-$(call lnot,$(CONFIG_PARALLEL)) += ../../stubs/parallel-stub.o > + Likewise. > diff --git a/stubs/parallel-stub.c b/stubs/parallel-stub.c > new file mode 100644 > index 0000000..949c1b2 > --- /dev/null > +++ b/stubs/parallel-stub.c > @@ -0,0 +1,7 @@ > +#include "qemu/typedefs.h" > +#include "hw/isa/isa.h" > +#include "hw/i386/pc.h" > + > +void parallel_hds_isa_init(ISABus *bus, int n) > +{ > +} Fails to link if I disable CONFIG_PARALLEL in default-configs/mips-softmmu.mak: LINK mips-softmmu/qemu-system-mips hw/mips/mips_jazz.o: In function `mips_jazz_init': /home/armbru/work/qemu/hw/mips/mips_jazz.c:323: undefined reference to `parallel_mm_init' collect2: error: ld returned 1 exit status make[1]: *** [qemu-system-mips] Error 1 To fix that, you'd need to stub out parallel_mm_init(), too.