From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 1/2] mk: move libs that don't dependent PMD libs out of whole archive Date: Tue, 31 Jan 2017 14:59:18 +0100 Message-ID: <1485894798.W7CazHdbJ2@xps13> References: <20170131115950.25660-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Pablo de Lara , dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id B1CB611D9 for ; Tue, 31 Jan 2017 14:59:20 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id r141so80622515wmg.1 for ; Tue, 31 Jan 2017 05:59:20 -0800 (PST) In-Reply-To: <20170131115950.25660-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-01-31 11:59, Ferruh Yigit: > During app build with static library, some libraries wrapped with > --whole-archive compiler flag. > > Wrapped libraries are mainly PMD libraries, this is required because PMD > APIs not directly called but run through callbacks registered via > constructor functions. > > Also some set of libraries, depends to the PMD libraries needs this, > because of same reason. All the libraries used by a plugin (any driver) must be in --whole-archive to ensure that every symbols will be available for the plugin. This should be explained in this patch (verbatim copy allowed). > But other libraries can be out of this flag, and this saves some size in > final binary. [...] > +_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer > +_LDLIBS-$(CONFIG_RTE_LIBRTE_EFD) += -lrte_efd > +_LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile > + > _LDLIBS-y += --whole-archive Yes we can move these libraries out of --whole-archive as they are not used by any driver. Acked-by: Thomas Monjalon