[dpdk-dev] [PATCH] mk: --no-as-needed by default for linux exec-env

Neil Horman nhorman at tuxdriver.com
Thu Oct 30 15:01:10 CET 2014


On Thu, Oct 30, 2014 at 11:05:24AM +0000, Gonzalez Monroy, Sergio wrote:
> Some info about the issue for this patch:
> https://wiki.ubuntu.com/ToolChain/CompilerFlags#Flags_passed_to_the_linker
> https://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
> 
> Basically, Ubuntu GCC is always passing --as-needed to the linker which causes some
> Linking issues for us.
Can you elaborate here?
Neil

> I'm not entirely sure that we should patch this issue or just add to the release notes.
> Currently we can work around this by setting EXTRA_LDFLAGS='--no-as-needed' 
> 
> Thoughts?
> 
> Thanks,
> Sergio
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Sergio Gonzalez
> > Monroy
> > Sent: Thursday, October 30, 2014 10:58 AM
> > To: dev at dpdk.org
> > Subject: [dpdk-dev] [PATCH] mk: --no-as-needed by default for linux exec-
> > env
> > 
> > Ubuntu/Debian toolchain passes --as-needed flag to the linker by default.
> > Add --no-as-needed flag by default in linuxapp exec-env to ensure correct
> > linking.
> > 
> > Signed-off-by: Sergio Gonzalez Monroy
> > <sergio.gonzalez.monroy at intel.com>
> > ---
> >  mk/exec-env/linuxapp/rte.vars.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-
> > env/linuxapp/rte.vars.mk
> > index d4808c2..79ddd5f 100644
> > --- a/mk/exec-env/linuxapp/rte.vars.mk
> > +++ b/mk/exec-env/linuxapp/rte.vars.mk
> > @@ -45,7 +45,7 @@ else
> >  EXECENV_CFLAGS  = -pthread
> >  endif
> > 
> > -EXECENV_LDFLAGS =
> > +EXECENV_LDFLAGS = --no-as-needed
> >  EXECENV_LDLIBS  = -lrt -lm
> >  EXECENV_ASFLAGS =
> > 
> > --
> > 1.9.3
> 
> 


More information about the dev mailing list