From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 10 Jun 2016 07:57:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,450,1459839600"; d="scan'208";a="717026308" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.221.96]) ([10.237.221.96]) by FMSMGA003.fm.intel.com with ESMTP; 10 Jun 2016 07:56:55 -0700 To: Thomas Monjalon 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> Cc: dev@dpdk.org From: Ferruh Yigit Message-ID: <575AD536.2060204@intel.com> Date: Fri, 10 Jun 2016 15:56:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1465564749-1405-5-git-send-email-thomas.monjalon@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 4/6] mk: prevent overlinking in applications 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 14:57:04 -0000 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 > >