]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx: fix warnings for unused compiler arguments
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 29 Mar 2018 13:36:20 +0000 (14:36 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Apr 2018 22:40:21 +0000 (00:40 +0200)
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")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx4/Makefile
drivers/net/mlx5/Makefile

index 8a6287f18909adc7011c34b930c5fd4383ef3f17..ac5b67f10d34e6ba1e6a6a9efb90f2a90b005ae4 100644 (file)
@@ -106,8 +106,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
 
index 6c506a49cacb4d6cad83433ee835397f415a1a43..86d3afe0d6d3a199da5613f566d35ea62a7798f3 100644 (file)
@@ -157,8 +157,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