[dpdk-dev] [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1

Wang, Zhihong zhihong.wang at intel.com
Thu Jan 28 09:01:17 CET 2016


> Subject: [PATCH] lib/librte_eal: Fix compile issue with gcc 5.3.1
> 
> 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 <michael.qiu at intel.com>
> ---
>  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(-)


There's issue in the original code.

#elif works with statements:
#elif < statement: true or false>

But what it meant is whether the identifier has been defined:
#elif defined <identifier>

Thanks for correcting this!

Acked-by: Wang, Zhihong <zhihong.wang at intel.com>


More information about the dev mailing list