build: add arch-specific header path to global includes
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 30 Apr 2020 16:01:20 +0000 (17:01 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 10 May 2020 21:45:02 +0000 (23:45 +0200)
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>
config/meson.build
lib/librte_eal/arm/include/meson.build
lib/librte_eal/ppc/include/meson.build
lib/librte_eal/x86/include/meson.build
meson.build

index e851b40..a1c38c0 100644 (file)
@@ -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))
 
index 1721743..73b750a 100644 (file)
@@ -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',
index 3ee38f6..ab4bd28 100644 (file)
@@ -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',
index d336d52..f0e998c 100644 (file)
@@ -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',
index 269ba96..750fdea 100644 (file)
@@ -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')