From 96d5c1656b85d76c774483f09b53d844a6c4e4ee Mon Sep 17 00:00:00 2001 From: Helin Zhang Date: Mon, 13 Oct 2014 15:18:19 +0800 Subject: [PATCH] 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 --- lib/librte_pmd_i40e/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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))) -- 2.20.1