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@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Tested-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
CFLAGS += -Wno-cast-qual
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
+CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib
# versioning export map
EXPORT_MAP := rte_common_dpaax_version.map
#
# all source are stored in SRCS-y
#
-SRCS-y += dpaax_iova_table.c dpaa_of.c
+SRCS-y += dpaax_iova_table.c dpaa_of.c caamflib.c
LDLIBS += -lrte_eal
--- /dev/null
+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
+ *
+ * Copyright 2020 NXP
+ *
+ */
+
+#include <rta.h>
+
+/*
+ * SEC HW block revision.
+ *
+ * This *must not be confused with SEC version*:
+ * - SEC HW block revision format is "v"
+ * - SEC revision format is "x.y"
+ */
+enum rta_sec_era rta_sec_era;
reason = 'only supported on linux'
endif
-sources = files('dpaax_iova_table.c', 'dpaa_of.c')
+sources = files('dpaax_iova_table.c', 'dpaa_of.c', 'caamflib.c')
+
+includes += include_directories('caamflib')
cflags += ['-D_GNU_SOURCE']
if cc.has_argument('-Wno-cast-qual')
local: *;
};
+
+INTERNAL {
+ rta_sec_era;
+};
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
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
static uint8_t cryptodev_driver_id;
int caam_jr_logtype;
-enum rta_sec_era rta_sec_era;
-
/* Lists the states possible for the SEC user space driver. */
enum sec_driver_state_e {
SEC_DRIVER_STATE_IDLE, /* Driver not initialized */
'caam_jr_uio.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/')
includes += include_directories('../../common/dpaax/caamflib/')
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
CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
#define SEC_FLC_DHR_OUTBOUND -114
#define SEC_FLC_DHR_INBOUND 0
-enum rta_sec_era rta_sec_era = RTA_SEC_ERA_8;
-
static uint8_t cryptodev_driver_id;
int dpaa2_logtype_sec;
if (dpaa2_svr_family == SVR_LX2160A)
rta_set_sec_era(RTA_SEC_ERA_10);
+ else
+ rta_set_sec_era(RTA_SEC_ERA_8);
DPAA2_SEC_INFO("2-SEC ERA is %d", rta_get_sec_era());
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')
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
CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/base/qbman
#include <dpaa_sec_log.h>
#include <dpaax_iova_table.h>
-enum rta_sec_era rta_sec_era;
-
int dpaa_logtype_sec;
static uint8_t cryptodev_driver_id;
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')
includes += include_directories('../../common/dpaax/caamflib/')