diff options
author | Thomas Graf <tgraf@noironetworks.com> | 2015-02-04 23:14:05 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@noironetworks.com> | 2015-02-04 23:14:05 +0100 |
commit | b9aa727c9df6bf0834d04e433d38a771556f61af (patch) | |
tree | adde082e088a8f241ae4c043ac8337961d05e38a /.travis | |
parent | 8e04a33ffcb673b5c9253a59870aeeda94cddd66 (diff) | |
download | openvswitch-b9aa727c9df6bf0834d04e433d38a771556f61af.tar.gz |
travis: Add 32 bit (-m32) cross-compile build
Inspired by Ben Pfaff's email on 32 bit build environment, this adds a
32bit build to the travis build matrix to catch alignment and padding
issues.
The 32 bit build is only enabled for non-DPDK builds as DPDK itself is
currently not capable to be compiled with -m32.
The build also has SSL disabled as the Ubuntu libssl-devel package is
not multiarch compatible on the travis build system.
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/build.sh | 8 | ||||
-rwxr-xr-x | .travis/prepare.sh | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.travis/build.sh b/.travis/build.sh index 357099215..a8a515b95 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 f8bd0a19f..a78282be5 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 .. |