summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2017-09-15 18:36:11 +0100
committerBruce Richardson <bruce.richardson@intel.com>2018-01-30 21:51:45 +0100
commitd7939c5f877e017c8b3c3f3bfb85f7583cd3ac5b (patch)
tree300a28599c5add5f20803d8df43a455d11c05f0f
parent52164553cd4a397941cf94eb4a4d640544c6e7f1 (diff)
downloaddpdk-d7939c5f877e017c8b3c3f3bfb85f7583cd3ac5b.zip
dpdk-d7939c5f877e017c8b3c3f3bfb85f7583cd3ac5b.tar.gz
dpdk-d7939c5f877e017c8b3c3f3bfb85f7583cd3ac5b.tar.xz
build: add optional arch-specific headers install path
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>
-rw-r--r--config/meson.build2
-rw-r--r--lib/librte_eal/common/include/arch/x86/meson.build3
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt1
4 files changed, 7 insertions, 3 deletions
diff --git a/config/meson.build b/config/meson.build
index b0f8511..40c0919 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -70,4 +70,4 @@ dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id
# 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'))
diff --git a/lib/librte_eal/common/include/arch/x86/meson.build b/lib/librte_eal/common/include/arch/x86/meson.build
index 80b5980..5e9c026 100644
--- a/lib/librte_eal/common/include/arch/x86/meson.build
+++ b/lib/librte_eal/common/include/arch/x86/meson.build
@@ -45,4 +45,5 @@ install_headers(
'rte_rtm.h',
'rte_rwlock.h',
'rte_spinlock.h',
- 'rte_vect.h')
+ 'rte_vect.h',
+ subdir: get_option('include_subdir_arch'))
diff --git a/meson.build b/meson.build
index 5cb7705..c1cbdfe 100644
--- a/meson.build
+++ b/meson.build
@@ -72,7 +72,8 @@ subdir('app')
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
@@ -87,5 +88,6 @@ pkg.generate(name: meson.project_name(),
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)]
)
diff --git a/meson_options.txt b/meson_options.txt
index 636226c..fb945db 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false,
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')