From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E66A99AA0 for ; Wed, 18 Mar 2015 08:10:57 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 18 Mar 2015 00:04:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,421,1422950400"; d="scan'208";a="542491015" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 18 Mar 2015 00:09:43 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t2I7AjCJ022902; Wed, 18 Mar 2015 15:10:45 +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 t2I7AgBa024820; Wed, 18 Mar 2015 15:10:44 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t2I7AgxW024816; Wed, 18 Mar 2015 15:10:42 +0800 From: Yong Liu To: dev@dpdk.org Date: Wed, 18 Mar 2015 15:10:41 +0800 Message-Id: <1426662641-24781-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] fix build warning and failure in Suse11 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: Wed, 18 Mar 2015 07:10:58 -0000 Suse11 SP3 default gcc version is 4.3.4, some options not support on this version. error: implicit declaration of function ‘_mm_alignr_epi8’ solution: include tmmintrin.h when enable SSE3 error: unrecognized command line option "-Wno-unused-but-set-variable" solution: add version check in fm10k Makefile error: enic_main.c:845: error: initialized field overwritten solution: change struct initialization code error: ‘testfn_pci_cmd’ defined but not used solution: add __attribute__((unused)) before function definition error: unrecognized command line option "-fno-var-tracking-assignments" solution: add version check in app/test/Makefile error: implicit declaration of function ‘pread’ solution: add _GNU_SOURCE flag when compile eal_pci_uio and eal_interrupts signed-off-by: Marvin Liu diff --git a/app/test/Makefile b/app/test/Makefile index 9f0262c..4aca77c 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -152,9 +152,11 @@ CFLAGS += -D_GNU_SOURCE # Disable VTA for memcpy test ifeq ($(CC), gcc) +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 +endif # this application needs libraries first DEPDIRS-y += lib diff --git a/app/test/test.h b/app/test/test.h index 5450986..13f6592 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -169,7 +169,7 @@ struct test_command { void add_test_command(struct test_command *t); #define REGISTER_TEST_COMMAND(t) \ -static void testfn_##t(void);\ +static void __attribute__((unused))testfn_##t(void);\ void __attribute__((constructor, used)) testfn_##t(void)\ {\ add_test_command(&t);\ diff --git a/lib/librte_eal/common/include/rte_common_vect.h b/lib/librte_eal/common/include/rte_common_vect.h index 54ec70f..df3dce4 100644 --- a/lib/librte_eal/common/include/rte_common_vect.h +++ b/lib/librte_eal/common/include/rte_common_vect.h @@ -50,6 +50,10 @@ #include #endif +#ifdef __SSE3__ +#include +#endif + #if defined(__SSE4_2__) || defined(__SSE4_1__) #include #endif diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index 23c2d48..21875b8 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -102,6 +102,8 @@ CFLAGS_eal_pci_vfio.o := -D_GNU_SOURCE CFLAGS_eal_common_whitelist.o := -D_GNU_SOURCE CFLAGS_eal_common_options.o := -D_GNU_SOURCE CFLAGS_eal_common_thread.o := -D_GNU_SOURCE +CFLAGS_eal_pci_uio.o := -D_GNU_SOURCE +CFLAGS_eal_interrupts.o := -D_GNU_SOURCE # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c index c66f139..0892b3e 100644 --- a/lib/librte_pmd_enic/enic_main.c +++ b/lib/librte_pmd_enic/enic_main.c @@ -840,10 +840,12 @@ static int enic_set_rsskey(struct enic *enic) dma_addr_t rss_key_buf_pa; union vnic_rss_key *rss_key_buf_va = NULL; static union vnic_rss_key rss_key = { - .key[0] = {.b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}}, - .key[1] = {.b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}}, - .key[2] = {.b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}}, - .key[3] = {.b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}}, + .key = { + [0] = {.b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}}, + [1] = {.b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}}, + [2] = {.b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}}, + [3] = {.b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}}, + } }; int err; u8 name[NAME_MAX]; diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile index 998bf23..52fc315 100644 --- a/lib/librte_pmd_fm10k/Makefile +++ b/lib/librte_pmd_fm10k/Makefile @@ -62,13 +62,18 @@ 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 +endif + +ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1) +CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable +endif endif # -- 1.9.3