[v2,01/16] build: add arch-specific header path to global includes

Message ID 20200408164956.47864-2-ciara.power@intel.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series update and simplify telemetry library. |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing warning Testing issues
ci/Intel-compilation fail Compilation issues

Commit Message

Power, Ciara April 8, 2020, 4:49 p.m. UTC
  From: Bruce Richardson <bruce.richardson@intel.com>

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>
---
 config/meson.build                     | 7 -------
 lib/librte_eal/arm/include/meson.build | 2 --
 lib/librte_eal/ppc/include/meson.build | 2 --
 lib/librte_eal/x86/include/meson.build | 2 --
 meson.build                            | 9 +++++++++
 5 files changed, 9 insertions(+), 13 deletions(-)
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 58421342b1..49482091d5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -229,13 +229,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))
 
diff --git a/lib/librte_eal/arm/include/meson.build b/lib/librte_eal/arm/include/meson.build
index 1721743240..73b750a18f 100644
--- a/lib/librte_eal/arm/include/meson.build
+++ b/lib/librte_eal/arm/include/meson.build
@@ -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',
diff --git a/lib/librte_eal/ppc/include/meson.build b/lib/librte_eal/ppc/include/meson.build
index 3a91c984c4..230c44aa95 100644
--- a/lib/librte_eal/ppc/include/meson.build
+++ b/lib/librte_eal/ppc/include/meson.build
@@ -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_atomic.h',
 	'rte_byteorder.h',
diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build
index d336d522c0..f0e998c2fe 100644
--- a/lib/librte_eal/x86/include/meson.build
+++ b/lib/librte_eal/x86/include/meson.build
@@ -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',
diff --git a/meson.build b/meson.build
index d36580438e..8ee79f78d5 100644
--- a/meson.build
+++ b/meson.build
@@ -24,12 +24,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')