From patchwork Sun Jun 26 15:32:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wiles, Keith" X-Patchwork-Id: 14392 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D176C694A; Sun, 26 Jun 2016 17:32:26 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 958586947 for ; Sun, 26 Jun 2016 17:32:23 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 26 Jun 2016 08:32:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.26,531,1459839600"; d="scan'208"; a="1005468189" Received: from acnizins-mobl.amr.corp.intel.com ([10.254.89.98]) by orsmga002.jf.intel.com with ESMTP; 26 Jun 2016 08:32:23 -0700 From: Keith Wiles To: dev@dpdk.org Date: Sun, 26 Jun 2016 10:32:17 -0500 Message-Id: <1466955137-91066-2-git-send-email-keith.wiles@intel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1466955137-91066-1-git-send-email-keith.wiles@intel.com> References: <1466955137-91066-1-git-send-email-keith.wiles@intel.com> Subject: [dpdk-dev] [PATCH 2/2] fix building with clang-3.8.0 compiler 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Latest clang compiler 3.8.0 on latest update of Ubuntu creates a few more warnings on -Warray-bounds and extra () around 'if' expressions. Signed-off-by: Keith Wiles --- app/test-pmd/Makefile | 3 +++ app/test/Makefile | 3 +++ drivers/net/bonding/Makefile | 4 ++++ drivers/net/fm10k/Makefile | 2 ++ drivers/net/i40e/Makefile | 2 ++ lib/librte_cmdline/Makefile | 6 ++++++ lib/librte_eal/linuxapp/eal/Makefile | 7 +++++++ 7 files changed, 27 insertions(+) diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 2a0b5a5..14ab77c 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -59,6 +59,9 @@ SRCS-y += icmpecho.c SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c CFLAGS_cmdline.o := -D_GNU_SOURCE +ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y) +CFLAGS_cmdline.o += -Wno-array-bounds +endif # this application needs libraries first DEPDIRS-y += lib drivers diff --git a/app/test/Makefile b/app/test/Makefile index 2de8c7a..5593426 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -211,6 +211,9 @@ ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) CFLAGS_test_memcpy.o += -fno-var-tracking-assignments CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments endif +else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y) +CFLAGS_test_errno.o += -Wno-array-bounds +CFLAGS_test_devargs.o += -Wno-array-bounds endif # this application needs libraries first diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile index 504f2e8..ee5f44a 100644 --- a/drivers/net/bonding/Makefile +++ b/drivers/net/bonding/Makefile @@ -43,6 +43,10 @@ EXPORT_MAP := rte_eth_bond_version.map LIBABIVER := 1 +ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y) +CFLAGS_rte_eth_bond_args.o := -Wno-array-bounds +endif + # # all source are stored in SRCS-y # diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile index afcbd1d..d6c692d 100644 --- a/drivers/net/fm10k/Makefile +++ b/drivers/net/fm10k/Makefile @@ -59,6 +59,8 @@ CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args CFLAGS_BASE_DRIVER += -Wno-unused-variable CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers +CFLAGS_fm10k_ethdev.o := -Wno-array-bounds + else # # CFLAGS for gcc diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile index 9ffef3f..3a9e5a1 100644 --- a/drivers/net/i40e/Makefile +++ b/drivers/net/i40e/Makefile @@ -60,6 +60,8 @@ 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-unused-variable + +CFLAGS_i40e_hmc.o += -Wno-tautological-compare else CFLAGS_BASE_DRIVER = -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile index 7d2d148..0af1d0a 100644 --- a/lib/librte_cmdline/Makefile +++ b/lib/librte_cmdline/Makefile @@ -40,6 +40,12 @@ EXPORT_MAP := rte_cmdline_version.map LIBABIVER := 2 +ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y) +CFLAGS_cmdline_cirbuf.o:= -Wno-parentheses-equality +CFLAGS_cmdline_rdline.o:= -Wno-parentheses-equality +CFLAGS_cmdline_parse_string.o:= -Wno-array-bounds +endif + # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index 30b30f3..2ff8d62 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -125,6 +125,13 @@ CFLAGS_eal_common_options.o := -D_GNU_SOURCE CFLAGS_eal_common_thread.o := -D_GNU_SOURCE CFLAGS_eal_common_lcore.o := -D_GNU_SOURCE +ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y) +CFLAGS_eal_alarm.o += -Wno-parentheses-equality +CFLAGS_eal_common_options.o += -Wno-array-bounds +CFLAGS_eal_pci.o += -Wno-parentheses-equality +CFLAGS_eal_pci.o += -Wno-array-bounds +endif + # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)