blob: 454a85e83d162a40e1418c3d504eb4e5977e0f71 [file] [log] [blame]
Stephen Hemminger5e48bba2018-10-25 14:40:24 -07001From c030dc71ff4069c5b5e5b7889a2926617075f6e3 Mon Sep 17 00:00:00 2001
2From: Stephen Hemminger <stephen@networkplumber.org>
3Date: Thu, 25 Oct 2018 10:33:01 -0700
4Subject: [PATCH] mlx5: use pkg-config to handle SUSE libmnl
5
6SUSE decided to install the libmnl include file in a non-standard
7place: /usr/include/libmnl/libmnl/libmnl.h
8
9This was probably a mistake by the SUSE package maintainer,
10but hard to get fixed. Workaround the problem by pkg-config to find
11the necessary include directive for libmnl.
12
13Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")
14Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
15---
16 drivers/net/mlx5/Makefile | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
20index 1e9c0b42ac16..8497c98ef86e 100644
21--- a/drivers/net/mlx5/Makefile
22+++ b/drivers/net/mlx5/Makefile
23@@ -51,6 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE
24 CFLAGS += -D_XOPEN_SOURCE=600
25 CFLAGS += $(WERROR_FLAGS)
26 CFLAGS += -Wno-strict-prototypes
27+CFLAGS += $(shell pkg-config --cflags libmnl)
28 ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
29 CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
30 CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'
31@@ -57,7 +58,7 @@ LDLIBS += -ldl
32 else
33 LDLIBS += -libverbs -lmlx5
34 endif
35-LDLIBS += -lmnl
36+LDLIBS += $(shell pkg-config --libs libmnl)
37 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
38 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
39 LDLIBS += -lrte_bus_pci