From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 283BBA0597; Tue, 21 Apr 2020 14:59:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A9F01D44F; Tue, 21 Apr 2020 14:59:28 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 46EE61D409 for ; Tue, 21 Apr 2020 14:59:26 +0200 (CEST) IronPort-SDR: yjfaiCSs3veDzRl1oXj4Cy6syr06NNgikNCgrCG84gHuGOw1Gx51+7C7phDy/OBEbzDuVl3gNj vXJGCBCJ9f4A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 05:59:25 -0700 IronPort-SDR: O/z18M4YFKGrQg9YNVRHhUhkleA7091XYlW4reOPy0E1w2lYjEYMQtahj0ETsjhHqhQgG31VlJ milYI1PU3BiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,410,1580803200"; d="scan'208";a="279629048" Received: from silpixa00399953.ir.intel.com (HELO silpixa00399953.ger.corp.intel.com) ([10.237.222.53]) by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2020 05:59:23 -0700 From: Ciara Power To: dev@dpdk.org, kevin.laatz@intel.com Cc: reshma.pattan@intel.com, jerinjacobk@gmail.com, david.marchand@redhat.com, keith.wiles@intel.com, mb@smartsharesystems.com, thomas@monjalon.net, Bruce Richardson Date: Tue, 21 Apr 2020 13:39:33 +0100 Message-Id: <20200421123949.38270-2-ciara.power@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200421123949.38270-1-ciara.power@intel.com> References: <20200319171907.60891-1-ciara.power@intel.com> <20200421123949.38270-1-ciara.power@intel.com> Subject: [dpdk-dev] [PATCH v3 01/17] build: add arch-specific header path to global includes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Bruce Richardson 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 --- 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(-) 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 -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') -- 2.17.1