[dpdk-dev] [PATCH 1/2] net/thunderx: select -fno-prefetch-loop-arrays only for gcc

Jerin Jacob jerin.jacob at caviumnetworks.com
Mon Jun 27 18:16:05 CEST 2016


'fno-prefetch-loop-arrays' optimization flag is not supported with clang

Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx functions")

Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
Reported-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/thunderx/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile
index 9079b5b..078237e 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
-- 
2.5.5



More information about the dev mailing list