[dpdk-dev] [PATCH v5] build: remove redundant libpcap link

Thomas Monjalon thomas at monjalon.net
Fri Apr 9 14:25:51 CEST 2021


From: Gabriel Ganne <gabriel.ganne at 6wind.com>

The pcap PMD and the librte_port both declare their dependency to libpcap
with a line "ext_deps += pcap_dep".
Then meson automatically adds this dependency to the pkg-config file
in the "Requires.private" section for static builds.

The additional update of dpdk_extra_ldflags was adding the dependency
in the "Libs.private" section of the pkg-config, that is unnecessary.

Fixes: efd5d1a8d8dd ("drivers/net: build some vdev PMDs with meson")
Fixes: 268fa581b1ff ("port: fix pcap support with meson")
Cc: stable at dpdk.org

Signed-off-by: Gabriel Ganne <gabriel.ganne at 6wind.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
I have a doubt whether this option is really always useless.
In the case of an old pcap (<1.9) without pkg-config support,
and with the minimum meson supported (0.47.1),
are we sure the generated pkg-config file will include -lpcap?
---
 config/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/config/meson.build b/config/meson.build
index 66a2edcc47..95777cf331 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -183,7 +183,6 @@ if not pcap_dep.found()
 endif
 if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
 	dpdk_conf.set('RTE_PORT_PCAP', 1)
-	dpdk_extra_ldflags += '-lpcap'
 endif
 
 # for clang 32-bit compiles we need libatomic for 64-bit atomic ops
-- 
2.31.1



More information about the dev mailing list