From: Kevin Traynor <ktraynor@redhat.com>
To: stable@dpdk.org
Cc: bluca@debian.org, ferruh.yigit@intel.com,
Kevin Traynor <ktraynor@redhat.com>
Subject: [dpdk-stable] [PATCH 18.11 4/4] app/testpmd: disable gcc 10 -fno-common build errors
Date: Tue, 16 Jun 2020 14:51:37 +0100 [thread overview]
Message-ID: <20200616135137.8563-5-ktraynor@redhat.com> (raw)
In-Reply-To: <20200616135137.8563-1-ktraynor@redhat.com>
gcc 10 defaults to -fno-common and as a result when building
testpmd, there are errors.
These could be fixed with a rebased version of
commit f6e63e59e7e2 ("app/testpmd: fix global variable multiple definitions")
but there are conflicts with that patch.
When DPDK 18.11 was released -fcommon was the default on gcc, so disable
the warnings for testpmd.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
app/test-pmd/Makefile | 6 ++++++
app/test-pmd/meson.build | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index d5258eae4a..f36137fd44 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -16,4 +16,10 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS += -Wno-deprecated-declarations
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
#
# all source are stored in SRCS-y
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 6006c60f99..adeeeeedba 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -6,4 +6,9 @@ name = 'testpmd'
allow_experimental_apis = true
cflags += '-Wno-deprecated-declarations'
+
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+ cflags += '-fcommon'
+endif
+
sources = files('cmdline.c',
'cmdline_flow.c',
--
2.21.3
next prev parent reply other threads:[~2020-06-16 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 13:51 [dpdk-stable] [PATCH 18.11 0/4] 18.11.9 build fixes Kevin Traynor
2020-06-16 13:51 ` [dpdk-stable] [PATCH 18.11 1/4] kni: fix gcc 10 ethtool build error Kevin Traynor
2020-06-16 13:51 ` [dpdk-stable] [PATCH 18.11 2/4] kni: fix ethtool maybe-uninitialized warnings Kevin Traynor
2020-06-16 13:51 ` [dpdk-stable] [PATCH 18.11 3/4] crypto/octeontx: fix gcc 10 -fno-common build errors Kevin Traynor
2020-06-16 13:51 ` Kevin Traynor [this message]
2020-06-17 9:15 ` [dpdk-stable] [PATCH 18.11 0/4] 18.11.9 build fixes Luca Boccassi
2020-06-19 9:38 ` Kevin Traynor
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=20200616135137.8563-5-ktraynor@redhat.com \
--to=ktraynor@redhat.com \
--cc=bluca@debian.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
/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).