From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E7B8439FE for ; Mon, 29 Jan 2024 13:47:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74CB140E13; Mon, 29 Jan 2024 13:47:49 +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 539524029A for ; Mon, 29 Jan 2024 13:47:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706532466; 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=N6pskNhuEOEJkpdpg7znnlpxMSaLyp42ARfcnGX/5X4fuWM8ha/arEP0i2rTGvhWc5qFKw C6qjwxjTf0LjXS37kVlPo6Vy5QpE24buiG8cqMM3+qrHt30yKQ5HDkZi1L/34Nc53GjJAw k6/a2fRUsy7VMuylyxs1VuO6GKAuB3Y= 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 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 --- 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( -- 2.43.0