Message ID | 1477636677-18041-1-git-send-email-rasesh.mody@qlogic.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Bruce Richardson |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id A2CC3326E; Fri, 28 Oct 2016 08:38:23 +0200 (CEST) Received: from mx0b-0016ce01.pphosted.com (mx0a-0016ce01.pphosted.com [67.231.148.157]) by dpdk.org (Postfix) with ESMTP id 647C5326D for <dev@dpdk.org>; Fri, 28 Oct 2016 08:38:21 +0200 (CEST) Received: from pps.filterd (m0095336.ppops.net [127.0.0.1]) by mx0a-0016ce01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id u9S6cHRa027039; Thu, 27 Oct 2016 23:38:17 -0700 Received: from avcashub1.qlogic.com ([198.186.0.116]) by mx0a-0016ce01.pphosted.com with ESMTP id 26aqpu0cxs-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 27 Oct 2016 23:38:17 -0700 Received: from avluser05.qlc.com (10.1.113.115) by qlc.com (10.1.4.191) with Microsoft SMTP Server id 14.3.235.1; Thu, 27 Oct 2016 23:38:16 -0700 Received: (from rmody@localhost) by avluser05.qlc.com (8.14.4/8.14.4/Submit) id u9S6cGL7018089; Thu, 27 Oct 2016 23:38:16 -0700 X-Authentication-Warning: avluser05.qlc.com: rmody set sender to rasesh.mody@qlogic.com using -f From: Rasesh Mody <rasesh.mody@qlogic.com> To: <thomas.monjalon@6wind.com> Date: Thu, 27 Oct 2016 23:37:57 -0700 Message-ID: <1477636677-18041-1-git-send-email-rasesh.mody@qlogic.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <4958892.sIoVxbTeGS@xps13> References: <4958892.sIoVxbTeGS@xps13> MIME-Version: 1.0 Content-Type: text/plain disclaimer: bypass X-Proofpoint-Virus-Version: vendor=nai engine=5800 definitions=8331 signatures=670692 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610280113 Cc: dev@dpdk.org, Dept-EngDPDKDev@qlogic.com Subject: [dpdk-dev] [PATCH] net/qede: fix gcc compiler option checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Rasesh Mody
Oct. 28, 2016, 6:37 a.m. UTC
From: Rasesh Mody <Rasesh.Mody@cavium.com> Using GCC_VERSION to check gcc version and decide whether to include that compiler option. Fixes: ec94dbc57362 ("qede: add base driver") Fixes: ecc7a5a27ffe ("net/qede/base: fix 32-bit build") Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com> --- drivers/net/qede/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Thu, 27 Oct 2016 23:37:57 -0700 Rasesh Mody <rasesh.mody@qlogic.com> wrote: > From: Rasesh Mody <Rasesh.Mody@cavium.com> > > Using GCC_VERSION to check gcc version and decide whether to include > that compiler option. > > Fixes: ec94dbc57362 ("qede: add base driver") > Fixes: ecc7a5a27ffe ("net/qede/base: fix 32-bit build") > > Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com> > --- > drivers/net/qede/Makefile | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile > index 39751e4..29b443d 100644 > --- a/drivers/net/qede/Makefile > +++ b/drivers/net/qede/Makefile > @@ -46,11 +46,11 @@ endif > endif > > ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > -ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0) > +ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) > CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable > endif > CFLAGS_BASE_DRIVER += -Wno-missing-declarations > -ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0) > +ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1) > CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized > endif > CFLAGS_BASE_DRIVER += -Wno-strict-prototypes Does this mean that less compiler checking is done or more? It seems lots of drivers make the excuse: "the base driver comes from another group and is known buggy but can't be fixed" That doesn't reflect well on the quality of the DPDK.
Hi Stephen, > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen > Hemminger > Sent: Friday, October 28, 2016 3:12 PM > > On Thu, 27 Oct 2016 23:37:57 -0700 > Rasesh Mody <rasesh.mody@qlogic.com> wrote: > > > From: Rasesh Mody <Rasesh.Mody@cavium.com> > > > > Using GCC_VERSION to check gcc version and decide whether to include > > that compiler option. > > > > Fixes: ec94dbc57362 ("qede: add base driver") > > Fixes: ecc7a5a27ffe ("net/qede/base: fix 32-bit build") > > > > Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com> > > --- > > drivers/net/qede/Makefile | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile > > index 39751e4..29b443d 100644 > > --- a/drivers/net/qede/Makefile > > +++ b/drivers/net/qede/Makefile > > @@ -46,11 +46,11 @@ endif > > endif > > > > ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > > -ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < > > /dev/null > /dev/null 2>&1; echo $$?),0) > > +ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) > > CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable endif > > CFLAGS_BASE_DRIVER += -Wno-missing-declarations -ifeq ($(shell gcc > > -Wno-maybe-uninitialized -Werror -E - < /dev/null > /dev/null 2>&1; > > echo $$?),0) > > +ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1) > > CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized endif > > CFLAGS_BASE_DRIVER += -Wno-strict-prototypes > > Does this mean that less compiler checking is done or more? With higher version of compilers more compiler checking is done, for older compilers less checking is done. As some of the older compiles do not have newly added checking capabilities. Testing with latest compilers ensures we do lot more checking. Thanks! -Rasesh > It seems lots of drivers make the excuse: > "the base driver comes from another group and is known buggy but can't be > fixed" > That doesn't reflect well on the quality of the DPDK.
2016-10-28 22:49, Mody, Rasesh: > > From: Stephen Hemminger > > > ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > > > -ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0) > > > +ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) > > > CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable > > > endif > > > CFLAGS_BASE_DRIVER += -Wno-missing-declarations > > > -ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0) > > > +ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1) > > > CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized > > > endif > > > > Does this mean that less compiler checking is done or more? > > With higher version of compilers more compiler checking is done, for older compilers less checking is done. As some of the older compiles do not have newly added checking capabilities. Testing with latest compilers ensures we do lot more checking. It is basically less checking. It disables some checks if the compiler support them because it would make compilation failing. Why would it fail? Because as other base drivers, the code is messy. > > It seems lots of drivers make the excuse: > > "the base driver comes from another group and is known buggy but can't be > > fixed" > > That doesn't reflect well on the quality of the DPDK. You're right Stephen. It is an excuse which has been accepted in DPDK. Should we be stricter?
2016-10-27 23:37, Rasesh Mody: > From: Rasesh Mody <Rasesh.Mody@cavium.com> > > Using GCC_VERSION to check gcc version and decide whether to include > that compiler option. > > Fixes: ec94dbc57362 ("qede: add base driver") No need for the above line. It is fixing the commit below (which fixes above one). > Fixes: ecc7a5a27ffe ("net/qede/base: fix 32-bit build") > > Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com> Applied, thanks
diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile index 39751e4..29b443d 100644 --- a/drivers/net/qede/Makefile +++ b/drivers/net/qede/Makefile @@ -46,11 +46,11 @@ endif endif ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0) +ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable endif CFLAGS_BASE_DRIVER += -Wno-missing-declarations -ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0) +ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1) CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized endif CFLAGS_BASE_DRIVER += -Wno-strict-prototypes