A subset of the dpdk headers are arch-dependent, but have common names
and thus cause a clash in a multiarch installation.
For example, rte_config.h is different for each target.
Add a "include_subdir_arch" option to allow a user to specify a
subdirectory for arch independent headers to fix multiarch support.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
# values which have defaults which may be overridden
dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
# values which have defaults which may be overridden
dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
-install_headers('rte_config.h')
+install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
'rte_rtm.h',
'rte_rwlock.h',
'rte_spinlock.h',
'rte_rtm.h',
'rte_rwlock.h',
'rte_spinlock.h',
+ 'rte_vect.h',
+ subdir: get_option('include_subdir_arch'))
build_cfg = 'rte_build_config.h'
configure_file(output: build_cfg,
configuration: dpdk_conf,
build_cfg = 'rte_build_config.h'
configure_file(output: build_cfg,
configuration: dpdk_conf,
- install_dir: get_option('includedir'))
+ install_dir: join_paths(get_option('includedir'),
+ get_option('include_subdir_arch')))
# for static builds, include the drivers as libs, and also any
# other dependent libs that DPDK needs to link against
# for static builds, include the drivers as libs, and also any
# other dependent libs that DPDK needs to link against
version: meson.project_version(),
libraries: dpdk_libraries,
description: 'The Data Plane Development Kit (DPDK)',
version: meson.project_version(),
libraries: dpdk_libraries,
description: 'The Data Plane Development Kit (DPDK)',
+ subdirs: [get_option('include_subdir_arch'), '.'],
extra_cflags: ['-include', 'rte_config.h', '-march=@0@'.format(machine)]
)
extra_cflags: ['-include', 'rte_config.h', '-march=@0@'.format(machine)]
)
option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules')
option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules')
option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules')
option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules')
option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib')
+option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers')