From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CDC772BC6 for ; Fri, 10 Jun 2016 20:33:20 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 10 Jun 2016 11:33:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,451,1459839600"; d="scan'208";a="119738362" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 10 Jun 2016 11:33:18 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u5AIXHfs004556; Fri, 10 Jun 2016 19:33:18 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u5AIXHAC022708; Fri, 10 Jun 2016 19:33:17 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u5AIXHc1022704; Fri, 10 Jun 2016 19:33:17 +0100 From: Ferruh Yigit To: dev@dpdk.org Cc: Thomas Monjalon , Panu Matilainen , Christian Ehrhardt , Ferruh Yigit Date: Fri, 10 Jun 2016 19:32:28 +0100 Message-Id: <1465583550-21020-5-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465583550-21020-1-git-send-email-ferruh.yigit@intel.com> References: <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> <1465583550-21020-1-git-send-email-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v3 4/6] mk: sort libraries when linking, move external libs to lower level X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 18:33:21 -0000 As stated in the comment: Order is important: from higher level to lower level This is an attempt to make the layering order better respected. Signed-off-by: Thomas Monjalon Signed-off-by: Ferruh Yigit --- mk/rte.app.mk | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index b8761ae..a518527 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -125,21 +125,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost -# The static libraries do not know their dependencies. -# So linking with static library requires explicit dependencies. -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) -_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm -_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt -_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm -ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) -_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma -endif -ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) -_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse -endif -_LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap -endif # !CONFIG_RTE_BUILD_SHARED_LIBS - _LDLIBS-y += --start-group _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs @@ -156,6 +141,21 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile _LDLIBS-y += $(EXECENV_LDLIBS) _LDLIBS-y += --end-group +# The static libraries do not know their dependencies. +# So linking with static library requires explicit dependencies. +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm +_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt +_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma +endif +ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) +_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse +endif +_LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap +endif # !CONFIG_RTE_BUILD_SHARED_LIBS + LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) # Eliminate duplicates without sorting -- 2.5.5