Skip to content

Commit b9aa727

Browse files
author
Thomas Graf
committed
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>
1 parent 8e04a33 commit b9aa727

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
- OPTS="--disable-ssl"
1010
- TESTSUITE=1 KERNEL=3.18.1
1111
- TESTSUITE=1 OPTS="--enable-shared"
12+
- BUILD_ENV="-m32" OPTS="--disable-ssl"
1213
- KERNEL=3.17.7 DPDK=1
1314
- KERNEL=3.17.7 DPDK=1 OPTS="--enable-shared"
1415
- KERNEL=3.17.7

.travis/build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -o errexit
44

55
KERNELSRC=""
66
CFLAGS="-Werror"
7+
SPARSE_FLAGS=""
78
EXTRA_OPTS=""
89

910
function install_kernel()
@@ -74,7 +75,7 @@ if [ "$DPDK" ]; then
7475
EXTRA_OPTS+="--with-dpdk=./dpdk-$DPDK_VER/build"
7576
elif [ $CC != "clang" ]; then
7677
# DPDK headers currently trigger sparse errors
77-
CFLAGS="$CFLAGS -Wsparse-error"
78+
SPARSE_FLAGS="$SPARSE_FLAGS -Wsparse-error"
7879
fi
7980

8081
configure_ovs $EXTRA_OPTS $*
@@ -86,8 +87,11 @@ fi
8687

8788
if [ $CC = "clang" ]; then
8889
make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
90+
elif [[ $BUILD_ENV =~ "-m32" ]]; then
91+
# Disable sparse for 32bit builds on 64bit machine
92+
make CFLAGS="$CFLAGS $BUILD_ENV"
8993
else
90-
make CFLAGS="$CFLAGS" C=1
94+
make CFLAGS="$CFLAGS $BUILD_ENV $SPARSE_FLAGS" C=1
9195
fi
9296

9397
if [ $TESTSUITE ] && [ $CC != "clang" ]; then

.travis/prepare.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
sudo apt-get update -qq
44
sudo apt-get install -qq libssl-dev llvm-dev
5+
sudo apt-get install -qq gcc-multilib
56

67
git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
78
cd sparse && make && sudo make install PREFIX=/usr && cd ..

0 commit comments

Comments
 (0)