From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 9AF2D6829 for ; Tue, 8 Jul 2014 01:36:42 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 07 Jul 2014 16:37:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,621,1400050800"; d="scan'208";a="454226189" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by azsmga001.ch.intel.com with ESMTP; 07 Jul 2014 16:37:01 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s67Nb04v029607; Tue, 8 Jul 2014 00:37:00 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s67Nb0WE006467; Tue, 8 Jul 2014 00:37:00 +0100 Received: (from bricha3@localhost) by sivswdev02.ir.intel.com with id s67Nb0UQ006463; Tue, 8 Jul 2014 00:37:00 +0100 From: Bruce Richardson To: dev@dpdk.org Date: Tue, 8 Jul 2014 00:36:55 +0100 Message-Id: <1404776219-6130-3-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1404776219-6130-1-git-send-email-bruce.richardson@intel.com> References: <1404776219-6130-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 2/6] Makefiles: add clang to compiler if/else block 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: Mon, 07 Jul 2014 23:36:44 -0000 The makefiles for a number of drivers conditionally disable certain warnings depending on the compiler and version used. Add in clang to the list of compiler options. Signed-off-by: Bruce Richardson --- lib/librte_pmd_i40e/Makefile | 9 +++++++++ lib/librte_pmd_ixgbe/Makefile | 7 +++++++ lib/librte_pmd_vmxnet3/Makefile | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile index 14bce71..4b31675 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -45,6 +45,15 @@ CFLAGS += $(WERROR_FLAGS) # ifeq ($(CC), icc) CFLAGS_BASE_DRIVER = -wd593 +else ifeq ($(CC), clang) +CFLAGS_BASE_DRIVER += -Wno-sign-compare +CFLAGS_BASE_DRIVER += -Wno-unused-value +CFLAGS_BASE_DRIVER += -Wno-unused-parameter +CFLAGS_BASE_DRIVER += -Wno-strict-aliasing +CFLAGS_BASE_DRIVER += -Wno-format +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 diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile index df47715..9278a17 100644 --- a/lib/librte_pmd_ixgbe/Makefile +++ b/lib/librte_pmd_ixgbe/Makefile @@ -44,6 +44,13 @@ ifeq ($(CC), icc) # CFLAGS for icc # CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259 +else ifeq ($(CC), clang) +# +# CFLAGS for clang +# +CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value +CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args + else # # CFLAGS for gcc diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile index a44abe1..14726f9 100644 --- a/lib/librte_pmd_vmxnet3/Makefile +++ b/lib/librte_pmd_vmxnet3/Makefile @@ -44,6 +44,13 @@ ifeq ($(CC), icc) # CFLAGS for icc # CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259 +else ifeq ($(CC), clang) +# +# CFLAGS for clang +# +CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value +CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args + else # # CFLAGS for gcc -- 1.9.3