On 5/13/2020 2:50 PM, akhil.go...@nxp.com wrote:
> From: Akhil Goyal <akhil.go...@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: sta...@dpdk.org
> 
> Signed-off-by: Akhil Goyal <akhil.go...@nxp.com>

+1, this is better approach, and tested with gcc10.

Reviewed-by: Ferruh Yigit <ferruh.yi...@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.

Reply via email to