2016-01-13 12:12:33 +00:00
#!/bin/sh -ex
case " $CC " in
gcc)
ENABLE_GCC_WERROR = --enable-gcc-Werror
; ;
clang-*)
sudo apt-get -qq update
sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \
" $CC "
# clang -mx32 fails with the following error:
# clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
export st_cv_mx32_runtime = no
; ;
musl-gcc)
sudo add-apt-repository ppa:bortis/musl -y
sudo apt-get -qq update
sudo apt-get -qq --no-install-suggests --no-install-recommends install -y \
musl-tools linux-musl-dev
; ;
esac
2015-11-26 16:07:57 +00:00
2015-11-30 22:18:16 +00:00
case " ${ TARGET - } " in
x32)
CC = " $CC -mx32 "
; ;
x86)
export DISTCHECK_CONFIGURE_FLAGS = '--build=i686-pc-linux-gnu'
CC = " $CC -m32 "
; ;
esac
export CC_FOR_BUILD = " $CC "
2016-01-13 12:12:33 +00:00
$CC --version
git fetch --unshallow
./git-set-file-times
2015-11-26 16:07:57 +00:00
./bootstrap
2015-11-30 22:18:16 +00:00
./configure --enable-maintainer-mode ${ ENABLE_GCC_WERROR - } ${ DISTCHECK_CONFIGURE_FLAGS - }
2016-01-13 12:12:33 +00:00
j = -j` getconf _NPROCESSORS_ONLN 2> /dev/null` || j =
2015-11-30 22:18:16 +00:00
make -k $j distcheck VERBOSE = ${ VERBOSE - }
2016-02-04 00:16:11 +00:00
if [ " $CC : ${ TARGET - } " = 'gcc:x86_64' ] ; then
set -- strace-*.tar.xz
tar -xf " $1 "
dir = " ${ 1 %.tar.xz } "
cd " $dir "
./configure --enable-code-coverage ${ ENABLE_GCC_WERROR - } ${ DISTCHECK_CONFIGURE_FLAGS - }
make -k $j
make -k $j check VERBOSE = ${ VERBOSE - }
2016-02-07 22:47:40 +00:00
codecov --gcov-args= -abcp || :
2016-02-04 00:16:11 +00:00
fi