DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: pbhagavatula@marvell.com
Cc: jerinj@marvell.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] buildtools: fix pmdinfogen compilation
Date: Wed, 31 Jul 2019 07:35:03 -0400	[thread overview]
Message-ID: <20190731113503.GB9823@hmswarspite.think-freely.org> (raw)
In-Reply-To: <20190731062706.931-1-pbhagavatula@marvell.com>

On Wed, Jul 31, 2019 at 11:57:05AM +0530, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Pmdinfogen is always compiled with host gcc.
> If host gcc version is lessthan 7 and target gcc is greaterthan 7
> pmdinfogen fails to compile due to unsupported cflags.
> This patch removes unsupported host cflags when the above condition is
> met.
> 
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  buildtools/pmdinfogen/Makefile | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
> index a97a7648f..86f883e05 100644
> --- a/buildtools/pmdinfogen/Makefile
> +++ b/buildtools/pmdinfogen/Makefile
> @@ -9,6 +9,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  #
>  HOSTAPP = dpdk-pmdinfogen
>  
> +HOST_GCC_MAJOR = $(shell echo __GNUC__ | $(HOSTCC) -E -x c - | tail -n 1)
> +HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
> +HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
> +
> +ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1)
> +HOST_WERROR_FLAGS = $(filter-out -Wimplicit-fallthrough=2, $(WERROR_FLAGS))
> +endif
> +

A few things:

1) HOST_GCC_MAJOR and HOST_GCC_MINOR seem to already be computed in
rte.toolchain-compat.mk and so I don't think you need to recompute them here

2) This seems limited in its function.  That is to say, ostensibly there are
simmilar incompatibilities with icc and clang that may need addressing for which
there are different environment variables (CLANG_MAJOR_VERSION, etc)

3) This may also need to be reflected into the meson build environment

4) I'm not sure how this is a problem at all.  In your description, you indicate
that:
	a) pmdinfogen is always compiled with host gcc
	b) this fails when the target gcc uses a compiler version older than the 
	   host gcc version, leading to corresponding flag incompatibilities
If (a) is true, why does (b) matter?  If we are using the host gcc, then the
host gcc flags should work.  If we're mixing and matching host gcc and target
gcc flags, that seems like a bug that should be fixed in the target rte.vars.mk

Neil


  reply	other threads:[~2019-07-31 11:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31  6:27 pbhagavatula
2019-07-31 11:35 ` Neil Horman [this message]
2019-07-31 14:21   ` Bruce Richardson
2019-07-31 14:30     ` Bruce Richardson
2019-07-31 14:31 ` Bruce Richardson
2019-08-02  3:35   ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula

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=20190731113503.GB9823@hmswarspite.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=stable@dpdk.org \
    /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).