[v4] meson: remove unnecessary explicit link to libpcap

Message ID 20210409083927.8345-1-gabriel.ganne@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v4] meson: remove unnecessary explicit link to libpcap |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Gabriel Ganne April 9, 2021, 8:39 a.m. UTC
  libpcap is already found and registered as a dependency by meson, and
the dependency is already correctly used in librte_port. This line is
just unnecessary.

The pcap PMD and the librte_port both declare their dependency to
libpcap with a line "ext_deps += pcap_dep".
"pcap_dep" is declared using the dependency() directive in
config/meson.build meson automatically adds this dependency to the
pkg-config file in the private section for static builds.

Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
---
 config/meson.build | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Stephen Hemminger July 16, 2023, 5:21 p.m. UTC | #1
On Fri,  9 Apr 2021 10:39:27 +0200
Gabriel Ganne <gabriel.ganne@6wind.com> wrote:

> libpcap is already found and registered as a dependency by meson, and
> the dependency is already correctly used in librte_port. This line is
> just unnecessary.
> 
> The pcap PMD and the librte_port both declare their dependency to
> libpcap with a line "ext_deps += pcap_dep".
> "pcap_dep" is declared using the dependency() directive in
> config/meson.build meson automatically adds this dependency to the
> pkg-config file in the private section for static builds.
> 
> Signed-off-by: Gabriel Ganne <gabriel.ganne@6wind.com>
> ---
>  config/meson.build | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/config/meson.build b/config/meson.build
> index 66a2edcc47f5..95777cf33169 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
>  

Patch needs to be rebased and retested, now that Windows has pcap support.
Need to make sure that Windows is not depending on this.
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 66a2edcc47f5..95777cf33169 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