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 78983A0518 for ; Fri, 24 Jul 2020 14:12:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 703FA1C435; Fri, 24 Jul 2020 14:12:51 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 123D31C435 for ; Fri, 24 Jul 2020 14:12:51 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id j18so7758068wmi.3 for ; Fri, 24 Jul 2020 05:12:51 -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=g22uuzoH5QaGzRFhIiy/6VLz1ckxdzxOYSaPQzHhcmo=; b=K6p/8zK1wSeeS+pbes5GoAS144MUaM66BdwNDNWHLixaFzdNe7CvAOY8Dji/s2cfmE TeBgHW7sFINolMz2saDPmrRk0OkN2mQoHqRzk0p52caVSlnJrt+RB+okNuNCrNRVZbKN guN9JmqYc/sPnQrbbxKoTDogdSGJpiskCdJoJwKQSj6oAX6F6L3+Dquyq3zy2gJJK8RB gt142yQmUD7M4WYaHVCz1PIIelNJz0gUtIijKK8AeKxODyWSNxShsTGiVdJSXNVUBJxD H1WEnU9RXGJMxQ1O79LEjwvYvuR7lHtWZzfFzxeNzMoGtDNUFFN2/jBmErq2zfYKtgYH kbRQ== 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=g22uuzoH5QaGzRFhIiy/6VLz1ckxdzxOYSaPQzHhcmo=; b=QmI3wtW9tEupImiCTREV4Jzv1SsJXorQRJ96P5/jXdvgV7SVywfwvcMoAUv+H09eVr Una/wzh1ep9OSBkmmaqno65SrkOK3CUQGTHwmCeRUozNHLG6QlL3P07R88u3bsBbLgNO IOA/P/nct7sasBoEdd9qzT7p6oV6WIdAwTmGUlaf92MgCj13a8MgKYdGhliafqby18Kn xsRbakw654QMFpWwL35BqvDVci2+nG0SLbmPYRjLiSHIOPTLPv1FBYQmkqk3EWnrpO4i VKaGGKqe9fnIZTBFPuXAF71Od2dwpbknp7k2grJD1lp9Dj4U6zETpV4OAgGFPlwyXGe3 4rcg== X-Gm-Message-State: AOAM531p/uBGe5DZBdaZH3O42fFmjt0cNyLV9S0nQGcQRUMLzCd2XDwV hzfJWbTAB9j5J1zn2m+ZyFg= X-Google-Smtp-Source: ABdhPJzbD08FXEk7Sr0x0XEqrl9u3AFcKryKzjUflj1HuwsWTrIHUc/y7IuJpB4f8AmYqoty5yxo0w== X-Received: by 2002:a1c:6106:: with SMTP id v6mr8257282wmb.178.1595592770714; Fri, 24 Jul 2020 05:12:50 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p11sm1221171wre.32.2020.07.24.05.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:12:49 -0700 (PDT) From: luca.boccassi@gmail.com To: Bruce Richardson Cc: Luca Boccassi , Sunil Pai G , Thomas Monjalon , dpdk stable Date: Fri, 24 Jul 2020 13:00:30 +0100 Message-Id: <20200724120030.1863487-192-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/pkg-config: prevent overlinking' 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 48f7fd27f6350603613ad94286535755ed82b4f9 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 30 Jun 2020 15:14:33 +0100 Subject: [PATCH] build/pkg-config: prevent overlinking [ backported from upstream commit b98447077b0609750c10b84b7b2e7be0c8504fad ] Add the --as-needed linker flag to the DPDK library list in the pkg-config file so as to prevent overlinking. Without this flag, when linking statically using flags from $(pkg-config --static --libs libdpdk), all DPDK drivers and libs were statically linked in, but the binary was also requiring all the shared versions be present to run. The real root-cause of this issue is that the DPDK libraries need to be duplicated in the linker command when doing static linking, due to the behaviour of pkg-config, but since that behaviour cannot be easily changed, this is a simple workaround to avoid problems. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi Acked-by: Sunil Pai G Signed-off-by: Thomas Monjalon --- buildtools/pkg-config/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build index dacc5dbfb..5f1930428 100644 --- a/buildtools/pkg-config/meson.build +++ b/buildtools/pkg-config/meson.build @@ -21,6 +21,11 @@ endif # Another requirement is to allow linking dependencies as shared libraries, # while linking static DPDK libraries and drivers. It is satisfied by # listing the static files in Libs.private with the explicit syntax -l:libfoo.a. +# As a consequence, the regular DPDK libraries are already listed as static +# in the field Libs.private. The second occurences of DPDK libraries, +# included from Requires and used for shared library linkage case, +# are skipped in the case of static linkage thanks to the flag --as-needed. + pkg.generate(name: 'dpdk-libs', filebase: 'libdpdk-libs', @@ -29,7 +34,7 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''', version: meson.project_version(), subdirs: [get_option('include_subdir_arch'), '.'], extra_cflags: pkg_extra_cflags, - libraries: dpdk_libraries, + libraries: ['-Wl,--as-needed'] + dpdk_libraries, libraries_private: dpdk_extra_ldflags) pkg.generate(name: 'DPDK', # main DPDK pkgconfig file -- 2.20.1