DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] buildtools: fix pmdinfogen compilation
@ 2019-07-31  6:27 pbhagavatula
  2019-07-31 11:35 ` Neil Horman
  2019-07-31 14:31 ` Bruce Richardson
  0 siblings, 2 replies; 6+ messages in thread
From: pbhagavatula @ 2019-07-31  6:27 UTC (permalink / raw)
  To: jerinj, Neil Horman; +Cc: dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Pmdinfogen is always compiled with host gcc.
If host gcc version is lessthan 7 and target gcc is greaterthan 7
pmdinfogen fails to compile due to unsupported cflags.
This patch removes unsupported host cflags when the above condition is
met.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 buildtools/pmdinfogen/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
index a97a7648f..86f883e05 100644
--- a/buildtools/pmdinfogen/Makefile
+++ b/buildtools/pmdinfogen/Makefile
@@ -9,6 +9,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
 #
 HOSTAPP = dpdk-pmdinfogen
 
+HOST_GCC_MAJOR = $(shell echo __GNUC__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+
+ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1)
+HOST_WERROR_FLAGS = $(filter-out -Wimplicit-fallthrough=2, $(WERROR_FLAGS))
+endif
+
 #
 # all sources are stored in SRCS-y
 #
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-02  3:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31  6:27 [dpdk-dev] [PATCH] buildtools: fix pmdinfogen compilation pbhagavatula
2019-07-31 11:35 ` Neil Horman
2019-07-31 14:21   ` Bruce Richardson
2019-07-31 14:30     ` Bruce Richardson
2019-07-31 14:31 ` Bruce Richardson
2019-08-02  3:35   ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula

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).