pdump: replace constant for device name size
[dpdk.git] / config / meson.build
index a3154e2..f3d61b1 100644 (file)
@@ -142,12 +142,19 @@ endif
 
 # check for libraries used in multiple places in DPDK
 has_libnuma = 0
-numa_dep = cc.find_library('numa', required: false)
-if numa_dep.found() and cc.has_header('numaif.h')
-       dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
-       has_libnuma = 1
-       add_project_link_arguments('-lnuma', language: 'c')
-       dpdk_extra_ldflags += '-lnuma'
+find_libnuma = true
+if meson.is_cross_build() and not meson.get_cross_property('numa', true)
+       # don't look for libnuma if explicitly disabled in cross build
+       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')
+               dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
+               has_libnuma = 1
+               add_project_link_arguments('-lnuma', language: 'c')
+               dpdk_extra_ldflags += '-lnuma'
+       endif
 endif
 
 has_libfdt = 0
@@ -253,6 +260,21 @@ compile_time_cpuflags = []
 subdir(arch_subdir)
 dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
 
+# apply cross-specific options
+if meson.is_cross_build()
+       # configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
+       cross_max_lcores = meson.get_cross_property('max_lcores', 0)
+       if cross_max_lcores != 0
+               message('Setting RTE_MAX_LCORE from cross file')
+               dpdk_conf.set('RTE_MAX_LCORE', cross_max_lcores)
+       endif
+       cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
+       if cross_max_numa_nodes != 0
+               message('Setting RTE_MAX_NUMA_NODES from cross file')
+               dpdk_conf.set('RTE_MAX_NUMA_NODES', cross_max_numa_nodes)
+       endif
+endif
+
 # set the install path for the drivers
 dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)