DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] mk: fix build with shared pcap pmd
Date: Tue, 16 Dec 2014 00:04:44 +0100	[thread overview]
Message-ID: <1418684684-23642-1-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <2438199.ui6ep4sFDa@xps13>

Some applications doesn't have the pcap link flag
when shared libraries are enabled.
Indeed in such case, pcap PMD must not be linked but pcap library should.

Actually -lpcap is always needed if pcap PMD is used,
and -lrte_pmd_pcap must be set only with static PMD library.
So the flags -lrte_pmd_pcap and -lpcap are enabled separately.

Workarounds in test-pmd/ and test-pipeline/ can be removed.

Reported-by: Stepan Sojka <stepan.sojka@adaptivemobile.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---

v2:
fix in rte.app.mk

v1 from Stepan:
fix every applications

 app/test-pipeline/Makefile | 4 ----
 app/test-pmd/Makefile      | 4 ----
 mk/rte.app.mk              | 6 +++++-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/app/test-pipeline/Makefile b/app/test-pipeline/Makefile
index b81652f..aa6df0c 100644
--- a/app/test-pipeline/Makefile
+++ b/app/test-pipeline/Makefile
@@ -41,10 +41,6 @@ APP = testpipeline
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDFLAGS += -lpcap
-endif
-
 #
 # all source are stored in SRCS-y
 #
diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index 97dc2e6..dcf26f4 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -41,10 +41,6 @@ APP = testpmd
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDFLAGS += -lpcap
-endif
-
 #
 # all source are stored in SRCS-y
 #
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 84ec4df..c5eaf82 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -119,6 +119,10 @@ LDLIBS += -lm
 LDLIBS += -lrt
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
+LDLIBS += -lpcap
+endif
+
 LDLIBS += --start-group
 
 ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
@@ -207,7 +211,7 @@ LDLIBS += -lrte_pmd_ring
 endif
 
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
-LDLIBS += -lrte_pmd_pcap -lpcap
+LDLIBS += -lrte_pmd_pcap
 endif
 
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
-- 
2.1.3

  reply	other threads:[~2014-12-15 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 23:14 [dpdk-dev] [pcap PATCH] pcap: fix build of all-in-one shared library stepan
2014-12-08 14:49 ` [dpdk-dev] [dpdk-dev, pcap] " Neil Horman
2014-12-15 22:42   ` Thomas Monjalon
2014-12-15 23:04     ` Thomas Monjalon [this message]
2014-12-16 13:58       ` [dpdk-dev] [PATCH v2] mk: fix build with shared pcap pmd Neil Horman
2014-12-16 14:39         ` Thomas Monjalon
2014-12-16 21:42           ` Neil Horman
2014-12-16 23:37             ` 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=1418684684-23642-1-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.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).