On 14/05/2019 21:16, Richard Henderson wrote: > For user-only, we require only the random number bits of the > crypto subsystem. > > We need to preserve --static linking, which for many recent Linux > distributions precludes using GnuTLS or GCrypt. Instead, use our > random-platform module unconditionally. >
Perhaps we can rename "crypto-aes-obj" to "crypto-user-obj" and put aes.o and random-platform.o into? The only aim of crypto-aes-obj was to link aes.o with linux-user binaries. Anyway, it's only cosmetic, so you can add: Reviewed-by: Laurent Vivier <lviv...@redhat.com> > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > Makefile | 6 ++++-- > Makefile.objs | 1 + > Makefile.target | 3 ++- > crypto/Makefile.objs | 1 + > 4 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 66d5c65156..524f2f8a57 100644 > --- a/Makefile > +++ b/Makefile > @@ -411,6 +411,7 @@ dummy := $(call unnest-vars,, \ > block-obj-m \ > crypto-obj-y \ > crypto-aes-obj-y \ > + crypto-rng-obj-y \ > qom-obj-y \ > io-obj-y \ > common-obj-y \ > @@ -482,8 +483,9 @@ subdir-capstone: .git-submodule-status > subdir-slirp: .git-submodule-status > $(call quiet-command,$(MAKE) -C $(SRC_PATH)/slirp > BUILD_DIR="$(BUILD_DIR)/slirp" CC="$(CC)" AR="$(AR)" LD="$(LD)" > RANLIB="$(RANLIB)" CFLAGS="$(QEMU_CFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)") > > -$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ > - $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) > +$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) $(qom-obj-y) > \ > + $(crypto-aes-obj-$(CONFIG_USER_ONLY)) \ > + $(crypto-rng-obj-$(CONFIG_USER_ONLY)) > > ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) > # Only keep -O and -g cflags > diff --git a/Makefile.objs b/Makefile.objs > index cf065de5ed..0c13ff47ea 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -26,6 +26,7 @@ block-obj-m = block/ > > crypto-obj-y = crypto/ > crypto-aes-obj-y = crypto/ > +crypto-rng-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 ae02495951..4e579a0a84 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -181,6 +181,7 @@ dummy := $(call unnest-vars,.., \ > chardev-obj-y \ > crypto-obj-y \ > crypto-aes-obj-y \ > + crypto-rng-obj-y \ > qom-obj-y \ > io-obj-y \ > common-obj-y \ > @@ -189,7 +190,7 @@ 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-aes-obj-y) > +all-obj-$(CONFIG_USER_ONLY) += $(crypto-aes-obj-y) $(crypto-rng-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 256c9aca1f..ee7e628ca6 100644 > --- a/crypto/Makefile.objs > +++ b/crypto/Makefile.objs > @@ -37,5 +37,6 @@ crypto-obj-y += block-luks.o > > # Let the userspace emulators avoid linking gnutls/etc > crypto-aes-obj-y = aes.o > +crypto-rng-obj-y = random-platform.o > > stub-obj-y += pbkdf-stub.o >