From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6DEEE5A90 for ; Mon, 27 Jun 2016 10:48:42 +0200 (CEST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5763C03BD5C; Mon, 27 Jun 2016 08:48:41 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-5-13.ams2.redhat.com [10.36.5.13]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5R8menW025868; Mon, 27 Jun 2016 04:48:41 -0400 To: Thomas Monjalon References: <1466959325-9426-1-git-send-email-thomas.monjalon@6wind.com> <1466959325-9426-6-git-send-email-thomas.monjalon@6wind.com> Cc: dev@dpdk.org From: Panu Matilainen Message-ID: Date: Mon, 27 Jun 2016 11:48:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1466959325-9426-6-git-send-email-thomas.monjalon@6wind.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Jun 2016 08:48:41 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2016 08:48:42 -0000 On 06/26/2016 07:42 PM, Thomas Monjalon wrote: > When linking drivers as shared libraries, the dependencies need > to be marked as DT_NEEDED entries. > > The crypto dependencies (libsso and libIPSec) are static libraries. > To make them linked in the shared PMDs, the code must relocatable: > - libIPSec_MB.a must be built with -fPIC > - libsso_kasumi.a must be built with KASUMI_CFLAGS=-DKASUMI_C > > Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto") > Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations") > Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library") > Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library") > > Signed-off-by: Thomas Monjalon > --- > drivers/crypto/aesni_gcm/Makefile | 3 ++- > drivers/crypto/aesni_mb/Makefile | 3 ++- > drivers/crypto/kasumi/Makefile | 3 ++- > drivers/crypto/snow3g/Makefile | 3 ++- > 4 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile > index ab5d2ed..5898cae 100644 > --- a/drivers/crypto/aesni_gcm/Makefile > +++ b/drivers/crypto/aesni_gcm/Makefile > @@ -49,9 +49,10 @@ LIBABIVER := 1 > # versioning export map > EXPORT_MAP := rte_pmd_aesni_gcm_version.map > > -# external library include paths > +# external library dependencies > CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH) > CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include > +LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB > LDLIBS += -lcrypto > > # library source files > diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile > index 348a8bd..d3994cc 100644 > --- a/drivers/crypto/aesni_mb/Makefile > +++ b/drivers/crypto/aesni_mb/Makefile > @@ -49,9 +49,10 @@ LIBABIVER := 1 > # versioning export map > EXPORT_MAP := rte_pmd_aesni_version.map > > -# external library include paths > +# external library dependencies > CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH) > CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include > +LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB > > # library source files > SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c > diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile > index 72b1ca4..9fb0be8 100644 > --- a/drivers/crypto/kasumi/Makefile > +++ b/drivers/crypto/kasumi/Makefile > @@ -49,10 +49,11 @@ LIBABIVER := 1 > # versioning export map > EXPORT_MAP := rte_pmd_kasumi_version.map > > -# external library include paths > +# external library dependencies > CFLAGS += -I$(LIBSSO_KASUMI_PATH) > CFLAGS += -I$(LIBSSO_KASUMI_PATH)/include > CFLAGS += -I$(LIBSSO_KASUMI_PATH)/build > +LDLIBS += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi > > # library source files > SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd.c > diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile > index 582907f..bea6760 100644 > --- a/drivers/crypto/snow3g/Makefile > +++ b/drivers/crypto/snow3g/Makefile > @@ -49,10 +49,11 @@ LIBABIVER := 1 > # versioning export map > EXPORT_MAP := rte_pmd_snow3g_version.map > > -# external library include paths > +# external library dependencies > CFLAGS += -I$(LIBSSO_SNOW3G_PATH) > CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/include > CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/build > +LDLIBS += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g > > # library source files > SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd.c > LDLIBS should only contain the actual libraries, everything else including -L should go to LDFLAGS. The rule is not honored in dpdk at all currently and nothing depends on that, so it doesn't really matter. Just thought to mention it since this adds several new instances of mixed usage. - Panu -