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 0FB07A0518 for ; Fri, 24 Jul 2020 14:12:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04A4B1C2F2; Fri, 24 Jul 2020 14:12:36 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 829161C2F2 for ; Fri, 24 Jul 2020 14:12:34 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id q5so8099494wru.6 for ; Fri, 24 Jul 2020 05:12:34 -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=B20rlR52QiI46sAVrojVIbzi7+9Aye5neZ866AQttLw=; b=SLBv0UFRNwsCUuzjYPcaKgGTFtjcKix7OKSaPiwtN4YXTBKFDuAG5Iflt36hVRhP77 lxjTjPQZ4FMSzbnJXAcVOS2+BCtSBdXyv3nindezui5pf0eUFSqbmS2USqRhcpqAuH+y 3GbC7DOIWV5oeQcGXKGM1wLH1LU32Y0q02QKFaSXUVAU7lbeppOv7EEi10PxoHZyHOQe ILz3n9DDFamfc0/hdKMb/ezM2qGvrm2/8po2ciG/DSBEKTG/heSsMmi+H3X8ki9jdyCl t+6SVjx9zjX2xf+8BKJdzA6TH8ZTx0nOpB1mlqmDakE2DTgCp3fDnHIxtZGk1jCphUaW T1Ng== 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=B20rlR52QiI46sAVrojVIbzi7+9Aye5neZ866AQttLw=; b=ZaSkclWXSjqENtxPHW4twJOwni/TROVCz8vMJ+TX469WzkNBIRrhR4Votvj08BGnny 1nBqIdlOcuJKyHXUXYbKHTex4smEF1ntDi33IZUNDdyFYErB6tHIZAf0a08uvAvvSt4f FehN4KEk4vDCHEDeAiJKgHVW0NfJzljmQdcxyiVoSJfL219zZjyNLXMkyViMgY8cLVmN n219dY///zDB90YRqupM9dj2JU9olPAX4bXUlW/KsHuuLt/jfwxaYeP9gPObqzw3m82w nj6Xs3FKLJpiawwFx+ZCUdkvK/EDVuxDw3MQoDUnyjNmZEkxkOckw5lz+/AOSLZGpckj j9ug== X-Gm-Message-State: AOAM530s/4yL2WVu/G98Z13ONgP9dNJVRyU25i7wCBqsYVPwhKczE4Fs Eaa51YEdx0K5+p/izAuieF3kF6ylt6ZYjg== X-Google-Smtp-Source: ABdhPJyBahArkNWSka5MPLfplwrPBAIWbWG3zKvw5scA0UuhS68i60w8+7urBSb+5us+AfKoMJpQFA== X-Received: by 2002:a5d:5151:: with SMTP id u17mr8490408wrt.154.1595592754217; Fri, 24 Jul 2020 05:12:34 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y189sm8239463wmd.27.2020.07.24.05.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:12:33 -0700 (PDT) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: Andrzej Ostruszka , Luca Boccassi , Sunil Pai G , Thomas Monjalon , dpdk stable Date: Fri, 24 Jul 2020 13:00:25 +0100 Message-Id: <20200724120030.1863487-187-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'build: always link whole DPDK static libraries' has been queued to stable release 19.11.4 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/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 683b922608454879abb09b6d0020013c1cf3e7f1 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 30 Jun 2020 15:14:27 +0100 Subject: [PATCH] build: always link whole DPDK static libraries [ backported from upstream commit e2db26f76673762532c0b830502bf37aee20d1a8 ] To ensure all constructors are included in static build, we need to pass the --whole-archive flag when linking, which is used with the "link_whole" meson option. Since we use link_whole for all libs, we no longer need to track the lib as part of the static dependency, just the path to the headers for compiling. After this patch is applied, all DPDK .a files are inside --whole-archive/--no-whole-archive flags, but external dependencies and shared libs being linked against remain outside. Signed-off-by: Bruce Richardson Tested-by: Andrzej Ostruszka Acked-by: Luca Boccassi Acked-by: Sunil Pai G Acked-by: Thomas Monjalon --- app/test/meson.build | 2 +- drivers/meson.build | 2 +- examples/meson.build | 6 +++--- lib/meson.build | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 6d4039bbd..12668fa45 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -390,7 +390,7 @@ test_dep_objs += cc.find_library('execinfo', required: false) link_libs = [] if get_option('default_library') == 'static' - link_libs = dpdk_drivers + link_libs = dpdk_static_libraries + dpdk_drivers endif dpdk_test = executable('dpdk-test', diff --git a/drivers/meson.build b/drivers/meson.build index 4246cc32a..330b14636 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -196,7 +196,7 @@ foreach class:dpdk_driver_classes shared_dep = declare_dependency(link_with: shared_lib, include_directories: includes, dependencies: shared_deps) - static_dep = declare_dependency(link_with: static_lib, + static_dep = declare_dependency( include_directories: includes, dependencies: static_deps) diff --git a/examples/meson.build b/examples/meson.build index 1f2b6f516..ec6bd5a08 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1,9 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2019 Intel Corporation -driver_libs = [] +link_whole_libs = [] if get_option('default_library') == 'static' - driver_libs = dpdk_drivers + link_whole_libs = dpdk_static_libraries + dpdk_drivers endif execinfo = cc.find_library('execinfo', required: false) @@ -99,7 +99,7 @@ foreach example: examples endif executable('dpdk-' + name, sources, include_directories: includes, - link_whole: driver_libs, + link_whole: link_whole_libs, link_args: dpdk_extra_ldflags, c_args: cflags, dependencies: dep_objs) diff --git a/lib/meson.build b/lib/meson.build index d5a507fb4..bf938a392 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -127,7 +127,7 @@ foreach l:libraries dependencies: static_deps, include_directories: includes, install: true) - static_dep = declare_dependency(link_with: static_lib, + static_dep = declare_dependency( include_directories: includes, dependencies: static_deps) -- 2.20.1