From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EDD63A0093 for ; Tue, 19 May 2020 15:14:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E59BD1D702; Tue, 19 May 2020 15:14:24 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id D08811D702 for ; Tue, 19 May 2020 15:14:23 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id l17so15875622wrr.4 for ; Tue, 19 May 2020 06:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5GheKU6TOXy9EXyPvyNL0Obz6ivPrlb9+A0oAOLbh58=; b=iRqaYxRF9JEpVjnTf2JLTvkerx7NirLSlAifVagUeqAbJJBYIRw4rizXJ1LawIXqUV yy7Wn1D0cFdoKDI6fJ7nbmKaa8QfVftbVkbEuaRTWhox+UPI+p7lBwPxrn2zHxZXvpXp b28IDAaubybA7QN4bSbHbRo332VPBD/ju/B/xdCaGGXAkrp1j5VR/J2376NT4hDbqT7z FUS1wy3GR9+RyIeVAoNWV/oXFi7Yzjstuhv0awqwxUeGFyb0UabKUCXo2N9gSWgRCfv8 2jdjNxtToBa1mFgbu16c8eupaFVHwB+hUz6bbOwnrNJnAvxI9MJuLOW9TRTsLpy5AXjV cpow== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=5GheKU6TOXy9EXyPvyNL0Obz6ivPrlb9+A0oAOLbh58=; b=hOdvYsS8ZBnOJ/4n6lgHjV+F2cZp3SJUXa9ADSide/iXb6iybSClCtQf/obDBHhMHA YO8vktqZZeWljAZ4QLve/KNKGy9dL3hTR+TZFJ+wqxMhY6zi38dFtos0NTvuEOevfIey u3E175gLk3hnsw/20kIPqn6Yy1DJDmEXlYhw94sOkYjAWqBOtL5ks+IzLrYES+PiXm8d /NEI1134YPCudMI8q1lDXZ4vqyjC/G0bdUFJh56OCL6EVBCPWkdtLIBcvXgvgHzAUQ/v 6c5rfYHlqD0jl9hEgiYIoI/J6zahSwdh5XIliGvR8GmdvYWEi90UnwGrOB0nH/qSHxhj Ixwg== X-Gm-Message-State: AOAM531nGZHz22nCIndip9bZjlzpeeBIrHG2NGDwiIrGSDTbbXGd6Ji9 ljQGS+k4Qw26LqNH9RR11ek= X-Google-Smtp-Source: ABdhPJw0a8uVF3GeXYPoJRdCQSuIu+StjWT44HEaLTJ0bjVkx2kZMaQ7W1r4FdjWmuWb/DpSeHYu7g== X-Received: by 2002:adf:face:: with SMTP id a14mr25478710wrs.397.1589894063583; Tue, 19 May 2020 06:14:23 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v11sm20975513wrv.53.2020.05.19.06.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:14:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Bing Zhao Cc: Thomas Monjalon , dpdk stable Date: Tue, 19 May 2020 14:04:56 +0100 Message-Id: <20200519130549.112823-161-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'mk: fix static linkage of mlx dependency' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From c4c95316484c1f2ece020eb64444647954a64832 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Wed, 29 Apr 2020 20:11:55 +0800 Subject: [PATCH] mk: fix static linkage of mlx dependency [ upstream commit c093e28f494d92f71fd3ce16a8daacb0cf1715ae ] When building a target application with static linking mode via makefiles and enable linking to ibverbs libs by setting "CONFIG_RTE_IBVERBS_LINK_STATIC=y". The libibverbs.pc will be chosen and all the libs listed in the file will be linked by default. Some static lib archives may contain the same files and common interfaces inside. The "--no-whole-archive" needs to be enabled for the linker to discard the useless symbols and resolve the symbols redefinition error. Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency") Signed-off-by: Bing Zhao Acked-by: Thomas Monjalon --- mk/rte.app.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 05ea034b99..44dd684cb1 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -196,8 +196,12 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -ldl _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -ldl else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y) LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh) +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += --no-whole-archive _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += $(LIBS_IBVERBS_STATIC) +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += --whole-archive +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += --no-whole-archive _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += $(LIBS_IBVERBS_STATIC) +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += --whole-archive else _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs -lmlx4 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -libverbs -lmlx5 -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:51.054695246 +0100 +++ 0161-mk-fix-static-linkage-of-mlx-dependency.patch 2020-05-19 14:04:44.500653521 +0100 @@ -1,8 +1,10 @@ -From c093e28f494d92f71fd3ce16a8daacb0cf1715ae Mon Sep 17 00:00:00 2001 +From c4c95316484c1f2ece020eb64444647954a64832 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Wed, 29 Apr 2020 20:11:55 +0800 Subject: [PATCH] mk: fix static linkage of mlx dependency +[ upstream commit c093e28f494d92f71fd3ce16a8daacb0cf1715ae ] + When building a target application with static linking mode via makefiles and enable linking to ibverbs libs by setting "CONFIG_RTE_IBVERBS_LINK_STATIC=y". The libibverbs.pc will be @@ -14,28 +16,30 @@ error. Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency") -Cc: stable@dpdk.org Signed-off-by: Bing Zhao Acked-by: Thomas Monjalon --- - mk/rte.app.mk | 2 ++ - 1 file changed, 2 insertions(+) + mk/rte.app.mk | 4 ++++ + 1 file changed, 4 insertions(+) diff --git a/mk/rte.app.mk b/mk/rte.app.mk -index 244e74d883..db619c5e3f 100644 +index 05ea034b99..44dd684cb1 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk -@@ -209,7 +209,9 @@ ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y) - _LDLIBS-y += -ldl +@@ -196,8 +196,12 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -ldl + _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -ldl else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y) LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh) -+_LDLIBS-y += --no-whole-archive - _LDLIBS-y += $(LIBS_IBVERBS_STATIC) -+_LDLIBS-y += --whole-archive ++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += --no-whole-archive + _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += $(LIBS_IBVERBS_STATIC) ++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += --whole-archive ++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += --no-whole-archive + _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += $(LIBS_IBVERBS_STATIC) ++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += --whole-archive else - ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y) - _LDLIBS-y += -libverbs -lmlx5 + _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs -lmlx4 + _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -libverbs -lmlx5 -- 2.20.1