From: Ferruh Yigit Date: Fri, 13 Oct 2017 18:24:21 +0000 (+0100) Subject: efd: fix build when compiler does not support AVX2 X-Git-Tag: spdx-start~1312 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=3ab2d9e8d8594a4b22da1b8393401ef3d80431c3 efd: fix build when compiler does not support AVX2 Compiler error: irte_efd.o: In function `rte_efd_lookup': rte_efd.c:(.text+0x6d6e): undefined reference to `efd_lookup_internal_avx2' rte_efd.o: In function `rte_efd_lookup_bulk': rte_efd.c:(.text+0x87d4): undefined reference to `efd_lookup_internal_avx2' This can be observed with a compiler that doesn't support AVX2 and shared build. Fixes: 86d898968826 ("efd: add AVX2 vector lookup function") Signed-off-by: Ferruh Yigit --- diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c index 4d9a088769..ba9f0d83c3 100644 --- a/lib/librte_efd/rte_efd.c +++ b/lib/librte_efd/rte_efd.c @@ -1278,7 +1278,7 @@ efd_lookup_internal(const struct efd_online_group_entry * const group, switch (lookup_fn) { -#if defined(RTE_ARCH_X86) +#if defined(RTE_ARCH_X86) && defined(CC_SUPPORT_AVX2) case EFD_LOOKUP_AVX2: return efd_lookup_internal_avx2(group->hash_idx, group->lookup_table,