From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Liu Subject: [PATCH 2/6] fix fm10k driver build error when gcc version elder than 4.4 Date: Thu, 19 Mar 2015 11:16:54 +0800 Message-ID: <1426735018-19411-5-git-send-email-yong.liu@intel.com> References: <1426735018-19411-1-git-send-email-yong.liu@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1426735018-19411-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" From: Marvin Liu Build fm10k driver in Suse11 SP3 will be failed for unrecognized flag. cc1: error: unrecognized command line option "-Wno-unused-but-set-variable" This flag is supported from gcc 4.4, so add gcc version check in fm10k. In the same time, make option check more clear in ixgbe driver. Signed-off-by: Marvin Liu diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile index 998bf23..7516d37 100644 --- a/lib/librte_pmd_fm10k/Makefile +++ b/lib/librte_pmd_fm10k/Makefile @@ -62,13 +62,15 @@ else # # CFLAGS for gcc # -ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) -CFLAGS += -Wno-deprecated -endif CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args -CFLAGS_BASE_DRIVER += -Wno-unused-variable -Wno-unused-but-set-variable +CFLAGS_BASE_DRIVER += -Wno-unused-variable CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers + +ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) +CFLAGS += -Wno-deprecated +CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable +endif endif # diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile index 9a5cd33..ae36202 100644 --- a/lib/librte_pmd_ixgbe/Makefile +++ b/lib/librte_pmd_ixgbe/Makefile @@ -62,13 +62,14 @@ else # ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) CFLAGS += -Wno-deprecated +CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable +CFLAGS_ixgbe_x550.o += -Wno-unused-but-set-variable endif CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1) -CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable -CFLAGS_ixgbe_x550.o += -Wno-unused-but-set-variable -Wno-maybe-uninitialized +CFLAGS_ixgbe_x550.o += -Wno-maybe-uninitialized endif ifeq ($(shell test $(GCC_VERSION) -ge 50 && echo 1), 1) -- 1.9.3