Skip to content

Commit

Permalink
travis: Fix build with --enable-shared and DPDK 2.1.
Browse files Browse the repository at this point in the history
When building OVS with --enable-shared, -fPIC should be used in DPDK
CFLAGS.  We used to add a custom option for this (CONFIG_RTE_BUILD_FPIC)
to the DPDK configuration, right after CONFIG_RTE_LIBNAME.

Since CONFIG_RTE_LIBNAME has been removed, it seems simpler to add our
custom option at the end of the file.

Furthermore, since vhost support is enabled by default in DPDK 2.1 and
vhost-user is OVS primary target, there's no need to customize the vhost
related option anymore.

Tested-at: https://travis-ci.org/ddiproietto/ovs/builds/79451461

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
ddiproietto committed Sep 9, 2015
1 parent 4f7b100 commit 5d1877e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .travis/build.sh
Expand Up @@ -50,9 +50,7 @@ function install_dpdk()
fi
find ./ -type f | xargs sed -i 's/max-inline-insns-single=100/max-inline-insns-single=400/'
sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' config/common_linuxapp
sed -ri 's,(CONFIG_RTE_LIBRTE_VHOST=).*,\1y,' config/common_linuxapp
sed -ri 's,(CONFIG_RTE_LIBRTE_VHOST_USER=).*,\1n,' config/common_linuxapp
sed -ri '/CONFIG_RTE_LIBNAME/a CONFIG_RTE_BUILD_FPIC=y' config/common_linuxapp
echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
sed -ri '/EXECENV_CFLAGS = -pthread -fPIC/{s/$/\nelse ifeq ($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS = -pthread -fPIC/}' mk/exec-env/linuxapp/rte.vars.mk
make config CC=gcc T=x86_64-native-linuxapp-gcc
make CC=gcc RTE_KERNELDIR=$KERNELSRC
Expand Down

0 comments on commit 5d1877e

Please sign in to comment.