Stephen Hemminger | 5e48bba | 2018-10-25 14:40:24 -0700 | [diff] [blame] | 1 | From c030dc71ff4069c5b5e5b7889a2926617075f6e3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Stephen Hemminger <stephen@networkplumber.org> |
| 3 | Date: Thu, 25 Oct 2018 10:33:01 -0700 |
| 4 | Subject: [PATCH] mlx5: use pkg-config to handle SUSE libmnl |
| 5 | |
| 6 | SUSE decided to install the libmnl include file in a non-standard |
| 7 | place: /usr/include/libmnl/libmnl/libmnl.h |
| 8 | |
| 9 | This was probably a mistake by the SUSE package maintainer, |
| 10 | but hard to get fixed. Workaround the problem by pkg-config to find |
| 11 | the necessary include directive for libmnl. |
| 12 | |
| 13 | Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads") |
| 14 | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> |
| 15 | --- |
| 16 | drivers/net/mlx5/Makefile | 3 ++- |
| 17 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 18 | |
| 19 | diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile |
| 20 | index 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 |