[dpdk-dev] mk: fix app linking for combined libs

Neil Horman nhorman at tuxdriver.com
Mon Dec 8 15:53:58 CET 2014


On Thu, Oct 23, 2014 at 04:36:44PM +0100, Sergio Gonzalez Monroy wrote:
> 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 <sergio.gonzalez.monroy at intel.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
> 
> ---
> 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))
Acked-by: Neil Horman <nhorman at tuxdriver.com>



More information about the dev mailing list