mk: fix build with shared pcap pmd
Some applications doesn't have the pcap link flag when shared libraries are enabled. Indeed in such case, pcap PMD must not be linked but pcap library should. Actually -lpcap is always needed if pcap PMD is used, and -lrte_pmd_pcap must be set only with static PMD library. So the flags -lrte_pmd_pcap and -lpcap are enabled separately. Workarounds in test-pmd/ and test-pipeline/ can be removed. Reported-by: Stepan Sojka <stepan.sojka@adaptivemobile.com> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
parent
4c8b417151
commit
eced116610
@ -41,10 +41,6 @@ APP = testpipeline
|
||||
CFLAGS += -O3
|
||||
CFLAGS += $(WERROR_FLAGS)
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
|
||||
LDFLAGS += -lpcap
|
||||
endif
|
||||
|
||||
#
|
||||
# all source are stored in SRCS-y
|
||||
#
|
||||
|
@ -41,10 +41,6 @@ APP = testpmd
|
||||
CFLAGS += -O3
|
||||
CFLAGS += $(WERROR_FLAGS)
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
|
||||
LDFLAGS += -lpcap
|
||||
endif
|
||||
|
||||
#
|
||||
# all source are stored in SRCS-y
|
||||
#
|
||||
|
@ -119,6 +119,10 @@ LDLIBS += -lm
|
||||
LDLIBS += -lrt
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
|
||||
LDLIBS += -lpcap
|
||||
endif
|
||||
|
||||
LDLIBS += --start-group
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
|
||||
@ -207,7 +211,7 @@ LDLIBS += -lrte_pmd_ring
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y)
|
||||
LDLIBS += -lrte_pmd_pcap -lpcap
|
||||
LDLIBS += -lrte_pmd_pcap
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y)
|
||||
|
Loading…
x
Reference in New Issue
Block a user