From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id F1CB11D7; Fri, 9 Nov 2018 23:48:16 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id b203-v6so3270477wme.5; Fri, 09 Nov 2018 14:48:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9rR+Z8Rj0pEdjhVCyfelQsjNzoamoPU6jbQLNbMrsx8=; b=gbexjAOZ9cr8mboxZcdo83tMt/l22gCxcsGXb921nkk732IxC39D777567cHAyspQw asnF/CekENcBv9chZd0zi3/fveBpHxgjEov8gUGcznri5FkrEf+tSFt7A9f4bxCoqnLv S1+ovEpEqttFE2IJOc+b0VzSOd7l91fhs6hY+8PyIbLNFCiMUuLn2wE1tMtLUYyllH4b I4Xw9/4K0KJjLkJb5JNkriRuwk7JpCOCInKWOvuVrp3e9lXEjQ8CDrmIuISvdfQSVeYx Ttz4lrxhoq43ghWvjkvnt3P8D3GqxcyATGX6GC8+DndPjVyecX609KKf0FrKiwFcaFap nHYA== X-Gm-Message-State: AGRZ1gJhvTbucoXvrJQ6U/Q2aRG6h0LaIRA7jOPRMYAamxuiNGejS+to JgI4KVY5GOyfr+D2v6t+NTltbwDp X-Google-Smtp-Source: AJdET5fjkGIHBgW+o28O6B7IzBVXcTRCcX2NRINqoAEAlT+5m7XitfyYjK6/mQ1ZCPG1Z9ilPmFt1w== X-Received: by 2002:a1c:7c17:: with SMTP id x23-v6mr887394wmc.23.1541803695918; Fri, 09 Nov 2018 14:48:15 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id 74-v6sm3976227wmi.23.2018.11.09.14.48.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Nov 2018 14:48:15 -0800 (PST) From: Luca Boccassi To: dev@dpdk.org Cc: yskoh@mellanox.com, shahafs@mellanox.com, thomas@monjalon.net, Luca Boccassi , stable@dpdk.org Date: Fri, 9 Nov 2018 22:48:07 +0000 Message-Id: <20181109224807.5571-1-bluca@debian.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 22:48:17 -0000 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 Reported-by: Thomas Monjalon --- 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