net/thunderx: fix build flags with clang
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 27 Jun 2016 16:16:05 +0000 (21:46 +0530)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 29 Jun 2016 10:33:32 +0000 (12:33 +0200)
'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 <jerin.jacob@caviumnetworks.com>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/thunderx/Makefile

index 9079b5b..078237e 100644 (file)
@@ -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