Commit aff2caf6 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/kraxel/tags/modules-20200707-pull-request' into staging



qom: add support for qom objects in modules.
build some devices (qxl, virtio-gpu, ccid, usb-redir) as modules.
build braille chardev as module.

v2: more verbose comment for "build: fix device module builds" patch.

note: qemu doesn't rebuild objects on cflags changes (specifically
      -fPIC being added when code is switched from builtin to module).
      Workaround for resulting build errors: "make clean", rebuild.

# gpg: Signature made Tue 07 Jul 2020 14:42:16 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/modules-20200707-pull-request:
  chardev: enable modules, use for braille
  vga: build virtio-gpu as module
  vga: build virtio-gpu only once
  vga: build qxl as module
  usb: build usb-redir as module
  ccid: build smartcard as module
  build: fix device module builds
  qdev: device module support
  object: qom module support
  module: qom module support

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 3d7cad3c ef138c77
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ common-obj-y += migration/
common-obj-y += audio/
common-obj-m += audio/
common-obj-y += hw/
common-obj-m += hw/

common-obj-y += replay/

@@ -70,6 +71,7 @@ common-obj-$(CONFIG_TPM) += tpm.o

common-obj-y += backends/
common-obj-y += chardev/
common-obj-m += chardev/

common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
+14 −0
Original line number Diff line number Diff line
@@ -179,6 +179,20 @@ endif # CONFIG_SOFTMMU
dummy := $(call unnest-vars,,obj-y)
all-obj-y := $(obj-y)

#
# common-obj-m has some crap here, probably as side effect from
# unnest-vars recursing into target directories to fill obj-y and not
# properly handling the -m case.
#
# Clear common-obj-m as workaround.  Fixes suspious dependency errors
# when building devices as modules.  A bit hackish, but should be ok
# as long as we do not have any target-specific modules.
#
# The meson-based build system currently in development doesn't need
# unnest-vars and will obsolete this workaround.
#
common-obj-m :=

include $(SRC_PATH)/Makefile.objs
dummy := $(call unnest-vars,.., \
               authz-obj-y \
+4 −1
Original line number Diff line number Diff line
@@ -18,8 +18,11 @@ chardev-obj-$(CONFIG_WIN32) += char-win.o
chardev-obj-$(CONFIG_WIN32) += char-win-stdio.o

common-obj-y += msmouse.o wctablet.o testdev.o
common-obj-$(CONFIG_BRLAPI) += baum.o

ifeq ($(CONFIG_BRLAPI),y)
common-obj-m += baum.o
baum.o-cflags := $(SDL_CFLAGS)
baum.o-libs := $(BRLAPI_LIBS)
endif

common-obj-$(CONFIG_SPICE) += spice.o
+1 −1
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)
    const ChardevClass *cc;
    char *typename = g_strdup_printf("chardev-%s", driver);

    oc = object_class_by_name(typename);
    oc = module_object_class_by_name(typename);
    g_free(typename);

    if (!object_class_dynamic_cast(oc, TYPE_CHARDEV)) {
+2 −0
Original line number Diff line number Diff line
@@ -43,4 +43,6 @@ devices-dirs-y += smbios/
endif

common-obj-y += $(devices-dirs-y)
common-obj-m += display/
common-obj-m += usb/
obj-y += $(devices-dirs-y)
Loading