From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasesh Mody Subject: [PATCH] net/qede: fix gcc compiler option checks Date: Thu, 27 Oct 2016 23:37:57 -0700 Message-ID: <1477636677-18041-1-git-send-email-rasesh.mody@qlogic.com> References: <4958892.sIoVxbTeGS@xps13> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org, Dept-EngDPDKDev@qlogic.com To: Return-path: Received: from mx0b-0016ce01.pphosted.com (mx0a-0016ce01.pphosted.com [67.231.148.157]) by dpdk.org (Postfix) with ESMTP id 647C5326D for ; Fri, 28 Oct 2016 08:38:21 +0200 (CEST) In-Reply-To: <4958892.sIoVxbTeGS@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Rasesh Mody 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 --- 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 -- 1.8.3.1