[dpdk-dev] [dpdk-stable] [PATCH] drivers/crypto: fix gcc 10 no-common errors
Ferruh Yigit
ferruh.yigit at intel.com
Wed May 13 20:43:10 CEST 2020
On 5/13/2020 2:50 PM, akhil.goyal at nxp.com wrote:
> From: Akhil Goyal <akhil.goyal at nxp.com>
>
> 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 patch fixes the blunt workaround in the following commit.
>
> Fixes: 50b03f3b8eaf ("drivers/crypto: disable gcc 10 no-common errors")
>
> Bugzilla ID: 469
> Cc: stable at dpdk.org
>
> Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>
+1, this is better approach, and tested with gcc10.
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
Instead of having 3 seperate global variables for three seperate PMDs, now there
is a single global variable.
In static build these three variables were already used as single variable, that
is why we are getting fcommon warning, so I assume there is no use case to use
multiple of these PMDs at the same time, but previously this was fine (each PMD
has its own variable) when built as shared library, now shared library is also
using single variable.
It can be good to verify with PMD maintainers that this is OK, and these PMDs
won't be used at the same time in a platform.
More information about the dev
mailing list