From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5BD19C388 for ; Thu, 28 Jan 2016 08:30:43 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 27 Jan 2016 23:30:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,357,1449561600"; d="scan'208";a="899897861" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 27 Jan 2016 23:30:42 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u0S7UdJL006521; Thu, 28 Jan 2016 15:30:39 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u0S7UZEn010611; Thu, 28 Jan 2016 15:30:37 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u0S7UZln010607; Thu, 28 Jan 2016 15:30:35 +0800 From: Michael Qiu To: dev@dpdk.org Date: Thu, 28 Jan 2016 15:30:34 +0800 Message-Id: <1453966234-10577-1-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1 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, 28 Jan 2016 07:30:43 -0000 In fedora 22 with GCC version 5.3.1, when compile, will result an error: include/rte_memcpy.h:309:7: error: "RTE_MACHINE_CPUFLAG_AVX2" is not defined [-Werror=undef] #elif RTE_MACHINE_CPUFLAG_AVX2 Fixes: 9484092baad3 ("eal/x86: optimize memcpy for AVX512 platforms") Signed-off-by: Michael Qiu --- app/test/test_memcpy_perf.c | 2 +- lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 73babec..f150d8d 100644 --- a/app/test/test_memcpy_perf.c +++ b/app/test/test_memcpy_perf.c @@ -81,7 +81,7 @@ static size_t buf_sizes[TEST_VALUE_RANGE]; /* Data is aligned on this many bytes (power of 2) */ #ifdef RTE_MACHINE_CPUFLAG_AVX512F #define ALIGNMENT_UNIT 64 -#elif RTE_MACHINE_CPUFLAG_AVX2 +#elif defined RTE_MACHINE_CPUFLAG_AVX2 #define ALIGNMENT_UNIT 32 #else /* RTE_MACHINE_CPUFLAG */ #define ALIGNMENT_UNIT 16 diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index d965957..8e2c53c 100644 --- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h +++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h @@ -306,7 +306,7 @@ COPY_BLOCK_128_BACK63: goto COPY_BLOCK_128_BACK63; } -#elif RTE_MACHINE_CPUFLAG_AVX2 +#elif defined RTE_MACHINE_CPUFLAG_AVX2 /** * AVX2 implementation below -- 1.9.3