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 57494A10DA for ; Wed, 31 Jul 2019 13:35:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D1F01C116; Wed, 31 Jul 2019 13:35:46 +0200 (CEST) Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id A565D1C0B2; Wed, 31 Jul 2019 13:35:41 +0200 (CEST) Received: from cpe-2606-a000-111b-6140-0-0-0-162e.dyn6.twc.com ([2606:a000:111b:6140::162e] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1hsmtJ-0001kV-67; Wed, 31 Jul 2019 07:35:40 -0400 Date: Wed, 31 Jul 2019 07:35:03 -0400 From: Neil Horman To: pbhagavatula@marvell.com Cc: jerinj@marvell.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20190731113503.GB9823@hmswarspite.think-freely.org> References: <20190731062706.931-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190731062706.931-1-pbhagavatula@marvell.com> User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: Re: [dpdk-stable] [dpdk-dev][PATCH] buildtools: fix pmdinfogen compilation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, Jul 31, 2019 at 11:57:05AM +0530, pbhagavatula@marvell.com wrote: > From: Pavan Nikhilesh > > 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 > --- > 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