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 4A460A051C for ; Tue, 11 Feb 2020 02:20:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 739901BFE6; Tue, 11 Feb 2020 02:20:10 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 7E3F71BFAD; Tue, 11 Feb 2020 02:20:08 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 23C2321A97; Mon, 10 Feb 2020 20:20:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 10 Feb 2020 20:20:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=1qLPOwisO/ FCB+O0hqC7JvtnYcaJ+LWUemuQao5m/4A=; b=S9vDjBogIyLx+L62nTe/7hz+GY QwVZwR+MlYu5UsZ03n+lLhoAywXS/suZJOYRkMMqM+yBMLm0TbT+kaWyUSEfzTsv AZksN83ETyGqMv+Gf3ACiXH9u9AVOMp53FufdMufhtijphykSLRMGfbkTLkqyAS6 8FouWMl7z0jRb6Jqk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=1qLPOwisO/FCB+O0hqC7JvtnYcaJ+LWUemuQao5m/4A=; b=r7kkuz/n dipcGxFWyoi1czak9GjxlWceBMvWkxT0ACLAKu5PTLyW7Lm1DO4x6RV2V1i75iI4 37019OQAtZkRW8PB+D8WeV8zSFAMv4xRDtQYdK7+uB8fYvGDCPBiLC9+5FnSk5qe 5vmx29E7igznoni2E6rSen6oxVW8pTRD3iLR1wdGH1aFX32EHvYrul+nLVarBIGU zokpmIDdf/+a33P5hPGvnJlpSUWW/UrC7H/pXGl2WG2yBKr/LzdM2fkU5B0z3vS2 olfCPSHAFWloSwjufROCaugoR0c7W4sPiXyca4hKT9UfO/eNAJhJ8Ie7maaWGW4w 6FnVxaUUGRZMiA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedvgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgepgeenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0CED2328005D; Mon, 10 Feb 2020 20:20:06 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: bruce.richardson@intel.com, stable@dpdk.org, Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Date: Tue, 11 Feb 2020 02:19:42 +0100 Message-Id: <20200211011942.1569573-6-thomas@monjalon.net> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200211011942.1569573-1-thomas@monjalon.net> References: <20200127154402.4008069-1-thomas@monjalon.net> <20200211011942.1569573-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v3 5/5] net/mlx: fix overlinking with meson and glue dlopen 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" If ibverbs_link is dlopen, the PMD and application should not be linked with ibverbs, but the glue library is. Unfortunately the ibverbs dependency was exported in the variable ext_deps, so there were overlinking. It is fixed by not exporting the dependency in ext_deps, and recreating a limited dependency object for cflags only. Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build") Fixes: 96d7c62a70c7 ("net/mlx5: support meson build") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- drivers/common/mlx5/meson.build | 6 ++++-- drivers/net/mlx4/meson.build | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build index 2bb2a83c45..2956fc20e2 100644 --- a/drivers/common/mlx5/meson.build +++ b/drivers/common/mlx5/meson.build @@ -30,7 +30,7 @@ foreach libname:libnames endif if lib.found() libs += lib - if not static_ibverbs + if not static_ibverbs and not dlopen_ibverbs ext_deps += lib endif else @@ -38,10 +38,12 @@ foreach libname:libnames reason = 'missing dependency, "' + libname + '"' endif endforeach -if build and static_ibverbs +if build and (static_ibverbs or dlopen_ibverbs) # Build without adding shared libs to Requires.private ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() ext_deps += declare_dependency(compile_args: ibv_cflags.split()) +endif +if build and static_ibverbs # Add static deps ldflags to internal apps and Libs.private ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout() ext_deps += declare_dependency(link_args:ibv_ldflags.split()) diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index 2970f395c1..bcfe5b0890 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -31,7 +31,7 @@ foreach libname:libnames endif if lib.found() libs += lib - if not static_ibverbs + if not static_ibverbs and not dlopen_ibverbs ext_deps += lib endif else @@ -39,10 +39,12 @@ foreach libname:libnames reason = 'missing dependency, "' + libname + '"' endif endforeach -if build and static_ibverbs +if build and (static_ibverbs or dlopen_ibverbs) # Build without adding shared libs to Requires.private ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() ext_deps += declare_dependency(compile_args: ibv_cflags.split()) +endif +if build and static_ibverbs # Add static deps ldflags to internal apps and Libs.private ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout() ext_deps += declare_dependency(link_args:ibv_ldflags.split()) -- 2.25.0