From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E054E9AAA for ; Thu, 19 Mar 2015 04:17:15 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 18 Mar 2015 20:17:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,427,1422950400"; d="scan'208";a="542999067" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 18 Mar 2015 20:17:13 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t2J3HB60024362; Thu, 19 Mar 2015 11:17:11 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t2J3H89k019475; Thu, 19 Mar 2015 11:17:10 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t2J3H8nG019471; Thu, 19 Mar 2015 11:17:08 +0800 From: Yong Liu To: dev@dpdk.org Date: Thu, 19 Mar 2015 11:16:54 +0800 Message-Id: <1426735018-19411-5-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1426735018-19411-1-git-send-email-yong.liu@intel.com> References: <1426735018-19411-1-git-send-email-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH 2/6] fix fm10k driver build error when gcc version elder than 4.4 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 03:17:16 -0000 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