]> git.droids-corp.org - dpdk.git/commitdiff
mk: fix static build without crypto
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 11 Mar 2016 13:29:40 +0000 (14:29 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 11 Mar 2016 14:30:03 +0000 (15:30 +0100)
If the experimental CONFIG_RTE_LIBRTE_CRYPTODEV is disabled, build of
any crypto pmds will fail because of the missing dependency.  The commit
94288d645 fixes the issue when compiled with shared libraries but there
is still an issue at link time with static libs:

     LD test
     /usr/bin/ld: cannot find -lrte_pmd_null_crypto
     collect2: error: ld returned 1 exit status

Only add the -l linker flags related to crypto PMDs if CRYPTODEV is
enabled.

Fixes: 94288d645 ("mk: fix build without crypto")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
mk/rte.app.mk

index 165caa615b8333eb1e341bff2517d60ef8269d9a..30a91ad6714595d5436ac207871f988ca0ae9234 100644 (file)
@@ -148,8 +148,9 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING)       += -lrte_pmd_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lrte_pmd_pcap
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET)  += -lrte_pmd_af_packet
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL)       += -lrte_pmd_null
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 
+ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT)        += -lrte_pmd_qat
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB)   += -lrte_pmd_aesni_mb
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM)   += -lrte_pmd_aesni_gcm
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
@@ -164,6 +165,7 @@ endif
 # SNOW3G PMD is dependent on the LIBSSO library
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G)     += -lrte_pmd_snow3g
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G)     += -L$(LIBSSO_PATH)/build -lsso
+endif # CONFIG_RTE_LIBRTE_CRYPTODEV
 
 endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)