drivers/crypto: fix gcc 10 fno-common errors
Subsystems (2)
PATCH 1/1 drivers/crypto: fix gcc 10 fno-common errors
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: [email protected]
---
Reverting to fcommon for crypto so it can build cleanly for rc2 as per:
http://inbox.dpdk.org/dev/[email protected]/
--- 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(+)
drivers/crypto/caam_jr/Makefile +7 -0
@@ -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
drivers/crypto/caam_jr/meson.build +5 -0
@@ -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/')
drivers/crypto/dpaa2_sec/Makefile +7 -0
@@ -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
drivers/crypto/dpaa2_sec/meson.build +5 -0
@@ -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')
drivers/crypto/dpaa_sec/Makefile +7 -0
@@ -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
drivers/crypto/dpaa_sec/meson.build +5 -0
@@ -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')
Signature · 1 line
2.21.3
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
Quoted 123 lines · Kevin Traynor
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 heredrivers/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 hereThis is a blunt fix for the issue by enabling fcommon for dpaa_sec/dpaa2_sec/caam_jr.
Bugzilla ID: 469
Cc: [email protected]Signed-off-by Kevin Traynor <[email protected]>---
Reverting to fcommon for crypto so it can build cleanly for rc2 as per:
http://inbox.dpdk.org/dev/[email protected]/--- 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(+)drivers/crypto/caam_jr/Makefile +7
-0@@ -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/dpaaxdrivers/crypto/caam_jr/meson.build +5
-0@@ -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/')drivers/crypto/dpaa2_sec/Makefile +7
-0@@ -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/caamflibdrivers/crypto/dpaa2_sec/meson.build +5
-0@@ -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')drivers/crypto/dpaa_sec/Makefile +7
-0@@ -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/includedrivers/crypto/dpaa_sec/meson.build +5
-0@@ -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')
Quoted 17 lines
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 heredrivers/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 hereThis is a blunt fix for the issue by enabling fcommon for dpaa_sec/dpaa2_sec/caam_jr.
Quoted 6 lines
Bugzilla ID: 469
Cc: [email protected]Signed-off-by Kevin Traynor <[email protected]>---
Applied to dpdk-next-crypto
Thanks.