devtools: pass custom options to checkpatch
[dpdk.git] / config / meson.build
index f8aded6..2bafea5 100644 (file)
@@ -42,6 +42,13 @@ endif
 driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
 eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 
+# driver .so files often depend upon the bus drivers for their connect bus,
+# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
+# to be in the library path, so symlink the drivers from the main lib directory.
+meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+               get_option('libdir'),
+               pmd_subdir_opt)
+
 # set the machine type and cflags for it
 if meson.is_cross_build()
        machine = host_machine.cpu()
@@ -125,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h')
        dpdk_extra_ldflags += '-lnuma'
 endif
 
-# check for strlcpy
-if is_linux
-       libbsd = dependency('libbsd', required: false)
-       if libbsd.found()
-               dpdk_conf.set('RTE_USE_LIBBSD', 1)
-       endif
+# check for libbsd
+libbsd = dependency('libbsd', required: false)
+if libbsd.found()
+       dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
 # add -include rte_config to cflags
@@ -138,6 +143,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c')
 
 # enable extra warnings and disable any unwanted warnings
 warning_flags = [
+       '-Wunused-parameter',
        '-Wsign-compare',
        '-Wcast-qual',
        '-Wno-address-of-packed-member'
@@ -182,3 +188,11 @@ install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
 
 # enable VFIO only if it is linux OS
 dpdk_conf.set('RTE_EAL_VFIO', is_linux)
+
+# specify -D_GNU_SOURCE unconditionally
+add_project_arguments('-D_GNU_SOURCE', language: 'c')
+
+# specify -D__BSD_VISIBLE for FreeBSD
+if is_freebsd
+       add_project_arguments('-D__BSD_VISIBLE', language: 'c')
+endif