From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: jerin.jacob@caviumnetworks.com,
santosh.shukla@caviumnetworks.com, ferruh.yigit@intel.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v2] net/octeontx: use stub for building in old compilers
Date: Fri, 26 Jan 2018 12:10:16 +0530 [thread overview]
Message-ID: <20180126064016.9966-1-pbhagavatula@caviumnetworks.com> (raw)
In-Reply-To: <20180123162240.26831-1-pbhagavatula@caviumnetworks.com>
Use stub for building clang < 4.0 as it doesn't support the following
arm machine directives:
.cpu
Signed-off-by: Pavan Nikhilesh <pbhagavatula@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)
/**
* Perform an atomic fetch-and-add operation.
*/
--
2.16.0
next prev parent reply other threads:[~2018-01-26 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 16:22 [dpdk-dev] [PATCH] net/octeontx: disable PMD for " Pavan Nikhilesh
2018-01-25 13:58 ` Ferruh Yigit
2018-01-26 5:25 ` Pavan Nikhilesh
2018-01-26 6:40 ` Pavan Nikhilesh [this message]
2018-01-26 7:20 ` [dpdk-dev] [PATCH v2] net/octeontx: use stub for building in " Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180126064016.9966-1-pbhagavatula@caviumnetworks.com \
--to=pbhagavatula@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=santosh.shukla@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).