qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 1/3] buildsys: Move nettle cflags/libs to per object
Date: Wed,  6 Sep 2017 09:27:13 +0800	[thread overview]
Message-ID: <20170906012715.31761-2-famz@redhat.com> (raw)
In-Reply-To: <20170906012715.31761-1-famz@redhat.com>

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 configure            | 5 ++---
 crypto/Makefile.objs | 6 ++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index fb7e34a901..6a4cb3832b 100755
--- a/configure
+++ b/configure
@@ -2616,9 +2616,6 @@ if test "$nettle" != "no"; then
         nettle_cflags=$($pkg_config --cflags nettle)
         nettle_libs=$($pkg_config --libs nettle)
         nettle_version=$($pkg_config --modversion nettle)
-        libs_softmmu="$nettle_libs $libs_softmmu"
-        libs_tools="$nettle_libs $libs_tools"
-        QEMU_CFLAGS="$QEMU_CFLAGS $nettle_cflags"
         nettle="yes"
 
         cat > $TMPC << EOF
@@ -5732,6 +5729,8 @@ if test "$nettle" = "yes" ; then
   if test "$nettle_kdf" = "yes" ; then
     echo "CONFIG_NETTLE_KDF=y" >> $config_host_mak
   fi
+  echo "NETTLE_CFLAGS=$nettle_cflags" >> $config_host_mak
+  echo "NETTLE_LIBS=$nettle_libs" >> $config_host_mak
 fi
 if test "$tasn1" = "yes" ; then
   echo "CONFIG_TASN1=y" >> $config_host_mak
diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs
index 2b99e08062..a936957d03 100644
--- a/crypto/Makefile.objs
+++ b/crypto/Makefile.objs
@@ -34,6 +34,12 @@ crypto-obj-y += block.o
 crypto-obj-y += block-qcow.o
 crypto-obj-y += block-luks.o
 
+$(if $(CONFIG_NETTLE), \
+	$(foreach x, cipher hash-nettle hmac-nettle pbkdf-nettle, \
+		$(eval $x.o-cflags := $(NETTLE_CFLAGS)) \
+		$(eval $x.o-libs := $(NETTLE_LIBS))) \
+)
+
 # Let the userspace emulators avoid linking gnutls/etc
 crypto-aes-obj-y = aes.o
 
-- 
2.13.5

  reply	other threads:[~2017-09-06  1:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06  1:27 [Qemu-devel] [PATCH v2 0/3] buildsys: Move crypto libraries to per object variables Fam Zheng
2017-09-06  1:27 ` Fam Zheng [this message]
2017-09-06  1:27 ` [Qemu-devel] [PATCH v2 2/3] buildsys: Move gnutls cflags/libs to per object Fam Zheng
2017-09-06  7:38   ` Fam Zheng
2017-09-06  1:27 ` [Qemu-devel] [PATCH v2 3/3] buildsys: Move gcrypt " Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170906012715.31761-2-famz@redhat.com \
    --to=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).