From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 4/6] mk: prevent overlinking in applications Date: Fri, 10 Jun 2016 17:15:22 +0200 Message-ID: <3411743.SUPtex403d@xps13> References: <1464367686-3475-1-git-send-email-ferruh.yigit@intel.com> <1465564749-1405-5-git-send-email-thomas.monjalon@6wind.com> <575AD536.2060204@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 09D1E2142 for ; Fri, 10 Jun 2016 17:15:24 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id n184so271061445wmn.1 for ; Fri, 10 Jun 2016 08:15:24 -0700 (PDT) In-Reply-To: <575AD536.2060204@intel.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" 2016-06-10 15:56, Ferruh Yigit: > 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. [...] > > +# 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) It should be LDFLAGS := --as-needed $(LDFLAGS) But I would prefer we avoid workarounds.