From: Helin Zhang Date: Mon, 13 Oct 2014 07:18:19 +0000 (+0800) Subject: i40e/base: fix build with gcc < 4.4 X-Git-Tag: spdx-start~10278 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=96d5c1656b85d76c774483f09b53d844a6c4e4ee;p=dpdk.git i40e/base: fix build with gcc < 4.4 It fixes the compile error as below on gcc version 4.3.4. cc1: error: unrecognized command line option "-Wno-unused-but-set-variable" Signed-off-by: Helin Zhang Tested-by: Zhaochen Zhan --- diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile index 4b31675ec7..bd3428ffe4 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -55,8 +55,7 @@ CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast CFLAGS_BASE_DRIVER += -Wno-format-nonliteral else -CFLAGS_BASE_DRIVER = -Wno-unused-but-set-variable -CFLAGS_BASE_DRIVER += -Wno-sign-compare +CFLAGS_BASE_DRIVER = -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value CFLAGS_BASE_DRIVER += -Wno-unused-parameter CFLAGS_BASE_DRIVER += -Wno-strict-aliasing @@ -65,6 +64,11 @@ CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast CFLAGS_BASE_DRIVER += -Wno-format-nonliteral CFLAGS_BASE_DRIVER += -Wno-format-security + +ifeq ($(shell test $(GCC_MAJOR_VERSION) -ge 4 -a $(GCC_MINOR_VERSION) -ge 4 && echo 1), 1) +CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable +endif + CFLAGS_i40e_lan_hmc.o += -Wno-error endif OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))