From: Thomas Monjalon <thomas@monjalon.net>
To: bruce.richardson@intel.com, dmitry.kozliuk@gmail.com
Cc: dev@dpdk.org, david.marchand@redhat.com,
Jerin Jacob <jerinj@marvell.com>, Gavin Hu <gavin.hu@arm.com>,
Jan Viktorin <viktorin@rehivetech.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eal: fix compiler detection in public headers
Date: Mon, 16 Mar 2020 15:25:44 +0100 [thread overview]
Message-ID: <4502147.F8r316W7xa@xps> (raw)
In-Reply-To: <20200316120454.933575-1-thomas@monjalon.net>
16/03/2020 13:04, Thomas Monjalon:
> RTE_TOOLCHAIN_* macros are defining the target compiler.
> Some API may be used in a host application like pmdinfogen.
> That's why the the public headers should check the effective compiler
> in use instead of the target compiler.
>
> Detecting the compiler with macros is easy, except for __GNUC__
> which is defined in all compilers supporting some GNU compatibility.
>
> It is improved by defining RTE_CC_CLANG, RTE_CC_ICC and RTE_CC_GCC.
> The extra macro RTE_CC_IS_GNU is defined to 0 or 1 in GCC case,
> so it can be used simply with #if.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>
> This patch is probably useless.
> The first intent was fixing pmdinfogen compilation with clang
> while compiling the target with GCC, with MinGW support patch.
>
> This case is now better fixed with a patch removing EAL dependencies
> from the PCI library, which drops rte_common.h inclusion from pmdinfogen:
> http://patches.dpdk.org/patch/66701/
Actually rte_common.h is directly included by buildtools/pmdinfogen/pmdinfogen.c
so we need this patch in my opinion.
> As a consequence, I send this EAL patch just in case we need it
> in future. We can decide to apply or leave it.
This patch is now gating acceptance of MinGW support.
next prev parent reply other threads:[~2020-03-16 14:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 12:04 Thomas Monjalon
2020-03-16 14:25 ` Thomas Monjalon [this message]
2020-03-17 7:09 ` Dmitry Kozlyuk
2020-03-17 23:58 ` Thomas Monjalon
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=4502147.F8r316W7xa@xps \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=gavin.hu@arm.com \
--cc=jerinj@marvell.com \
--cc=viktorin@rehivetech.com \
/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).