From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35BFBA0350; Fri, 8 May 2020 18:28:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1433B1D6E3; Fri, 8 May 2020 18:28:24 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 0A23B1C434 for ; Fri, 8 May 2020 18:28:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588955302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MiIhob+erH/Zcp7zBCJPSptUehZYu22G3eXiX9pq36g=; b=YDfXBrTO0lFtQIqksgXI3yQeJdcPBGKmC8P5lVgBr5ROfV/nntxAi+oxvIe4pILB/Hylyo jzIR7f/ruyixoaQ+RDL/yVMaInmKkWN9snhNpnERKetg0kq0c7U72OBQi17M7zFBTPFEbe Gw88CTgVpRQbiYfYsJruYO4riXtqK0E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-80-R3vG2TV8NveNINePd0R8FA-1; Fri, 08 May 2020 12:28:18 -0400 X-MC-Unique: R3vG2TV8NveNINePd0R8FA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4BF9280183C; Fri, 8 May 2020 16:28:17 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94F835D9CA; Fri, 8 May 2020 16:28:12 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org, hemant.agrawal@nxp.com, g.singh@nxp.com, akhil.goyal@nxp.com Cc: david.marchand@redhat.com, thomas@monjalon.net, bruce.richardson@intel.com, Kevin Traynor , stable@dpdk.org Date: Fri, 8 May 2020 17:27:55 +0100 Message-Id: <20200508162755.7114-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] drivers/crypto: fix gcc 10 fno-common errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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