From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D31D3C83003 for ; Wed, 29 Apr 2020 11:00:45 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 8AF812073E for ; Wed, 29 Apr 2020 11:00:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AF812073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8464D1DA00; Wed, 29 Apr 2020 13:00:44 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DB3041D9C4 for ; Wed, 29 Apr 2020 13:00:42 +0200 (CEST) IronPort-SDR: 2DbfGeC2SFahJMQMv8SsgTtIxYh08JduJDlm4Ps51/jdo1ELBxH5lS6urshaFqRNsI9b4bbbbX nLv6aAiTKaWg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 04:00:41 -0700 IronPort-SDR: U5mm9EhprpyM3AUVA2G1KT2/Pna8TQxPtF2ARNSUed3vkkkbuNm0RKY1IWVXOmkReNFTJxRNGO 1btx3fLueULg== X-IronPort-AV: E=Sophos;i="5.73,331,1583222400"; d="scan'208";a="432520150" Received: from bricha3-mobl.ger.corp.intel.com ([10.249.47.131]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 29 Apr 2020 04:00:39 -0700 Date: Wed, 29 Apr 2020 12:00:36 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, bluca@debian.org, david.marchand@redhat.com, ktraynor@redhat.com Message-ID: <20200429110036.GG1907@bricha3-MOBL.ger.corp.intel.com> References: <20200429100831.398-1-bruce.richardson@intel.com> <20200429100831.398-8-bruce.richardson@intel.com> <1683481.kWiBISl1fq@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1683481.kWiBISl1fq@thomas> Subject: Re: [dpdk-dev] [PATCH 7/7] build/pkg-config: prevent overlinking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 29, 2020 at 12:34:56PM +0200, Thomas Monjalon wrote: > 29/04/2020 12:08, Bruce Richardson: > > 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. > > I consider "--as-needed" as a workaround here. > The root issue is that pkg-config does not distinguish clearly > shared and static linkage, right? > Yeah, pretty much. Improved static linking support in pkg-config would really help with all this - and probably make much of this set unnecessary. Unfortunately, how pkg-config works right now is how it works, and a change to support what we want would be a fairly major change in functionality. /Bruce