From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 2/3] buildsys: Move gnutls cflags/libs to per object
Date: Wed, 6 Sep 2017 09:27:14 +0800 [thread overview]
Message-ID: <20170906012715.31761-3-famz@redhat.com> (raw)
In-Reply-To: <20170906012715.31761-1-famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
configure | 4 ++--
crypto/Makefile.objs | 7 +++++++
tests/Makefile.include | 10 +++++-----
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 6a4cb3832b..d24a7eab37 100755
--- a/configure
+++ b/configure
@@ -2472,8 +2472,6 @@ if test "$gnutls" != "no"; then
if gnutls_works; then
gnutls_cflags=$($pkg_config --cflags gnutls)
gnutls_libs=$($pkg_config --libs gnutls)
- libs_softmmu="$gnutls_libs $libs_softmmu"
- libs_tools="$gnutls_libs $libs_tools"
QEMU_CFLAGS="$QEMU_CFLAGS $gnutls_cflags"
gnutls="yes"
@@ -5710,6 +5708,8 @@ fi
echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
if test "$gnutls" = "yes" ; then
echo "CONFIG_GNUTLS=y" >> $config_host_mak
+ echo "GNUTLS_CFLAGS=$gnutls_cflags" >> $config_host_mak
+ echo "GNUTLS_LIBS=$gnutls_libs" >> $config_host_mak
fi
if test "$gnutls_rnd" = "yes" ; then
echo "CONFIG_GNUTLS_RND=y" >> $config_host_mak
diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs
index a936957d03..0cb5fa24b6 100644
--- a/crypto/Makefile.objs
+++ b/crypto/Makefile.objs
@@ -40,6 +40,13 @@ $(if $(CONFIG_NETTLE), \
$(eval $x.o-libs := $(NETTLE_LIBS))) \
)
+$(if $(CONFIG_GNUTLS), \
+ $(foreach x, init random-gnutls tlscreds tlscredsanon \
+ tlscredsx509 tlssession, \
+ $(eval $x.o-cflags := $(GNUTLS_CFLAGS)) \
+ $(eval $x.o-libs := $(GNUTLS_LIBS))) \
+)
+
# Let the userspace emulators avoid linking gnutls/etc
crypto-aes-obj-y = aes.o
diff --git a/tests/Makefile.include b/tests/Makefile.include
index fae5715e9c..d46c22d1ec 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -677,15 +677,15 @@ tests/benchmark-crypto-cipher$(EXESUF): tests/benchmark-crypto-cipher.o $(test-c
tests/test-crypto-secret$(EXESUF): tests/test-crypto-secret.o $(test-crypto-obj-y)
tests/test-crypto-xts$(EXESUF): tests/test-crypto-xts.o $(test-crypto-obj-y)
-tests/crypto-tls-x509-helpers.o-cflags := $(TASN1_CFLAGS)
-tests/crypto-tls-x509-helpers.o-libs := $(TASN1_LIBS)
-tests/pkix_asn1_tab.o-cflags := $(TASN1_CFLAGS)
+tests/crypto-tls-x509-helpers.o-cflags := $(TASN1_CFLAGS) $(GNUTLS_CFLAGS)
+tests/crypto-tls-x509-helpers.o-libs := $(TASN1_LIBS) $(GNUTLS_LIBS)
+tests/pkix_asn1_tab.o-cflags := $(TASN1_CFLAGS) $(GNUTLS_LIBS)
-tests/test-crypto-tlscredsx509.o-cflags := $(TASN1_CFLAGS)
+tests/test-crypto-tlscredsx509.o-cflags := $(TASN1_CFLAGS) $(GNUTLS_CFLAGS)
tests/test-crypto-tlscredsx509$(EXESUF): tests/test-crypto-tlscredsx509.o \
tests/crypto-tls-x509-helpers.o tests/pkix_asn1_tab.o $(test-crypto-obj-y)
-tests/test-crypto-tlssession.o-cflags := $(TASN1_CFLAGS)
+tests/test-crypto-tlssession.o-cflags := $(TASN1_CFLAGS) $(GNUTLS_CFLAGS)
tests/test-crypto-tlssession$(EXESUF): tests/test-crypto-tlssession.o \
tests/crypto-tls-x509-helpers.o tests/pkix_asn1_tab.o $(test-crypto-obj-y)
tests/test-io-task$(EXESUF): tests/test-io-task.o $(test-io-obj-y)
--
2.13.5
next prev parent 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 ` [Qemu-devel] [PATCH v2 1/3] buildsys: Move nettle cflags/libs to per object Fam Zheng
2017-09-06 1:27 ` Fam Zheng [this message]
2017-09-06 7:38 ` [Qemu-devel] [PATCH v2 2/3] buildsys: Move gnutls " 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-3-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).