diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2018-03-24 05:42:25 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-03-29 17:29:20 +0300 |
commit | 9a5a18af733c07109224e328ca0ac640ff49f845 (patch) | |
tree | a277396ebe52e6a9a24eca26eada07482da31bce /m4 | |
parent | 06321dc028b83ea78b39eb9673859a40f9da37f7 (diff) |
build: another DPDK-linking fix
Try our best to link with DPDK, if we are doing static linking of
examples and tests and we detected shared DPDK library. Build the list
of static libraries, in hope they are present on the system (like in
Debian/Ubuntu DPDK packages). Linking can still fail, as we have warned
during configure time.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/odp_dpdk.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 index dccc6569c..ec248e769 100644 --- a/m4/odp_dpdk.m4 +++ b/m4/odp_dpdk.m4 @@ -21,20 +21,22 @@ AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) # -------------------- # Set DPDK_LIBS/DPDK_LIBS_LT/DPDK_LIBS_LIBODP depending on DPDK setup AC_DEFUN([_ODP_DPDK_SET_LIBS], [dnl +ODP_DPDK_PMDS([$DPDK_PMD_PATH]) AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl # applications don't need to be linked to anything, just rpath DPDK_LIBS_LT="$DPDK_RPATH_LT" # static linking flags will need -ldpdk + DPDK_LIBS_LT_STATIC="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS" DPDK_LIBS="-Wl,--no-as-needed,-ldpdk,--as-needed,`echo $DPDK_LIBS | sed -e 's/ /,/g'`" DPDK_LIBS="$DPDK_LDFLAGS $DPDK_RPATH $DPDK_LIBS" # link libodp-linux with -ldpdk DPDK_LIBS_LIBODP="$DPDK_LIBS" ], [dnl - ODP_DPDK_PMDS([$DPDK_PMD_PATH]) # build long list of libraries for applications, which should not be # rearranged by libtool DPDK_LIBS_LT="`echo $DPDK_LIBS | sed -e 's/^/-Wc,/' -e 's/ /,/g'`" DPDK_LIBS_LT="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS_LT $DPDK_LIBS" + DPDK_LIBS_LT_STATIC="$DPDK_LIBS_LT" # static linking flags follow the suite DPDK_LIBS="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS" # link libodp-linux with libtool linking flags @@ -43,6 +45,7 @@ AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl AC_SUBST([DPDK_LIBS]) AC_SUBST([DPDK_LIBS_LIBODP]) AC_SUBST([DPDK_LIBS_LT]) +AC_SUBST([DPDK_LIBS_LT_STATIC]) ]) # _ODP_DPDK_CHECK_LIB(LDFLAGS, [LIBS]) |