aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorStanislaw Kardach <skardach@marvell.com>2020-01-23 11:41:31 +0100
committerMatias Elo <matias.elo@nokia.com>2020-06-16 09:36:48 +0300
commit51612524585887e6659ed75a123e8d69301b6304 (patch)
treeb679dc90ad4789d9997ec0f4356b1165cc8b2805 /example
parent20e232ec3dd86e0b8e934f0e2b6e37cb995b53e2 (diff)
build: do not define libodp as part of helper
This prevents multiple inclusion of libodp-linux during builds, once as part of libodphelper and then directly by the application. This causes problems when linking statically with LTO enabled. On tested compiler (9.2.1-9ubuntu2) such duplication causes constructor symbols to be defined multiple times. This means that constructors will be run multiple times which leads to unexpected behavior. To fix this, remove libodp from helper link list. This works when compiling applications because there is no point in using libodphelper without libodp-linux, therefore both libraries have to be provided. After removing library order in example/Makefile.inc is required to ensure the proper linking. Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'example')
-rw-r--r--example/Makefile.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/Makefile.inc b/example/Makefile.inc
index 083c537f2..389f5621c 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.inc
TESTS_ENVIRONMENT = EXEEXT=${EXEEXT}
-LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la
+LDADD = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
# Do not link to DPDK twice in case of dynamic linking with ODP
if STATIC_APPS