[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/62] crypto: move common bits for all emulators to libqemuutil
From: |
Paolo Bonzini |
Subject: |
[PULL 40/62] crypto: move common bits for all emulators to libqemuutil |
Date: |
Mon, 16 Dec 2019 17:28:24 +0100 |
qcrypto_random_*, AES and qcrypto_init do not need to be linked as a whole
and are the only parts that are used by user-mode emulation. Place them
in libqemuutil, so that whatever needs them will pick them up automatically.
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 3 +--
Makefile.objs | 3 +--
Makefile.target | 2 --
crypto/Makefile.objs | 12 +++++-------
4 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index bfd8ba3..fb1728e 100644
--- a/Makefile
+++ b/Makefile
@@ -436,7 +436,6 @@ dummy := $(call unnest-vars,, \
block-obj-y \
block-obj-m \
crypto-obj-y \
- crypto-user-obj-y \
qom-obj-y \
io-obj-y \
common-obj-y \
@@ -524,7 +523,7 @@ subdir-capstone: capstone/all
subdir-slirp: slirp/all
$(filter %/all, $(TARGET_DIRS_RULES)): libqemuutil.a $(common-obj-y) \
- $(qom-obj-y) $(crypto-user-obj-$(CONFIG_USER_ONLY))
+ $(qom-obj-y)
ROM_DIRS = $(addprefix pc-bios/, $(ROMS))
ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
diff --git a/Makefile.objs b/Makefile.objs
index b6fcbac..e33e992 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -1,7 +1,7 @@
#######################################################################
# Common libraries for tools and emulators
stub-obj-y = stubs/ util/ crypto/
-util-obj-y = util/ qobject/ qapi/
+util-obj-y = crypto/ util/ qobject/ qapi/
chardev-obj-y = chardev/
@@ -25,7 +25,6 @@ block-obj-m = block/
# crypto-obj-y is code used by both qemu system emulation and qemu-img
crypto-obj-y = crypto/
-crypto-user-obj-y = crypto/
#######################################################################
# qom-obj-y is code used by both qemu system emulation and qemu-img
diff --git a/Makefile.target b/Makefile.target
index 24d79d2..6e61f60 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -184,7 +184,6 @@ dummy := $(call unnest-vars,.., \
block-obj-m \
chardev-obj-y \
crypto-obj-y \
- crypto-user-obj-y \
qom-obj-y \
io-obj-y \
common-obj-y \
@@ -193,7 +192,6 @@ all-obj-y += $(common-obj-y)
all-obj-y += $(qom-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) $(chardev-obj-y)
-all-obj-$(CONFIG_USER_ONLY) += $(crypto-user-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs
index cdb01f9..58014d1 100644
--- a/crypto/Makefile.objs
+++ b/crypto/Makefile.objs
@@ -19,10 +19,6 @@ crypto-obj-y += tlscredspsk.o
crypto-obj-y += tlscredsx509.o
crypto-obj-y += tlssession.o
crypto-obj-y += secret.o
-crypto-rng-obj-$(CONFIG_GCRYPT) += random-gcrypt.o
-crypto-rng-obj-$(if $(CONFIG_GCRYPT),n,$(CONFIG_GNUTLS)) += random-gnutls.o
-crypto-rng-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,y)) +=
random-platform.o
-crypto-obj-y += $(crypto-rng-obj-y)
crypto-obj-y += pbkdf.o
crypto-obj-$(CONFIG_NETTLE) += pbkdf-nettle.o
crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += pbkdf-gcrypt.o
@@ -36,7 +32,9 @@ crypto-obj-y += block.o
crypto-obj-y += block-qcow.o
crypto-obj-y += block-luks.o
-# Let the userspace emulators avoid linking stuff they won't use.
-crypto-user-obj-y = aes.o $(crypto-rng-obj-y) init.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
+util-obj-y += aes.o init.o
--
1.8.3.1
- [PULL 29/62] kvm: convert "-machine kernel_irqchip" to an accelerator property, (continued)
- [PULL 29/62] kvm: convert "-machine kernel_irqchip" to an accelerator property, Paolo Bonzini, 2019/12/16
- [PULL 31/62] object: Improve documentation of interfaces, Paolo Bonzini, 2019/12/16
- [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 <=
- [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, 2019/12/16
- [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