aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2021-04-12 21:02:18 +0300
committerMatias Elo <matias.elo@nokia.com>2021-04-13 17:04:43 +0300
commit00e7af389bd7ecd194ff90781c4560a05254f729 (patch)
tree03faa400f43eaebe3debb4b0a1f6978f9a77360e
parent01443a8522f688b2c137047b6e2fb0bdac4aa28b (diff)
m4: odp_dpdk: use --disable-new-dtags option when using rpath
On some distros, --disable-new-dtags is not the default, so make it explicit. This fixes make check on Ubuntu when DPDK is installed outside ld search paths. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r--m4/odp_dpdk.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4
index 7709e8a21..1d3f33d54 100644
--- a/m4/odp_dpdk.m4
+++ b/m4/odp_dpdk.m4
@@ -217,7 +217,13 @@ if test "x$use_pkg_config" = "xyes"; then
DPDK_LIB_PATH=$(echo "$DPDK_LIBS" | grep -o -- '-L\S*' | sed 's/^-L//')
if test -n "$DPDK_LIB_PATH"; then
DPDK_LIBS_LIBODP+=" -Wl,-rpath,$DPDK_LIB_PATH"
- DPDK_LIBS_LT+=" -R$DPDK_LIB_PATH"
+ # Debian / Ubuntu has relatively recently made new-dtags the
+ # default, while others (e.g. Fedora) have not changed it. RPATH
+ # is extended recursively when resolving transitive dependencies,
+ # while RUNPATH (new-dtags) is not. We use RPATH to point to rte
+ # libraries so that they can be found when PMDs are loaded in
+ # rte_eal_init(). So we need to explicitly disable new-dtags.
+ DPDK_LIBS_LT+=" -Wl,--disable-new-dtags -R$DPDK_LIB_PATH"
fi
else
# Build a list of libraries, which should not be rearranged by libtool.