From: Rasesh Mody Date: Fri, 28 Oct 2016 06:37:57 +0000 (-0700) Subject: net/qede: fix gcc option checks X-Git-Tag: spdx-start~5353 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=956cc5461b20b1a6e3d4703fde6a83bded591c49;p=dpdk.git net/qede: fix gcc option checks Using GCC_VERSION to check gcc version and decide whether to include that compiler option. Fixes: ecc7a5a27ffe ("net/qede/base: fix 32-bit build") Signed-off-by: Rasesh Mody --- diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile index 39751e417a..29b443df0c 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