]> git.droids-corp.org - dpdk.git/commitdiff
mk: fix shared library dependencies of drivers
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 21 Oct 2015 14:18:27 +0000 (17:18 +0300)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 6 Dec 2015 21:15:14 +0000 (22:15 +0100)
Similar to commit 113c8e13c4201eee207723571f83aaf285277d75, but
for bnx2x, pcap, sze2data and xenvirt PMDs.

Requiring applications to know about library internal details like
dependencies to external helper libraries is a limitation of
static linkage, shared libraries should always know their own
dependencies for sane operation. This is especially highlighted
with dlopen()'ed items, having applications link against about plugin
internal dependencies goes on the side of absurd.

Note that linking with a shared combined library still requires to
know the internal dependencies.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
drivers/net/bnx2x/Makefile
drivers/net/pcap/Makefile
drivers/net/szedata2/Makefile
drivers/net/xenvirt/Makefile
mk/rte.app.mk

index 87f31b6843de4374cda0cc97e2dc187041de953d..d895d8c2338bbbee7b579b062600639bf0e2aba3 100644 (file)
@@ -8,6 +8,7 @@ LIB = librte_pmd_bnx2x.a
 CFLAGS += -O3 -g
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -DZLIB_CONST
+LDLIBS += -lz
 
 EXPORT_MAP := rte_pmd_bnx2x_version.map
 
index 48be913cd0b8ef4655ea0f32ad6eaeadf6fbc6c3..b41d8a27db3d3bf7582390859814fe58f82983fa 100644 (file)
@@ -39,6 +39,7 @@ LIB = librte_pmd_pcap.a
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDLIBS += -lpcap
 
 EXPORT_MAP := rte_pmd_pcap_version.map
 
index c3c42e562a02f28a36113889ee008f29bcf2025c..963a8d673c9446c6efb798f92ba4e2f689bb3c74 100644 (file)
@@ -38,6 +38,7 @@ LIB = librte_pmd_szedata2.a
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDLIBS += -lsze2
 
 EXPORT_MAP := rte_pmd_szedata2_version.map
 
index 9c521d5c3e966483dda687d917da48d684242480..1d05b71b446921057552c21a03a2e52f4cb8fdaf 100644 (file)
@@ -38,6 +38,7 @@ LIB = librte_pmd_xenvirt.a
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDLIBS += -lxenstore
 
 EXPORT_MAP := rte_eth_xenvirt_version.map
 
index 3f568526da64482a192b6c2d1e59e0112ef70302..90ec33dd0eb6dd7e74488aafa20212280c3341d3 100644 (file)
@@ -90,10 +90,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lrte_vhost
 
 endif # ! CONFIG_RTE_BUILD_COMBINE_LIBS
 
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
-
-_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2)   += -lsze2
-
 ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)          += -lnuma
 endif
@@ -106,13 +102,13 @@ endif
 # The combined library fails also to store this information.
 # So linking with static or combined library requires explicit dependencies.
 ifneq ($(CONFIG_RTE_BUILD_COMBINE_LIBS)$(CONFIG_RTE_BUILD_SHARED_LIB),ny)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP)       += -lpcap
+_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD)      += -lz
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs
-endif # CONFIG_RTE_BUILD_COMBINE_LIBS or not CONFIG_RTE_BUILD_SHARED_LIBS
-
-_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD)      += -lz
-
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2)   += -lsze2
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT)    += -lxenstore
+endif # CONFIG_RTE_BUILD_COMBINE_LIBS or not CONFIG_RTE_BUILD_SHARED_LIBS
 
 _LDLIBS-y += --start-group