From: Jerin Jacob Date: Mon, 27 Jun 2016 16:16:05 +0000 (+0530) Subject: net/thunderx: fix build flags with clang X-Git-Tag: spdx-start~6343 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6e1429737089f6eff2561ee3623f6a23ff67b7d1;p=dpdk.git net/thunderx: fix build flags with clang 'fno-prefetch-loop-arrays' optimization flag is not supported with clang, so use it only when compiling with gcc. Fixes: 1c421f18e095 ("net/thunderx: add single and multi-segment Tx") Signed-off-by: Jerin Jacob Reported-by: Ferruh Yigit --- diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile index 9079b5bc70..078237e3ce 100644 --- a/drivers/net/thunderx/Makefile +++ b/drivers/net/thunderx/Makefile @@ -56,7 +56,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_hw.c SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_mbox.c SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_ethdev.c -CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays -Ofast +ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) +CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays +endif +CFLAGS_nicvf_rxtx.o += -Ofast # this lib depends upon: DEPDIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += lib/librte_eal lib/librte_ether