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 7447CA00C5; Wed, 29 Apr 2020 13:00:45 +0200 (CEST) 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