From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2 4/6] mk: prevent overlinking in applications Date: Fri, 10 Jun 2016 15:56:54 +0100 Message-ID: <575AD536.2060204@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-5-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C3AEA19F5 for ; Fri, 10 Jun 2016 16:57:03 +0200 (CEST) In-Reply-To: <1465564749-1405-5-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 > > Replace --no-as-needed linker flag with --as-needed flag, which will > only link libraries directly called by application. > It can be achieved now that the libraries dependencies are handled > properly. > > Signed-off-by: Ferruh Yigit > Signed-off-by: Thomas Monjalon > --- ... > endif > > +# Link only the libraries used in the application > +LDFLAGS += --as-needed For the case we need to have workaround for application, this doesn't let because last argument wins. Can we say as following : LDFLAGS = --as-needed $(LDFLAGS) > + > # default path for libs > _LDLIBS-y += -L$(RTE_SDK_BIN)/lib > >