summaryrefslogtreecommitdiff
path: root/mk/exec-env
diff options
context:
space:
mode:
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2014-10-30 10:57:42 +0000
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-11-29 21:17:01 +0100
commit6d25d90c7d3af6cf34943be315ba9768739348d1 (patch)
tree7a8fcf964ce9aa26b208dab4d5e359f5fe6db29e /mk/exec-env
parent545051540e3f4489cfd6e6584ee555bf0dd1b93c (diff)
downloaddpdk-6d25d90c7d3af6cf34943be315ba9768739348d1.zip
dpdk-6d25d90c7d3af6cf34943be315ba9768739348d1.tar.gz
dpdk-6d25d90c7d3af6cf34943be315ba9768739348d1.tar.xz
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 <sergio.gonzalez.monroy@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'mk/exec-env')
-rw-r--r--mk/exec-env/linuxapp/rte.vars.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-env/linuxapp/rte.vars.mk
index afcefa6..e5af318 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 =