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 621BEA10DA for ; Wed, 31 Jul 2019 08:27:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7221D1BF3F; Wed, 31 Jul 2019 08:27:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id D861E1BF11; Wed, 31 Jul 2019 08:27:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6V6PmpU004565; Tue, 30 Jul 2019 23:27:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=KfceAC5qoxMZ7SIbupDaVX1ws+n6Gb4omUsSoVeYRJs=; b=arfZT6oqVTNgbo9PbxFOC83uxgMjb+JQIyKjEuh/FBWUoRg7M+mbfdHmlZjOWEqddH2L lNorBOKAt+GE4E9ohS/RUSMhJ53LjAfr5EKJddeT1VZDapMRUEIhafhoRkzzz9Uf0F9P xRSGwcTPr3mzUi3nRxRH3KYlCT41kQszr02ZxdPfez/Z2SLZEoUEEZmjo8XLjg3ARpeF pa3yCdWo1FVcK9vusYT7m/RO/l4tSL4KhrvYVle3pd/mvleu1xeNUrs1IEWNe1JNrTxE llkbhkKGm6Zv9Gc1fOwWryHTnKVURCeBvr7IhNrnYKhjpTeB2dJbA0jrAvC331CQbjaS zg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2u0p4m6k9c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 30 Jul 2019 23:27:12 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Jul 2019 23:27:11 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 30 Jul 2019 23:27:11 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.24]) by maili.marvell.com (Postfix) with ESMTP id EC8913F703F; Tue, 30 Jul 2019 23:27:07 -0700 (PDT) From: To: , Neil Horman CC: , Pavan Nikhilesh , Date: Wed, 31 Jul 2019 11:57:05 +0530 Message-ID: <20190731062706.931-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-31_02:2019-07-31,2019-07-31 signatures=0 Subject: [dpdk-dev] [PATCH] buildtools: fix pmdinfogen compilation 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: 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 + # # all sources are stored in SRCS-y # -- 2.17.1