X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=acinclude.m4;h=e6a6a88dccb1fd492e411c2fc688c310f57000c4;hb=d731058395cbdff5b335bca1c9c7e6c1a221104e;hp=aa9ffcd1b39115bffa774fba3fe705574e7d3db1;hpb=ed79f89a30a6e89f2a303524e3917285d6629df7;p=cascardo%2Fovs.git diff --git a/acinclude.m4 b/acinclude.m4 index aa9ffcd1b..e6a6a88dc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -170,6 +170,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [ DPDK_INCLUDE=$RTE_SDK/include DPDK_LIB_DIR=$RTE_SDK/lib + DPDK_LIB=-lintel_dpdk LDFLAGS="$LDFLAGS -L$DPDK_LIB_DIR" CFLAGS="$CFLAGS -I$DPDK_INCLUDE" @@ -184,7 +185,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [ found=false save_LIBS=$LIBS for extras in "" "-ldl"; do - LIBS="-lintel_dpdk $extras $save_LIBS" + LIBS="$DPDK_LIB $extras $save_LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include #include ], @@ -199,6 +200,16 @@ AC_DEFUN([OVS_CHECK_DPDK], [ AC_MSG_ERROR([cannot link with dpdk]) fi + # DPDK 1.7.0 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 + # __attribute__((constructor)) function. + # + # These options are specified inside a single -Wl directive to prevent + # autotools from reordering them. + vswitchd_ovs_vswitchd_LDFLAGS=-Wl,--whole-archive,$DPDK_LIB,--no-whole-archive + AC_SUBST([vswitchd_ovs_vswitchd_LDFLAGS]) AC_DEFINE([DPDK_NETDEV], [1], [System uses the DPDK module.]) else RTE_SDK=