Skip to content

Commit

Permalink
travis: Fix DPDK build and treat bad-function-cast warning as non-error
Browse files Browse the repository at this point in the history
A missing " prevented the DPDK build in the matrix from functioning
so far. This patch enables the DPDK build by properly building DPDK
as a single library and by pointing the OVS build to the corresponding
build directory. Also removes the 'make install' as it is not required
and only slows down the build.

Due to incorrect casts in the DPDK headers, we have to disable
bad-function-cast and cast-align warnings as being treated as errors
for now.

Signed-off-by: Thomas Graf <[email protected]>
Co-authored-by: Daniele Di Proietto <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
2 people authored and blp committed Sep 11, 2014
1 parent 9562639 commit ecc3c39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before_install: ./.travis/prepare.sh
env:
- OPTS="--disable-ssl"
- TESTSUITE=1 KERNEL=1 OPTS="--with-linux=./linux-3.14.7"
- KERNEL=1 DPDK=1 OPTS="--with-dpdk=./dpdk-1.7.0
- KERNEL=1 DPDK=1 OPTS="--with-dpdk=./dpdk-1.7.0/build"

script: ./.travis/build.sh $OPTS

Expand Down
14 changes: 10 additions & 4 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -o errexit

KERNELSRC=""
CFLAGS="-Werror"

function install_kernel()
{
Expand All @@ -22,9 +23,9 @@ function install_dpdk()
tar xzvf dpdk-1.7.0.tar.gz > /dev/null
cd dpdk-1.7.0
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
make config CC=gcc T=x86_64-native-linuxapp-gcc
make CC=gcc RTE_KERNELDIR=$KERNELSRC
sudo make install CC=gcc T=x86_64-native-linuxapp-gcc RTE_KERNELDIR=$KERNELSRC
echo "Installed DPDK source in $(pwd)"
cd ..
}
Expand All @@ -38,14 +39,19 @@ if [ "$KERNEL" ] || [ "$DPDK" ]; then
install_kernel
fi

[ "$DPDK" ] && install_dpdk
[ "$DPDK" ] && {
install_dpdk
# Disregard bad function cassts until DPDK is fixed
CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
}

configure_ovs $*


if [ $CC = "clang" ]; then
make CFLAGS="-Werror -Wno-error=unused-command-line-argument"
make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
else
make CFLAGS="-Werror" C=1
make CFLAGS="$CFLAGS" C=1
[ "$TESTSUITE" ] && make distcheck
fi

Expand Down

0 comments on commit ecc3c39

Please sign in to comment.