Use gcc-multilib rather than doing a full cross-compile.
But set the --host, just in case something is listening.
#!/bin/sh -ex
make clean
-make travis CC=clang
make travis CC=gcc
+make travis CC=clang
+make travis CC=gcc CFLAGS="-m32 -g -O2" HOST="--host=i386-linux-gnu"
make travis CC=i686-w64-mingw32-gcc HOST="--host=i686-w64-mingw32" TEST="unittest/run.exe"
make travis CC=clang CFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0"
make travis CC=clang CFLAGS="-fsanitize=address -g" ASAN_OPTIONS="detect_leaks=0"
- gperf
- elfutils
- zlib1g-dev
+ - lib32z1-dev
os:
- linux
- osx
compiler:
- - clang
- gcc
+ - clang
matrix:
include:
+ - os: linux
+ compiler: gcc
+ env: CFLAGS="-m32 -g -O2" HOST="--host=i386-linux-gnu"
+ addons:
+ apt:
+ packages:
+ - gcc-multilib
- os: linux
compiler: i686-w64-mingw32-gcc
env: HOST="--host=i686-w64-mingw32" TEST="unittest/run.exe"
libc6-dev \
gcc \
clang \
+ libc6-dev-i386 \
+ gcc-multilib \
gcc-mingw-w64 \
make \
autoconf \
gperf \
elfutils \
zlib1g-dev \
+ lib32z1-dev \
&& rm -rf /var/lib/apt/lists/*