From patchwork Tue Jan 31 11:59:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 20088 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B607412A8; Tue, 31 Jan 2017 12:59:57 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 8322411D9 for ; Tue, 31 Jan 2017 12:59:55 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 31 Jan 2017 03:59:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,314,1477983600"; d="scan'208";a="928519507" Received: from sivswdev02.ir.intel.com ([10.237.217.46]) by orsmga003.jf.intel.com with ESMTP; 31 Jan 2017 03:59:53 -0800 From: Ferruh Yigit To: Thomas Monjalon , Pablo de Lara Cc: dev@dpdk.org, Ferruh Yigit Date: Tue, 31 Jan 2017 11:59:49 +0000 Message-Id: <20170131115950.25660-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.8.4 Subject: [dpdk-dev] [PATCH 1/2] mk: move libs that don't dependent PMD libs out of whole archive 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" 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. But other libraries can be out of this flag, and this saves some size in final binary. Signed-off-by: Ferruh Yigit Acked-by: Thomas Monjalon --- mk/rte.app.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 0d0a970..aeadbc3 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -81,13 +81,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += --no-whole-archive _LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += -lrte_jobstats _LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power +_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 -_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer _LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) += -lrte_hash -_LDLIBS-$(CONFIG_RTE_LIBRTE_EFD) += -lrte_efd _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost - _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf _LDLIBS-$(CONFIG_RTE_LIBRTE_NET) += -lrte_net @@ -97,7 +98,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool _LDLIBS-$(CONFIG_RTE_LIBRTE_RING) += -lrte_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) += -lrte_cmdline -_LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) += -lrte_reorder _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond