-----Original Message----- > Date: Fri, 26 Jan 2018 12:10:16 +0530 > From: Pavan Nikhilesh <pbhagavat...@caviumnetworks.com> > To: jerin.ja...@caviumnetworks.com, santosh.shu...@caviumnetworks.com, > ferruh.yi...@intel.com > Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavat...@caviumnetworks.com> > Subject: [dpdk-dev] [PATCH v2] net/octeontx: use stub for building in old > compilers > X-Mailer: git-send-email 2.14.1 > > Use stub for building clang < 4.0 as it doesn't support the following > arm machine directives: > > .cpu > > Signed-off-by: Pavan Nikhilesh <pbhagavat...@caviumnetworks.com> > --- > > v2 Changes: > - use stub for older clang compilers instead of disabling PMD > > drivers/net/octeontx/Makefile | 8 ++++++++ > drivers/net/octeontx/base/octeontx_io.h | 2 +- > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile > index b47bf7a40..5244eedd3 100644 > --- a/drivers/net/octeontx/Makefile > +++ b/drivers/net/octeontx/Makefile > @@ -30,6 +30,14 @@ SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_pkivf.c > SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_bgx.c > SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_ethdev.c > > +ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y) > + > +ifeq ($(shell test $(CLANG_MAJOR_VERSION)$(CLANG_MINOR_VERSION) -lt 40 && > echo 1), 1) > +CFLAGS += -D CLANG_BUILD_BUG > +endif > + > +endif > + > ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > CFLAGS_octeontx_rxtx.o += -fno-prefetch-loop-arrays > > diff --git a/drivers/net/octeontx/base/octeontx_io.h > b/drivers/net/octeontx/base/octeontx_io.h > index d51ded236..1c0a941a5 100644 > --- a/drivers/net/octeontx/base/octeontx_io.h > +++ b/drivers/net/octeontx/base/octeontx_io.h > @@ -51,7 +51,7 @@ do { > \ > } while (0) > #endif > > -#if defined(RTE_ARCH_ARM64) > +#if defined(RTE_ARCH_ARM64) && !defined(CLANG_BUILD_BUG)
It will build silently and break while running the PMD. I think, We should disable building the PMD if dependencies are not meet. Instead of building something that known to not work. > /** > * Perform an atomic fetch-and-add operation. > */ > -- > 2.16.0 >