summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rwxr-xr-x.travis/linux-build.sh11
2 files changed, 10 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index a2ef8bde5..b74ba2bfd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,8 @@ env:
- BUILD_ENV="-m32" OPTS="--disable-ssl"
- KERNEL=3.16.54 DPDK=1
- KERNEL=3.16.54 DPDK=1 OPTS="--enable-shared"
+ - KERNEL=3.16.54 DPDK_SHARED=1
+ - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
- KERNEL=4.17.14
- KERNEL=4.16.18
- KERNEL=4.15.18
diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 5f4d838a9..42115b08d 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -6,6 +6,7 @@ KERNELSRC=""
CFLAGS="-Werror"
SPARSE_FLAGS=""
EXTRA_OPTS=""
+TARGET="x86_64-native-linuxapp-gcc"
function install_kernel()
{
@@ -66,7 +67,11 @@ function install_dpdk()
find ./ -type f | xargs sed -i 's/-Werror/-Werror -Wno-error=inline/'
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
+ if [ "$DPDK_SHARED" ]; then
+ sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' config/common_base
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
+ fi
+ make config CC=gcc T=$TARGET
make CC=gcc RTE_KERNELDIR=$KERNELSRC
echo "Installed DPDK source in $(pwd)"
cd ..
@@ -77,11 +82,11 @@ function configure_ovs()
./boot.sh && ./configure $*
}
-if [ "$KERNEL" ] || [ "$DPDK" ]; then
+if [ "$KERNEL" ] || [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
install_kernel $KERNEL
fi
-if [ "$DPDK" ]; then
+if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
if [ -z "$DPDK_VER" ]; then
DPDK_VER="18.11"
fi