[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/62] stubs: replace stubs with lnot if applicable
From: |
Paolo Bonzini |
Subject: |
[PULL 41/62] stubs: replace stubs with lnot if applicable |
Date: |
Mon, 16 Dec 2019 17:28:25 +0100 |
The stubs mechanism relies on static libraries and compilation order,
which is a bit brittle and should be avoided unless necessary.
Replace it with Boolean operations on CONFIG_* symbols.
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile.objs | 2 +-
crypto/Makefile.objs | 3 +--
util/Makefile.objs | 3 +--
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index e33e992..7b179d1 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -1,6 +1,6 @@
#######################################################################
# Common libraries for tools and emulators
-stub-obj-y = stubs/ util/ crypto/
+stub-obj-y = stubs/
util-obj-y = crypto/ util/ qobject/ qapi/
chardev-obj-y = chardev/
diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs
index 58014d1..c2a371b 100644
--- a/crypto/Makefile.objs
+++ b/crypto/Makefile.objs
@@ -22,6 +22,7 @@ crypto-obj-y += secret.o
crypto-obj-y += pbkdf.o
crypto-obj-$(CONFIG_NETTLE) += pbkdf-nettle.o
crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += pbkdf-gcrypt.o
+crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += pbkdf-stub.o
crypto-obj-y += ivgen.o
crypto-obj-y += ivgen-essiv.o
crypto-obj-y += ivgen-plain.o
@@ -32,8 +33,6 @@ crypto-obj-y += block.o
crypto-obj-y += block-qcow.o
crypto-obj-y += block-luks.o
-stub-obj-y += pbkdf-stub.o
-
util-obj-$(CONFIG_GCRYPT) += random-gcrypt.o
util-obj-$(if $(CONFIG_GCRYPT),n,$(CONFIG_GNUTLS)) += random-gnutls.o
util-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,y)) +=
random-platform.o
diff --git a/util/Makefile.objs b/util/Makefile.objs
index df124af..63599d6 100644
--- a/util/Makefile.objs
+++ b/util/Makefile.objs
@@ -52,8 +52,7 @@ util-obj-y += stats64.o
util-obj-y += systemd.o
util-obj-y += iova-tree.o
util-obj-$(CONFIG_INOTIFY1) += filemonitor-inotify.o
+util-obj-$(call lnot,$(CONFIG_INOTIFY1)) += filemonitor-stub.o
util-obj-$(CONFIG_LINUX) += vfio-helpers.o
util-obj-$(CONFIG_POSIX) += drm.o
util-obj-y += guest-random.o
-
-stub-obj-y += filemonitor-stub.o
--
1.8.3.1
- [PULL 32/62] build-sys: build vhost-user-gpu only if CONFIG_TOOLS, (continued)
- [PULL 32/62] build-sys: build vhost-user-gpu only if CONFIG_TOOLS, Paolo Bonzini, 2019/12/16
- [PULL 35/62] monitor: fix maybe-uninitialized, Paolo Bonzini, 2019/12/16
- [PULL 33/62] build-sys: do not include Windows SLIRP dependencies in $LIBS, Paolo Bonzini, 2019/12/16
- [PULL 34/62] migration: fix maybe-uninitialized warning, Paolo Bonzini, 2019/12/16
- [PULL 36/62] vhost-user-scsi: fix printf format warning, Paolo Bonzini, 2019/12/16
- [PULL 37/62] os-posix: simplify os_find_datadir, Paolo Bonzini, 2019/12/16
- [PULL 38/62] tests: skip block layer tests if !CONFIG_TOOLS, Paolo Bonzini, 2019/12/16
- [PULL 39/62] libvixl: remove per-target compiler flags, Paolo Bonzini, 2019/12/16
- [PULL 40/62] crypto: move common bits for all emulators to libqemuutil, Paolo Bonzini, 2019/12/16
- [PULL 42/62] configure: set $PYTHON to a full path, Paolo Bonzini, 2019/12/16
- [PULL 41/62] stubs: replace stubs with lnot if applicable,
Paolo Bonzini <=
- [PULL 44/62] i386: conditionally compile more files, Paolo Bonzini, 2019/12/16
- [PULL 43/62] configure: simplify vhost condition with Kconfig, Paolo Bonzini, 2019/12/16
- [PULL 45/62] fw_cfg: allow building without other devices, Paolo Bonzini, 2019/12/16
- [PULL 47/62] pci-stub: add more MSI functions, Paolo Bonzini, 2019/12/16
- [PULL 48/62] x86: move SMM property to X86MachineState, Paolo Bonzini, 2019/12/16
- [PULL 50/62] x86: move more x86-generic functions out of PC files, Paolo Bonzini, 2019/12/16
- [PULL 52/62] pc: stubify x86 iommu, Paolo Bonzini, 2019/12/16
- [PULL 53/62] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler(), Paolo Bonzini, 2019/12/16
- [PULL 46/62] hw: replace hw/i386/pc.h with a header just for the i8259, Paolo Bonzini, 2019/12/16
- [PULL 49/62] hw/i386/pc: Convert DPRINTF() to trace events, Paolo Bonzini, 2019/12/16