From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2 6/6] mk: reduce scope of whole-archive static linking Date: Fri, 10 Jun 2016 16:03:58 +0100 Message-ID: <575AD6DE.9080907@intel.com> References: <1464367686-3475-1-git-send-email-ferruh.yigit@intel.com> <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> <1465564749-1405-7-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8BC012142 for ; Fri, 10 Jun 2016 17:04:01 +0200 (CEST) In-Reply-To: <1465564749-1405-7-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/10/2016 2:19 PM, Thomas Monjalon wrote: > From: Ferruh Yigit >=20 > The --whole-archive argument is only required for plugins (drivers) > and libraries used by these plugins. > Currently it covers all libraries. > Reducing the scope of this argument slightly reduce final application s= ize > when statically linked. >=20 > Signed-off-by: Ferruh Yigit > Signed-off-by: Thomas Monjalon > --- Technically the scope of --whole-archive should be PMDs, wider scope required because of unresolved references, but I think this is not good workaround. If libraries ordered as suggested before: pmd->librte->external, won't need to extend scope of parameter Still some applications will have problem for now, because of cyclic dependency of librte_eal and librte_mempool, which seems targeted to fix. So, instead of adding --whole-archive as workaround that efffects whole binaries, I am for adding workaround for effected application. The be effected this problem, an application should have direct calls to librte_eal, but shouldn't have any calls to librte_mempool, I think this rare case, that is why only a unit test application effected. And when dependency issue removed we can fix this. To be able to apply workaround per application, LDFLAGS should be set in a way to commented previous patch. Thanks, ferruh