diff --git a/.travis.yml b/.travis.yml index 1ffd15a7ba9..1838bb26111 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ env: - OPTS="--disable-ssl" - TESTSUITE=1 KERNEL=3.18.1 - TESTSUITE=1 OPTS="--enable-shared" + - BUILD_ENV="-m32" OPTS="--disable-ssl" - KERNEL=3.17.7 DPDK=1 - KERNEL=3.17.7 DPDK=1 OPTS="--enable-shared" - KERNEL=3.17.7 diff --git a/.travis/build.sh b/.travis/build.sh index 35709921577..a8a515b9559 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -4,6 +4,7 @@ set -o errexit KERNELSRC="" CFLAGS="-Werror" +SPARSE_FLAGS="" EXTRA_OPTS="" function install_kernel() @@ -74,7 +75,7 @@ if [ "$DPDK" ]; then EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build" elif [ $CC != "clang" ]; then # DPDK headers currently trigger sparse errors - CFLAGS="$CFLAGS -Wsparse-error" + SPARSE_FLAGS="$SPARSE_FLAGS -Wsparse-error" fi configure_ovs $EXTRA_OPTS $* @@ -86,8 +87,11 @@ fi if [ $CC = "clang" ]; then make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" +elif [[ $BUILD_ENV =~ "-m32" ]]; then + # Disable sparse for 32bit builds on 64bit machine + make CFLAGS="$CFLAGS $BUILD_ENV" else - make CFLAGS="$CFLAGS" C=1 + make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1 fi if [ $TESTSUITE ] && [ $CC != "clang" ]; then diff --git a/.travis/prepare.sh b/.travis/prepare.sh index f8bd0a19fae..a78282be5f9 100755 --- a/.travis/prepare.sh +++ b/.travis/prepare.sh @@ -2,6 +2,7 @@ sudo apt-get update -qq sudo apt-get install -qq libssl-dev llvm-dev +sudo apt-get install -qq gcc-multilib git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git cd sparse && make && sudo make install PREFIX=/usr && cd ..