patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors
@ 2020-05-08 16:27 Kevin Traynor
  2020-05-08 20:34 ` Kevin Traynor
  2020-05-11  8:26 ` Akhil Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Traynor @ 2020-05-08 16:27 UTC (permalink / raw)
  To: dev, hemant.agrawal, g.singh, akhil.goyal
  Cc: david.marchand, thomas, bruce.richardson, Kevin Traynor, stable

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


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

* Re: [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors
  2020-05-08 16:27 [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors Kevin Traynor
@ 2020-05-08 20:34 ` Kevin Traynor
  2020-05-11  8:26 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Traynor @ 2020-05-08 20:34 UTC (permalink / raw)
  To: dev, hemant.agrawal, g.singh, akhil.goyal
  Cc: david.marchand, thomas, bruce.richardson, stable

https://travis-ci.com/ovsrobot/dpdk/builds/164784623
looks to be travis run issue

passing on my travis
https://travis-ci.org/github/kevuzaj/dpdk-master/builds/684814829


On 08/05/2020 17:27, Kevin Traynor wrote:
> 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')
> 


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

* Re: [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors
  2020-05-08 16:27 [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors Kevin Traynor
  2020-05-08 20:34 ` Kevin Traynor
@ 2020-05-11  8:26 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2020-05-11  8:26 UTC (permalink / raw)
  To: Kevin Traynor, dev, Hemant Agrawal, Gagandeep Singh
  Cc: david.marchand, thomas, bruce.richardson, stable

> 
> 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>
> 
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.


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

end of thread, other threads:[~2020-05-11  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 16:27 [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 fno-common errors Kevin Traynor
2020-05-08 20:34 ` Kevin Traynor
2020-05-11  8:26 ` Akhil Goyal

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