From patchwork Mon Jan 29 12:47:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 136197 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E649F439FD; Mon, 29 Jan 2024 13:47:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7339A402C2; Mon, 29 Jan 2024 13:47:48 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 250244029A for ; Mon, 29 Jan 2024 13:47:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S4a9rcdljzPKw3BVYBMNGr46fsWt9UM/YF6Z1Fjv90I=; b=Emquy7t/f9CXCsvuZPr8U0QKG5r+zWQ5xmZhGUpchElhqaVhu5VdJN+lxHsFv4Wyz9dxW1 A251d/IyhIjsGOttKDDHp8dCW2aTiwOkehQ3RGQKcKG+n2s7a8E/o23rw2zzp5FVperisO MBy9aDU49cpgAiW7ec+HQiluXURxlq0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-370-v0WKbtWjPyCC8D4VLth_sw-1; Mon, 29 Jan 2024 07:47:42 -0500 X-MC-Unique: v0WKbtWjPyCC8D4VLth_sw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 041BA3814EA8; Mon, 29 Jan 2024 12:47:42 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.208.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DBB5111E6; Mon, 29 Jan 2024 12:47:40 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org, Bruce Richardson , Stephen Hemminger , Ben Magistro Cc: stable@dpdk.org Subject: [PATCH] meson: link static libs with whole-archive in subproject Date: Mon, 29 Jan 2024 13:47:17 +0100 Message-ID: <20240129124717.24852-2-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When DPDK is used as a subproject, declare static libs to be linked with -Wl,--whole-archive along with the drivers. This is already done this way in pkg-config. Fixes: f93a605f2d6e ("build: add definitions for use as Meson subproject") Cc: stable@dpdk.org Signed-off-by: Robin Jarry Tested-by: David Marchand Acked-by: Bruce Richardson --- buildtools/subproject/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildtools/subproject/meson.build b/buildtools/subproject/meson.build index 985ce76a9384..aa28f5fae152 100644 --- a/buildtools/subproject/meson.build +++ b/buildtools/subproject/meson.build @@ -8,8 +8,7 @@ if get_option('default_library') == 'static' dependencies: dpdk_static_lib_deps, # static library deps in DPDK build don't include "link_with" parameters, # so explicitly link-in both libs and drivers - link_with: dpdk_static_libraries, - link_whole: dpdk_drivers, + link_whole: dpdk_static_libraries + dpdk_drivers, link_args: dpdk_extra_ldflags) else dpdk_dep = declare_dependency(