From: Kevin Traynor <ktraynor@redhat.com>
To: dev@dpdk.org, hemant.agrawal@nxp.com, g.singh@nxp.com,
akhil.goyal@nxp.com
Cc: david.marchand@redhat.com, thomas@monjalon.net,
bruce.richardson@intel.com, Kevin Traynor <ktraynor@redhat.com>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors
Date: Fri, 8 May 2020 17:27:55 +0100 [thread overview]
Message-ID: <20200508162755.7114-1-ktraynor@redhat.com> (raw)
gcc 10 defaults to -fno-common and as a result when linking
with crypto drivers:
drivers/librte_pmd_dpaa_sec.a(crypto_dpaa_sec_dpaa_sec.c.o):
(.bss+0x4): multiple definition of `rta_sec_era';
drivers/librte_pmd_caam_jr.a(crypto_caam_jr_caam_jr.c.o):
(.bss+0x0): first defined here
drivers/librte_pmd_dpaa2_sec.a(crypto_dpaa2_sec_dpaa2_sec_dpseci.c.o):
(.data+0x0): multiple definition of `rta_sec_era';
drivers/librte_pmd_caam_jr.a(crypto_caam_jr_caam_jr.c.o):
(.bss+0x0): first defined here
This is a blunt fix for the issue by enabling fcommon for
dpaa_sec/dpaa2_sec/caam_jr.
Bugzilla ID: 469
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
Reverting to fcommon for crypto so it can build cleanly for rc2 as per:
http://inbox.dpdk.org/dev/4010985e-6c80-2e82-dad2-73970f89b79e@intel.com/
---
drivers/crypto/caam_jr/Makefile | 7 +++++++
drivers/crypto/caam_jr/meson.build | 5 +++++
drivers/crypto/dpaa2_sec/Makefile | 7 +++++++
drivers/crypto/dpaa2_sec/meson.build | 5 +++++
drivers/crypto/dpaa_sec/Makefile | 7 +++++++
drivers/crypto/dpaa_sec/meson.build | 5 +++++
6 files changed, 36 insertions(+)
diff --git a/drivers/crypto/caam_jr/Makefile b/drivers/crypto/caam_jr/Makefile
index 89d323817..10848884c 100644
--- a/drivers/crypto/caam_jr/Makefile
+++ b/drivers/crypto/caam_jr/Makefile
@@ -15,4 +15,11 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+# FIXME: temporary solution for Bugzilla 469
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
diff --git a/drivers/crypto/caam_jr/meson.build b/drivers/crypto/caam_jr/meson.build
index f8b5250a9..551b13632 100644
--- a/drivers/crypto/caam_jr/meson.build
+++ b/drivers/crypto/caam_jr/meson.build
@@ -13,4 +13,9 @@ sources = files('caam_jr_capabilities.c',
'caam_jr.c')
+# FIXME: temporary solution for Bugzilla 469
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+ cflags += '-fcommon'
+endif
+
includes += include_directories('../../bus/dpaa/include/')
includes += include_directories('../../common/dpaax/')
diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile
index a0a279557..8ce637db6 100644
--- a/drivers/crypto/dpaa2_sec/Makefile
+++ b/drivers/crypto/dpaa2_sec/Makefile
@@ -20,4 +20,11 @@ endif
endif
+# FIXME: temporary solution for Bugzilla 469
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib
diff --git a/drivers/crypto/dpaa2_sec/meson.build b/drivers/crypto/dpaa2_sec/meson.build
index cb1c2d049..505ad9414 100644
--- a/drivers/crypto/dpaa2_sec/meson.build
+++ b/drivers/crypto/dpaa2_sec/meson.build
@@ -11,3 +11,8 @@ sources = files('dpaa2_sec_dpseci.c',
'mc/dpseci.c')
+# FIXME: temporary solution for Bugzilla 469
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+ cflags += '-fcommon'
+endif
+
includes += include_directories('mc', '../../common/dpaax', '../../common/dpaax/caamflib')
diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile
index ea266962a..6cf392cb3 100644
--- a/drivers/crypto/dpaa_sec/Makefile
+++ b/drivers/crypto/dpaa_sec/Makefile
@@ -14,4 +14,11 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
+# FIXME: temporary solution for Bugzilla 469
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa
CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
index 7d422d8d5..f5e660457 100644
--- a/drivers/crypto/dpaa_sec/meson.build
+++ b/drivers/crypto/dpaa_sec/meson.build
@@ -10,4 +10,9 @@ deps += ['bus_dpaa', 'mempool_dpaa', 'security']
sources = files('dpaa_sec.c')
+# FIXME: temporary solution for Bugzilla 469
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+ cflags += '-fcommon'
+endif
+
includes += include_directories('../../bus/dpaa/include')
includes += include_directories('../../common/dpaax')
--
2.21.3
next reply other threads:[~2020-05-08 16:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 16:27 Kevin Traynor [this message]
2020-05-08 20:34 ` Kevin Traynor
2020-05-11 8:26 ` Akhil Goyal
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=20200508162755.7114-1-ktraynor@redhat.com \
--to=ktraynor@redhat.com \
--cc=akhil.goyal@nxp.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=g.singh@nxp.com \
--cc=hemant.agrawal@nxp.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).