From 6d25d90c7d3af6cf34943be315ba9768739348d1 Mon Sep 17 00:00:00 2001 From: Sergio Gonzalez Monroy Date: Thu, 30 Oct 2014 10:57:42 +0000 Subject: [PATCH] mk: fix linking with some linux toolchains 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. The problem arises because librte_eal doesn't add a DT_NEEDED entry for librte_mempool despite the fact that it references symbols in that library. It does this because we don't explicitly link with -lrte_mempool when we build librte_eal. Signed-off-by: Sergio Gonzalez Monroy Acked-by: Pablo de Lara Acked-by: Neil Horman --- mk/exec-env/linuxapp/rte.vars.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-env/linuxapp/rte.vars.mk index afcefa6d16..e5af31808e 100644 --- a/mk/exec-env/linuxapp/rte.vars.mk +++ b/mk/exec-env/linuxapp/rte.vars.mk @@ -45,7 +45,9 @@ else EXECENV_CFLAGS = -pthread endif -EXECENV_LDFLAGS = +# Workaround lack of DT_NEEDED entry +EXECENV_LDFLAGS = --no-as-needed + EXECENV_LDLIBS = -lrt -lm EXECENV_ASFLAGS = -- 2.20.1