From 3c94676c3727166384372b5dce3de3184ad8ae16 Mon Sep 17 00:00:00 2001 From: Daniele Di Proietto Date: Fri, 20 Mar 2015 06:02:13 -0700 Subject: [PATCH] acinclude.m4: Restore --whole-archive option for DPDK. The --whole-archive option is required to link vswitchd with DPDK, otherwise the PMD drivers are not going to be included. Omitting the option is not going to cause build failures, but OVS won't be able to use most physical NICs. Signed-off-by: Daniele Di Proietto Acked-by: Pravin B Shelar --- acinclude.m4 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index a56d160d9..5ed70c172 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -170,7 +170,8 @@ AC_DEFUN([OVS_CHECK_DPDK], [ DPDK_INCLUDE=$RTE_SDK/include DPDK_LIB_DIR=$RTE_SDK/lib - DPDK_LIB="-lintel_dpdk -lfuse " + DPDK_LIB="-lintel_dpdk" + DPDK_EXTRA_LIB="-lfuse" ovs_save_CFLAGS="$CFLAGS" ovs_save_LDFLAGS="$LDFLAGS" @@ -187,7 +188,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [ found=false save_LIBS=$LIBS for extras in "" "-ldl"; do - LIBS="$DPDK_LIB $extras $save_LIBS" + LIBS="$DPDK_LIB $extras $save_LIBS $DPDK_EXTRA_LIB" AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include #include ], @@ -206,7 +207,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [ OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR" OVS_CFLAGS="$OVS_CFLAGS -I$DPDK_INCLUDE" - # DPDK 1.7 pmd drivers are not linked unless --whole-archive is used. + # DPDK pmd drivers are not linked unless --whole-archive is used. # # This happens because the rest of the DPDK code doesn't use any symbol in # the pmd driver objects, and the drivers register themselves using an @@ -214,7 +215,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [ # # These options are specified inside a single -Wl directive to prevent # autotools from reordering them. - DPDK_vswitchd_LDFLAGS=-Wl,$DPDK_LIB + DPDK_vswitchd_LDFLAGS=-Wl,--whole-archive,$DPDK_LIB,--no-whole-archive AC_SUBST([DPDK_vswitchd_LDFLAGS]) AC_DEFINE([DPDK_NETDEV], [1], [System uses the DPDK module.]) else -- 2.20.1