* [dpdk-dev] [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable
@ 2018-11-09 22:48 Luca Boccassi
2018-11-11 12:41 ` Shahaf Shuler
0 siblings, 1 reply; 2+ messages in thread
From: Luca Boccassi @ 2018-11-09 22:48 UTC (permalink / raw)
To: dev; +Cc: yskoh, shahafs, thomas, Luca Boccassi, stable
Don't fail the build if pkg-config can't be found, instead print the
linker flag as it was doing before the change.
Fixes: b6b87939193a ("net/mlx5: use pkg-config to handle SUSE libmnl")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Reported-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/mlx5/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 7a50bccd2..895cdfeed 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -51,7 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE
CFLAGS += -D_XOPEN_SOURCE=600
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -Wno-strict-prototypes
-CFLAGS += $(shell pkg-config --cflags libmnl)
+CFLAGS += $(shell command -v pkg-config > /dev/null 2>&1 && pkg-config --cflags libmnl)
ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'
@@ -60,7 +60,7 @@ LDLIBS += -ldl
else
LDLIBS += -libverbs -lmlx5
endif
-LDLIBS += $(shell pkg-config --libs libmnl)
+LDLIBS += $(shell command -v pkg-config > /dev/null 2>&1 && pkg-config --libs libmnl || echo "-lmnl")
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
--
2.19.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable
2018-11-09 22:48 [dpdk-dev] [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable Luca Boccassi
@ 2018-11-11 12:41 ` Shahaf Shuler
0 siblings, 0 replies; 2+ messages in thread
From: Shahaf Shuler @ 2018-11-11 12:41 UTC (permalink / raw)
To: Luca Boccassi, dev; +Cc: Yongseok Koh, Thomas Monjalon, stable
Saturday, November 10, 2018 12:48 AM, Luca Boccassi:
> Subject: [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable
>
> Don't fail the build if pkg-config can't be found, instead print the linker flag as
> it was doing before the change.
>
> Fixes: b6b87939193a ("net/mlx5: use pkg-config to handle SUSE libmnl")
> Cc: stable@dpdk.org
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> Reported-by: Thomas Monjalon <thomas@monjalon.net>
Applied to next-net-mlx, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-11 12:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 22:48 [dpdk-dev] [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable Luca Boccassi
2018-11-11 12:41 ` Shahaf Shuler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).