aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2021-03-11 15:49:08 +0200
committerMatias Elo <matias.elo@nokia.com>2021-03-12 12:26:58 +0200
commit787c27f52d52e06d70bfc645dc2d4f8962731711 (patch)
tree38f8a004f981ab99ebebdb67137522adf384a10d
parentc6bb12ebba126b9d3b7bf6209ab216028f463307 (diff)
m4: odp_dpdk: fix application linking when using shared dpdk libv1.26.0.0_DPDK_19.11
When ABI compatibility is disabled DPDK symbols may be visible to the application. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
-rw-r--r--m4/odp_dpdk.m49
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4
index 69ebb9c77..e587b18eb 100644
--- a/m4/odp_dpdk.m4
+++ b/m4/odp_dpdk.m4
@@ -37,8 +37,13 @@ ODP_DPDK_PMDS([$DPDK_PMD_PATH])
DPDK_LIB="-Wl,--whole-archive,-ldpdk,--no-whole-archive"
AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl
if test x$enable_static_applications != xyes; then
- # applications don't need to be linked to anything, just rpath
- DPDK_LIBS_LT="$DPDK_RPATH_LT"
+ if test $ODP_ABI_COMPAT -eq 1; then
+ # applications don't need to be linked to anything, just rpath
+ DPDK_LIBS_LT="$DPDK_RPATH_LT"
+ else
+ # dpdk symbols may be visible to applications
+ DPDK_LIBS_LT="$DPDK_LDFLAGS -ldpdk"
+ fi
else
# static linking flags will need -ldpdk
DPDK_LIBS_LT="$DPDK_LDFLAGS $DPDK_LIB $DPDK_LIBS"