From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5A0007E99 for ; Thu, 23 Oct 2014 17:28:23 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 23 Oct 2014 08:31:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,775,1406617200"; d="scan'208";a="610033738" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 23 Oct 2014 08:36:46 -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 s9NFajxS024651 for ; Thu, 23 Oct 2014 16:36:45 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s9NFaiaK001129 for ; Thu, 23 Oct 2014 16:36:44 +0100 Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id s9NFaiWc001125 for dev@dpdk.org; Thu, 23 Oct 2014 16:36:44 +0100 From: Sergio Gonzalez Monroy To: dev@dpdk.org Date: Thu, 23 Oct 2014 16:36:44 +0100 Message-Id: <1414078604-1090-1-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 1.8.5.4 Subject: [dpdk-dev] [PATCH] mk: fix app linking for combined libs 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: Thu, 23 Oct 2014 15:28:24 -0000 Building combined shared libraries results in applications being linked against separeted/individual and combined libs altogether. Link only against combined lib when the config option is enabled. Signed-off-by: Sergio Gonzalez Monroy --- mk/rte.app.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 285b65c..45444af 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -217,6 +217,12 @@ endif endif # plugins +ifeq ($(RTE_BUILD_COMBINE_LIBS),y) +LDLIBS = --whole-archive +LDLIBS += --start-group +LDLIBS += -l$(RTE_LIBNAME) +endif + LDLIBS += $(EXECENV_LDLIBS) LDLIBS += --end-group @@ -240,10 +246,6 @@ build: _postbuild exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) -ifeq ($(RTE_BUILD_COMBINE_LIBS),y) -LDLIBS += -l$(RTE_LIBNAME) -endif - ifeq ($(LINK_USING_CC),1) LDLIBS := $(call linkerprefix,$(LDLIBS)) LDFLAGS := $(call linkerprefix,$(LDFLAGS)) -- 1.9.3