From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: [PATCH v3] crypto/openssl: add openssl path for cross compile Date: Tue, 5 Sep 2017 14:32:51 +0530 Message-ID: <20170905090251.4229-1-akhil.goyal@nxp.com> References: <20170829070205.11497-1-akhil.goyal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , Akhil Goyal To: , Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0072.outbound.protection.outlook.com [104.47.33.72]) by dpdk.org (Postfix) with ESMTP id A1CEA330D for ; Tue, 5 Sep 2017 11:05:02 +0200 (CEST) In-Reply-To: <20170829070205.11497-1-akhil.goyal@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" OPENSSL_PATH should be defined in case openssl driver is cross compiled Signed-off-by: Akhil Goyal --- 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(+) diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst index f18a456..08cc9ba 100644 --- a/doc/guides/cryptodevs/openssl.rst +++ b/doc/guides/cryptodevs/openssl.rst @@ -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= + Initialization -------------- diff --git a/drivers/crypto/openssl/Makefile b/drivers/crypto/openssl/Makefile index e5fdfb5..a6f13e0 100644 --- a/drivers/crypto/openssl/Makefile +++ b/drivers/crypto/openssl/Makefile @@ -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 diff --git a/mk/rte.app.mk b/mk/rte.app.mk index c25fdd9..799aa99 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -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 -- 2.9.3