[dpdk-dev,v3] crypto/openssl: add openssl path for cross compile
Checks
Commit Message
OPENSSL_PATH should be defined in case openssl
driver is cross compiled
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
changes in v3:
make OPENSSL_PATH usage conditional if it is not set as suggested by Pablo
doc/guides/cryptodevs/openssl.rst | 4 ++++
drivers/crypto/openssl/Makefile | 7 +++++++
mk/rte.app.mk | 4 ++++
3 files changed, 15 insertions(+)
Comments
> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Tuesday, September 5, 2017 10:03 AM
> To: dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: hemant.agrawal@nxp.com; Doherty, Declan
> <declan.doherty@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>
> Subject: [PATCH v3] crypto/openssl: add openssl path for cross compile
>
> OPENSSL_PATH should be defined in case openssl driver is cross compiled
>
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Wednesday, September 6, 2017 10:27 AM
> To: 'Akhil Goyal' <akhil.goyal@nxp.com>; dev@dpdk.org
> Cc: hemant.agrawal@nxp.com; Doherty, Declan
> <declan.doherty@intel.com>
> Subject: RE: [PATCH v3] crypto/openssl: add openssl path for cross compile
>
>
>
> > -----Original Message-----
> > From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> > Sent: Tuesday, September 5, 2017 10:03 AM
> > To: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Cc: hemant.agrawal@nxp.com; Doherty, Declan
> > <declan.doherty@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>
> > Subject: [PATCH v3] crypto/openssl: add openssl path for cross compile
> >
> > OPENSSL_PATH should be defined in case openssl driver is cross
> > compiled
> >
> > Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
05/09/2017 11:02, Akhil Goyal:
> OPENSSL_PATH should be defined in case openssl
> driver is cross compiled
No: in case OpenSSL cannot be found automatically,
you should use EXTRA_CFLAGS and EXTRA_LDFLAGS.
It is the same for other standard dependencies like
libnuma, libpcap, libzip, etc.
On 10/12/2017 6:36 PM, Thomas Monjalon wrote:
> 05/09/2017 11:02, Akhil Goyal:
>> OPENSSL_PATH should be defined in case openssl
>> driver is cross compiled
>
> No: in case OpenSSL cannot be found automatically,
> you should use EXTRA_CFLAGS and EXTRA_LDFLAGS.
>
> It is the same for other standard dependencies like
> libnuma, libpcap, libzip, etc.
>
Pablo/Thomas,
We are ok to drop this patch.
Regards,
Hemant
12/10/2017 15:31, Hemant Agrawal:
> On 10/12/2017 6:36 PM, Thomas Monjalon wrote:
> > 05/09/2017 11:02, Akhil Goyal:
> >> OPENSSL_PATH should be defined in case openssl
> >> driver is cross compiled
> >
> > No: in case OpenSSL cannot be found automatically,
> > you should use EXTRA_CFLAGS and EXTRA_LDFLAGS.
> >
> > It is the same for other standard dependencies like
> > libnuma, libpcap, libzip, etc.
> >
> Pablo/Thomas,
> We are ok to drop this patch.
OK, thanks a lot for confirming. Appreciated
@@ -88,6 +88,10 @@ sudo apt-get install libc6-dev-i386 (for i686-native-linuxapp-gcc target)
This code was also verified on Fedora 24.
This code was NOT yet verified on FreeBSD.
+In case openssl is cross compiled, openssl can be installed separately
+and path for openssl install directory can be given as
+export OPENSSL_PATH=<openssl install dir>
+
Initialization
--------------
@@ -35,6 +35,9 @@ LIB = librte_pmd_openssl.a
# build flags
CFLAGS += -O3
+ifneq ($(OPENSSL_PATH),)
+CFLAGS += -I${OPENSSL_PATH}/include/
+endif
CFLAGS += $(WERROR_FLAGS)
# library version
@@ -44,7 +47,11 @@ LIBABIVER := 1
EXPORT_MAP := rte_pmd_openssl_version.map
# external library dependencies
+ifneq ($(OPENSSL_PATH),)
+LDLIBS += -L${OPENSSL_PATH}/lib/ -lcrypto
+else
LDLIBS += -lcrypto
+endif
# library source files
SRCS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += rte_openssl_pmd.c
@@ -151,7 +151,11 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -lrte_pmd_aesni_mb
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -lrte_pmd_aesni_gcm
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+ifeq ($(OPENSSL_PATH),)
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += -lrte_pmd_openssl -lcrypto
+else
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += -L${OPENSSL_PATH}/lib -lrte_pmd_openssl -lcrypto
+endif # ($(OPENSSL_PATH),)
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lrte_pmd_qat -lcrypto
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -lrte_pmd_snow3g