Skip to content

Commit

Permalink
build: add arch-specific header path to global includes
Browse files Browse the repository at this point in the history
The global include path, which is used by anything built before EAL,
points to the EAL header files so they utility macros etc. can be used
anywhere in DPDK. This path included the OS-specific EAL header files,
but not the architecture-specific ones. This patch moves the selection
of target architecture to the top-level meson.build file so that the
global include can reference that.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
  • Loading branch information
bruce-richardson authored and tmonjalo committed May 10, 2020
1 parent dec44d4 commit 44dfb29
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
7 changes: 0 additions & 7 deletions config/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,6 @@ dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)


compile_time_cpuflags = []
if host_machine.cpu_family().startswith('x86')
arch_subdir = 'x86'
elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
arch_subdir = 'arm'
elif host_machine.cpu_family().startswith('ppc')
arch_subdir = 'ppc'
endif
subdir(arch_subdir)
dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))

Expand Down
2 changes: 0 additions & 2 deletions lib/librte_eal/arm/include/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation.

includes += include_directories('.')

arch_headers = files(
'rte_atomic_32.h',
'rte_atomic_64.h',
Expand Down
2 changes: 0 additions & 2 deletions lib/librte_eal/ppc/include/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>

includes += include_directories('.')

arch_headers = files(
'rte_altivec.h',
'rte_atomic.h',
Expand Down
2 changes: 0 additions & 2 deletions lib/librte_eal/x86/include/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation

includes += include_directories('.')

arch_headers = files(
'rte_atomic_32.h',
'rte_atomic_64.h',
Expand Down
9 changes: 9 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ dpdk_libs_disabled = []
dpdk_drvs_disabled = []
abi_version_file = files('ABI_VERSION')

if host_machine.cpu_family().startswith('x86')
arch_subdir = 'x86'
elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
arch_subdir = 'arm'
elif host_machine.cpu_family().startswith('ppc')
arch_subdir = 'ppc'
endif

# configure the build, and make sure configs here and in config folder are
# able to be included in any file. We also store a global array of include dirs
# for passing to pmdinfogen scripts
global_inc = include_directories('.', 'config',
'lib/librte_eal/include',
'lib/librte_eal/@0@/include'.format(host_machine.system()),
'lib/librte_eal/@0@/include'.format(arch_subdir),
)
subdir('config')

Expand Down

0 comments on commit 44dfb29

Please sign in to comment.