[dpdk-dev] [PATCH v2 4/6] mk: prevent overlinking in applications

Ferruh Yigit ferruh.yigit at intel.com
Fri Jun 10 16:56:54 CEST 2016


On 6/10/2016 2:19 PM, Thomas Monjalon wrote:
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> 
> 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 <ferruh.yigit at intel.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
> ---
...
>  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
>  
> 



More information about the dev mailing list