DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Panu Matilainen <pmatilai@redhat.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/2] mk: prepare dependencies in shared libraries not combined
Date: Sun,  6 Dec 2015 19:46:05 +0100	[thread overview]
Message-ID: <1449427566-15782-1-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <ee5b1caf719262b06bbf0b8b134b250abd0865d3.1445437070.git.pmatilai@redhat.com>

Some DPDK libraries have a dependency.
The Mellanox drivers embed this declaration in shared library case.
So the application do not need to know the dependency when linking.
But it cannot work with static libraries or the combined one.
Note that Mellanox drivers are currently not supported in a shared
combined library case.

Most of the DPDK libraries declare their dependencies to be linked
with the application in every cases, even when using drivers as
shared library plugins.
This patch improves the condition used for Mellanox drivers, so that
it can be applied to other drivers without breaking the shared
combined library case.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.app.mk | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index d7e2964..3f56852 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -102,13 +102,13 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lfuse
 endif
 
-ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
+# The static libraries do not know their dependencies.
+# The combined library fails also to store this information.
+# So linking with static or combined library requires explicit dependencies.
+ifneq ($(CONFIG_RTE_BUILD_COMBINE_LIBS)$(CONFIG_RTE_BUILD_SHARED_LIB),ny)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
-endif # ! CONFIG_RTE_BUILD_SHARED_LIBS
-
-ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs
-endif # ! CONFIG_RTE_BUILD_SHARED_LIBS
+endif # CONFIG_RTE_BUILD_COMBINE_LIBS or not CONFIG_RTE_BUILD_SHARED_LIBS
 
 _LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD)      += -lz
 
-- 
2.5.2

  parent reply	other threads:[~2015-12-06 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 14:18 [dpdk-dev] [PATCH] drivers: fix shared library dependencies to external libraries Panu Matilainen
2015-10-21 16:30 ` Nicolas Pernas Maradei
2015-10-22  4:44   ` Panu Matilainen
2015-12-06 18:46 ` Thomas Monjalon [this message]
2015-12-06 18:46   ` [dpdk-dev] [PATCH v2 2/2] mk: fix shared library dependencies of drivers Thomas Monjalon
2015-12-06 21:13     ` Thomas Monjalon

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=1449427566-15782-1-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=pmatilai@redhat.com \
    /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).