From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: thomas@monjalon.net, jerin.jacob@caviumnetworks.com,
bruce.richardson@intel.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v3] build: meson set toolchain info during config init
Date: Tue, 3 Apr 2018 16:54:52 +0530 [thread overview]
Message-ID: <20180403112452.12567-1-pbhagavatula@caviumnetworks.com> (raw)
In-Reply-To: <20180402182823.30688-1-pbhagavatula@caviumnetworks.com>
Meson identify toolchain using cc.get_id and set RTE_TOOLCHAIN,
RTE_TOOLCHAIN_X during initializing dpdk_conf so that it can be used by
both x86 and arm.
Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
v3 Changes:
- Use a generic way of setting toolchain instead of chaining conditions.(Bruce)
v2 Changes:
- Use get_id for identifying compiler instead of checking for compiler defines
manually.(Bruce)
config/arm/meson.build | 9 ---------
config/meson.build | 4 ++++
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index c1ab6ed01..e9c9eb1a5 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -83,15 +83,6 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic]
impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
impl_dpaa2 = ['NXP DPAA2', flags_dpaa2, machine_args_generic]
-
-if cc.get_define('__clang__') != ''
- dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'clang')
- dpdk_conf.set('RTE_TOOLCHAIN_CLANG', 1)
-else
- dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'gcc')
- dpdk_conf.set('RTE_TOOLCHAIN_GCC', 1)
-endif
-
dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
if cc.sizeof('void *') != 8
diff --git a/config/meson.build b/config/meson.build
index f8c67578d..d4df36cd0 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -11,6 +11,10 @@ dpdk_conf.set('RTE_MACHINE', machine)
machine_args = []
machine_args += '-march=' + machine
+toolchain = cc.get_id()
+dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
+dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+
# use pthreads
add_project_link_arguments('-pthread', language: 'c')
dpdk_extra_ldflags += '-pthread'
--
2.16.3
next prev parent reply other threads:[~2018-04-03 11:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 18:28 [dpdk-dev] [PATCH] " Pavan Nikhilesh
2018-04-03 9:55 ` Bruce Richardson
2018-04-03 10:07 ` Pavan Nikhilesh
2018-04-03 10:21 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh
2018-04-03 10:55 ` Bruce Richardson
2018-04-03 11:11 ` Pavan Nikhilesh
2018-04-03 11:24 ` Pavan Nikhilesh [this message]
2018-04-03 11:58 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
2018-04-03 13:05 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180403112452.12567-1-pbhagavatula@caviumnetworks.com \
--to=pbhagavatula@caviumnetworks.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).