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 AAE46A04DB for ; Thu, 10 Dec 2020 22:22:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6CD182B9C; Thu, 10 Dec 2020 22:22:08 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 77FC82B9C for ; Thu, 10 Dec 2020 22:22:07 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id BE8B75C014F; Thu, 10 Dec 2020 16:22:05 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 10 Dec 2020 16:22:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=Yv8cMqoo1SnKgPIvgYnjQ/xzQt d++/TDWtA+tdpcCFw=; b=a9y56QRdHm5B/rgeGBwIxN10JVqdLObVH9pw74GNW4 zVelyuy94E6OpyZn8yZT6vc52ED960KLFH8SYWSbT9CJrGh4ImvEQ+DkaZX75dp3 Zg5P3alUZzaHLDCKZ4owZi2pxi87gKFWiixk4gpz0Tksw50vSfiZFMvvbR7rVnyU rbyd8oLsXSTMhe943ZfEVoluLTDI5ga4XIGXXPundN6Y6/xk0MgZSEK0KnB/oUK/ lvqWJhzxFxeEhhQ7C4Y13UhG7t3SYdL5C4L7PUeFdy9Ez1+K5CMp5ag8v3d2FTAv sjzByStM60NoYDFsgoO1PtXckdwTVLpm7lxArH4uajHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Yv8cMqoo1SnKgPIvg YnjQ/xzQtd++/TDWtA+tdpcCFw=; b=CGaVh4dcnjaAAr5wXhWBUj6/zwnFKODas flzoBgkrFUlei/AfxxJmrO8UAYMErVKbXa8p5pbC1MceJD2qzLX0ylBcAndQYmuC LFcOS4GcqO2OGx+ncqlFcLviAPpdF8a6CIveQZ3dmZBih4n1d/fnt3W4OqR0wkOf OuOh4hvgFqMZnrsuG77hRjsNOtj/i5FQn1OjiKbDj/I5xCheVwHEHrwwAZkPDEwy SXU/n/2DsYdRJZ8FwzVmcYh6aMZpCfcPIKEd2lEcvlY0fVICOUw1z/79ErmyOdbt irbZ5hbjANnTGyOgwCvVIQ3LfORL7DSM+dOvKaBqI/FKN6HbNaPcg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudektddgudegkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedvledvudehvdduudevuedvveehgeduleegiefgjeehudehtddtgedu ffejiefhgfenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 0D38D108005C; Thu, 10 Dec 2020 16:22:03 -0500 (EST) From: Thomas Monjalon To: stable@dpdk.org Cc: Bruce Richardson , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Nelio Laranjeiro Date: Thu, 10 Dec 2020 22:21:36 +0100 Message-Id: <20201210212136.2636082-1-thomas@monjalon.net> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 18.11 1/1] 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" [ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ] If enable_driver_mlx_glue=true, 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") Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson --- buildtools/meson.build | 2 ++ drivers/net/mlx4/meson.build | 8 +++++++- drivers/net/mlx5/meson.build | 9 ++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/buildtools/meson.build b/buildtools/meson.build index cdd38ed24e..7e06445d89 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +pkgconf = find_program('pkg-config', 'pkgconf', required: false) + subdir('pmdinfogen') pmdinfo = find_program('gen-pmdinfo-cfile.sh') diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index ebad30a04a..a6837bc823 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -28,12 +28,18 @@ libs = [ foreach lib:libs if not lib.found() build = false + elif not pmd_dlopen + ext_deps += lib endif endforeach +if pmd_dlopen + # Build without adding shared libs to Libs.private + ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() + ext_deps += declare_dependency(compile_args: ibv_cflags.split()) +endif if build allow_experimental_apis = true - ext_deps += libs sources = files( 'mlx4.c', 'mlx4_ethdev.c', diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index 87b267a254..34759c7dbc 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -29,12 +29,19 @@ libs = [ foreach lib:libs if not lib.found() build = false + elif not pmd_dlopen + ext_deps += lib endif endforeach +if pmd_dlopen + ext_deps += libs[0] # libmnl + # Build without adding ibverbs libs to Libs.private + ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() + ext_deps += declare_dependency(compile_args: ibv_cflags.split()) +endif if build allow_experimental_apis = true - ext_deps += libs sources = files( 'mlx5.c', 'mlx5_ethdev.c', -- 2.29.2