vcpkg/ports/dpdk/0002-fix-dependencies.patch

43 lines
1.5 KiB
Diff

diff --git a/config/meson.build b/config/meson.build
index 34b85f10b5..5ed4625d9e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -238,12 +238,10 @@ if meson.is_cross_build() and not meson.get_external_property('numa', true)
find_libnuma = false
endif
if find_libnuma
- numa_dep = cc.find_library('numa', required: false)
- if numa_dep.found() and cc.has_header('numaif.h') and cc.links(min_c_code, dependencies: numa_dep)
+ numa_dep = dependency('numa', method: 'pkg-config', required: false)
+ if numa_dep.found()
dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
has_libnuma = true
- add_project_link_arguments('-lnuma', language: 'c')
- dpdk_extra_ldflags += '-lnuma'
endif
endif
diff --git a/lib/eal/linux/meson.build b/lib/eal/linux/meson.build
index e99ebed256..672c70547b 100644
--- a/lib/eal/linux/meson.build
+++ b/lib/eal/linux/meson.build
@@ -21,5 +21,6 @@ sources += files(
deps += ['kvargs', 'telemetry']
if has_libnuma
+ ext_deps += numa_dep
dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
endif
diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
index 51bcf17244..1099a0232f 100644
--- a/lib/vhost/meson.build
+++ b/lib/vhost/meson.build
@@ -6,6 +6,7 @@ if not is_linux
reason = 'only supported on Linux'
endif
if has_libnuma
+ ext_deps += numa_dep
dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
endif
dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY', cc.has_header('linux/userfaultfd.h'))