From patchwork Thu Mar 29 13:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 36656 X-Patchwork-Delegate: shahafs@mellanox.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 799132BBD; Thu, 29 Mar 2018 15:36:43 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C89B82BB1 for ; Thu, 29 Mar 2018 15:36:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2018 06:36:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,376,1517904000"; d="scan'208";a="41783461" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga004.fm.intel.com with ESMTP; 29 Mar 2018 06:36:38 -0700 From: Bruce Richardson To: Adrien Mazarguil , Nelio Laranjeiro , Yongseok Koh Cc: dev@dpdk.org, Bruce Richardson Date: Thu, 29 Mar 2018 14:36:20 +0100 Message-Id: <20180329133620.92710-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [dpdk-dev] [PATCH] mlx: fix warnings for unused compiler arguments 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When linking the mlx glue code libraries using CC, the linker arguments in LDFLAGS are not prefixed with -Wl. [The EXTRA_LDFLAGS are though.] This leads to warning messages on build: clang-5.0: warning: argument unused during compilation: '-e xport-dynamic' Fix this by checking for $LINK_USING_CC in the Makefiles and prefixing the LDFLAGS appropriately if set. Fixes: 27cea11686ff ("net/mlx4: spawn rdma-core dependency plug-in") Fixes: 59b91bec12c6 ("net/mlx5: spawn rdma-core dependency plug-in") Signed-off-by: Bruce Richardson Acked-by: Yongseok Koh --- drivers/net/mlx4/Makefile | 7 ++++++- drivers/net/mlx5/Makefile | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index cc800493b..b6c05ed42 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -132,8 +132,13 @@ ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DLOPEN_DEPS),y) $(LIB): $(LIB_GLUE) +ifeq ($(LINK_USING_CC),1) +GLUE_LDFLAGS := $(call linkerprefix,$(LDFLAGS)) +else +GLUE_LDFLAGS := $(LDFLAGS) +endif $(LIB_GLUE): mlx4_glue.o - $Q $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) \ + $Q $(LD) $(GLUE_LDFLAGS) $(EXTRA_LDFLAGS) \ -Wl,-h,$(LIB_GLUE) \ -s -shared -o $@ $< -libverbs -lmlx4 diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 3bc9736c9..011335757 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -181,8 +181,13 @@ ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) $(LIB): $(LIB_GLUE) +ifeq ($(LINK_USING_CC),1) +GLUE_LDFLAGS := $(call linkerprefix,$(LDFLAGS)) +else +GLUE_LDFLAGS := $(LDFLAGS) +endif $(LIB_GLUE): mlx5_glue.o - $Q $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) \ + $Q $(LD) $(GLUE_LDFLAGS) $(EXTRA_LDFLAGS) \ -Wl,-h,$(LIB_GLUE) \ -s -shared -o $@ $< -libverbs -lmlx5