From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v2] net/octeontx: use stub for building in old compilers Date: Fri, 26 Jan 2018 12:50:32 +0530 Message-ID: <20180126072031.GA7454@jerin> References: <20180123162240.26831-1-pbhagavatula@caviumnetworks.com> <20180126064016.9966-1-pbhagavatula@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: santosh.shukla@caviumnetworks.com, ferruh.yigit@intel.com, dev@dpdk.org To: Pavan Nikhilesh Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0075.outbound.protection.outlook.com [104.47.40.75]) by dpdk.org (Postfix) with ESMTP id 79AE21B342 for ; Fri, 26 Jan 2018 08:20:55 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180126064016.9966-1-pbhagavatula@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Fri, 26 Jan 2018 12:10:16 +0530 > From: Pavan Nikhilesh > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > ferruh.yigit@intel.com > Cc: dev@dpdk.org, Pavan Nikhilesh > 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 > --- > > 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 >